mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1189846 Part 4: Remove getPrinterPrefInt from nsIPrintOptions. r=jimm
MozReview-Commit-ID: 4pJAfte1OUs
This commit is contained in:
parent
757e385a15
commit
f5d114afd4
@ -24,12 +24,6 @@ interface nsIPrintOptions : nsISupports
|
||||
*/
|
||||
void ShowPrintSetupDialog(in nsIPrintSettings aThePrintSettings);
|
||||
|
||||
/**
|
||||
* Get a prefixed integer pref
|
||||
*/
|
||||
int32_t getPrinterPrefInt(in nsIPrintSettings aPrintSettings, in wstring
|
||||
aPrefName);
|
||||
|
||||
/**
|
||||
* display Printer Job Properties dialog
|
||||
*/
|
||||
|
@ -1099,6 +1099,7 @@ nsPrintOptions::InitPrintSettingsFromPrinter(const char16_t *aPrinterName,
|
||||
return rv;
|
||||
}
|
||||
|
||||
#ifndef MOZ_X11
|
||||
/** ---------------------------------------------------
|
||||
* Helper function - Returns either the name or sets the length to zero
|
||||
*/
|
||||
@ -1138,31 +1139,7 @@ GetAdjustedPrinterName(nsIPrintSettings* aPS, bool aUsePNP,
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrintOptions::GetPrinterPrefInt(nsIPrintSettings *aPrintSettings,
|
||||
const char16_t *aPrefName, int32_t *_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aPrintSettings);
|
||||
NS_ENSURE_ARG_POINTER(aPrefName);
|
||||
|
||||
nsAutoString prtName;
|
||||
// Get the Printer Name from the PrintSettings
|
||||
// to use as a prefix for Pref Names
|
||||
GetAdjustedPrinterName(aPrintSettings, true, prtName);
|
||||
|
||||
const char* prefName =
|
||||
GetPrefName(NS_LossyConvertUTF16toASCII(aPrefName).get(), prtName);
|
||||
|
||||
NS_ENSURE_TRUE(prefName, NS_ERROR_FAILURE);
|
||||
|
||||
int32_t iVal;
|
||||
nsresult rv = Preferences::GetInt(prefName, &iVal);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
*_retval = iVal;
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrintOptions::InitPrintSettingsFromPrefs(nsIPrintSettings* aPS,
|
||||
|
Loading…
Reference in New Issue
Block a user