Bug 1189846 Part 5: Remove displayJobProperties from nsIPrintOptions. r=jimm
authorBob Owen <bobowencode@gmail.com>
Mon, 16 May 2016 10:40:54 +0100
changeset 336511 7ad6e2df19e42db3999255db29237762c19dbc19
parent 336510 7a7eb2ca6358b17af9ee36a15840e158db2f8e57
child 336512 67f3f3fbbd35b6ec0a4312128b32e075090817fe
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1189846
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1189846 Part 5: Remove displayJobProperties from nsIPrintOptions. r=jimm MozReview-Commit-ID: L10L7lnRIG4
widget/gtk/nsDeviceContextSpecG.cpp
widget/nsIPrintOptions.idl
widget/nsPrintOptionsImpl.cpp
widget/qt/nsDeviceContextSpecQt.cpp
widget/windows/nsDeviceContextSpecWin.cpp
--- a/widget/gtk/nsDeviceContextSpecG.cpp
+++ b/widget/gtk/nsDeviceContextSpecG.cpp
@@ -426,21 +426,16 @@ NS_IMETHODIMP nsPrinterEnumeratorGTK::In
   DO_PR_DEBUG_LOG(("Setting default filename to '%s'\n", filename.get()));
   aPrintSettings->SetToFileName(NS_ConvertUTF8toUTF16(filename).get());
 
   aPrintSettings->SetIsInitializedFromPrinter(true);
 
   return NS_OK;    
 }
 
-NS_IMETHODIMP nsPrinterEnumeratorGTK::DisplayPropertiesDlg(const char16_t *aPrinter, nsIPrintSettings *aPrintSettings)
-{
-  return NS_OK;
-}
-
 //----------------------------------------------------------------------
 nsresult GlobalPrinters::InitializeGlobalPrinters ()
 {
   if (PrintersAreAllocated()) {
     return NS_OK;
   }
 
   mGlobalPrinterList = new nsTArray<nsString>();
--- a/widget/nsIPrintOptions.idl
+++ b/widget/nsIPrintOptions.idl
@@ -20,22 +20,16 @@ interface nsIStringEnumerator;
 interface nsIPrintOptions : nsISupports
 {
   /**
    * Show Native Print Options dialog, this may not be supported on all platforms
    */
   void ShowPrintSetupDialog(in nsIPrintSettings aThePrintSettings);
 
   /**
-   * display Printer Job Properties dialog
-   */
-  void displayJobProperties (in wstring aPrinter, in nsIPrintSettings
-                             aPrintSettings, out boolean aDisplayed);
-
-  /**
    * Native data constants
    */
   const short kNativeDataPrintRecord        = 0;
 
   [noscript] voidPtr GetNativeData(in short aDataType);
 };
 
 [scriptable, uuid(5e738fff-404c-4c94-9189-e8f2cce93e94)]
@@ -58,16 +52,10 @@ interface nsIPrinterEnumerator : nsISupp
    *   Number of Copies
    */
   void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings);
 
   /**
    * The list of printer names
    */
   readonly attribute nsIStringEnumerator printerNameList;
-
-  /*  takes printer selected and will display job properties dlg for that printer
-   *  returns true if dialog displays
-   */
-  void displayPropertiesDlg(in wstring aPrinter, in nsIPrintSettings aPrintSettings);
-
 };
 
--- a/widget/nsPrintOptionsImpl.cpp
+++ b/widget/nsPrintOptionsImpl.cpp
@@ -960,38 +960,16 @@ nsPrintOptions::WritePrefs(nsIPrintSetti
   }
 
   // Not Writing Out:
   //   Number of Copies
 
   return NS_OK;
 }
 
-NS_IMETHODIMP
-nsPrintOptions::DisplayJobProperties(const char16_t *aPrinter,
-                                     nsIPrintSettings* aPrintSettings,
-                                     bool *aDisplayed)
-{
-  NS_ENSURE_ARG_POINTER(aPrinter);
-  *aDisplayed = false;
-
-  nsresult rv;
-  nsCOMPtr<nsIPrinterEnumerator> propDlg =
-           do_CreateInstance(NS_PRINTER_ENUMERATOR_CONTRACTID, &rv);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  NS_ENSURE_ARG_POINTER(aPrintSettings);
-  rv = propDlg->DisplayPropertiesDlg(aPrinter, aPrintSettings);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  *aDisplayed = true;
-
-  return rv;
-}
-
 NS_IMETHODIMP nsPrintOptions::GetNativeData(int16_t aDataType, void * *_retval)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 nsresult nsPrintOptions::_CreatePrintSettings(nsIPrintSettings **_retval)
 {
   // does not initially ref count
--- a/widget/qt/nsDeviceContextSpecQt.cpp
+++ b/widget/qt/nsDeviceContextSpecQt.cpp
@@ -251,16 +251,8 @@ NS_IMETHODIMP nsPrinterEnumeratorQt::Ini
         const char16_t* aPrinterName,
         nsIPrintSettings* aPrintSettings)
 {
     DO_PR_DEBUG_LOG(("nsPrinterEnumeratorQt::InitPrintSettingsFromPrinter()"));
     // XXX Leave NS_OK for now
     // Probably should use NS_ERROR_NOT_IMPLEMENTED
     return NS_OK;
 }
-
-NS_IMETHODIMP nsPrinterEnumeratorQt::DisplayPropertiesDlg(
-        const char16_t* aPrinter,
-        nsIPrintSettings* aPrintSettings)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
--- a/widget/windows/nsDeviceContextSpecWin.cpp
+++ b/widget/windows/nsDeviceContextSpecWin.cpp
@@ -509,24 +509,16 @@ nsPrinterEnumeratorWin::GetPrinterNameLi
     LPWSTR name = GlobalPrinters::GetInstance()->GetItemFromList(printerInx);
     names[printerInx].Assign(name);
   }
 
   return NS_NewAdoptingStringEnumerator(aPrinterNameList, printers);
 }
 
 //----------------------------------------------------------------------------------
-// Display the AdvancedDocumentProperties for the selected Printer
-NS_IMETHODIMP nsPrinterEnumeratorWin::DisplayPropertiesDlg(const char16_t *aPrinterName, nsIPrintSettings* aPrintSettings)
-{
-  // Implementation removed because it is unused
-  return NS_OK;
-}
-
-//----------------------------------------------------------------------------------
 //-- Global Printers
 //----------------------------------------------------------------------------------
 
 //----------------------------------------------------------------------------------
 // THe array hold the name and port for each printer
 void 
 GlobalPrinters::ReallocatePrinters()
 {