зеркало из https://github.com/mozilla/pjs.git
Bug 680696 - Remove nsPSPrinterList::Init; r=roc
This commit is contained in:
Родитель
6e8022d0b4
Коммит
5cc1efb38f
|
@ -973,11 +973,9 @@ nsresult GlobalPrinters::InitializeGlobalPrinters ()
|
|||
}
|
||||
|
||||
mGlobalPrinterList = new nsTArray<nsString>();
|
||||
if (!mGlobalPrinterList)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
nsPSPrinterList psMgr;
|
||||
if (NS_SUCCEEDED(psMgr.Init()) && psMgr.Enabled()) {
|
||||
if (psMgr.Enabled()) {
|
||||
/* Get the list of PostScript-module printers */
|
||||
// XXX: this function is the only user of GetPrinterList
|
||||
// So it may be interesting to convert the nsCStrings
|
||||
|
|
|
@ -58,17 +58,13 @@ using namespace mozilla;
|
|||
|
||||
nsCUPSShim gCupsShim;
|
||||
|
||||
/* Initialize the printer manager object */
|
||||
nsresult
|
||||
nsPSPrinterList::Init()
|
||||
nsPSPrinterList::nsPSPrinterList()
|
||||
{
|
||||
// Should we try cups?
|
||||
PRBool useCups =
|
||||
Preferences::GetBool("print.postscript.cups.enabled", PR_TRUE);
|
||||
if (useCups && !gCupsShim.IsInitialized()) {
|
||||
if (Preferences::GetBool("print.postscript.cups.enabled", PR_TRUE) &&
|
||||
!gCupsShim.IsInitialized()) {
|
||||
gCupsShim.Init();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -47,12 +47,7 @@ class nsCUPSShim;
|
|||
|
||||
class nsPSPrinterList {
|
||||
public:
|
||||
/**
|
||||
* Initialize a printer manager object.
|
||||
* @return NS_ERROR_NOT_INITIALIZED if unable to access prefs
|
||||
* NS_OK for successful initialization.
|
||||
*/
|
||||
nsresult Init();
|
||||
nsPSPrinterList();
|
||||
|
||||
/**
|
||||
* Is the PostScript module enabled or disabled?
|
||||
|
|
Загрузка…
Ссылка в новой задаче