mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 13:25:00 +00:00
Allow disabling of Postscript printer (xlib patch). Bug 225686, patch by Roland.Mainz@informatik.med.uni-giessen.de, r=smontagu, sr=jst.
This commit is contained in:
parent
662cc28a30
commit
4fd253c039
@ -1070,9 +1070,18 @@ nsresult GlobalPrinters::InitializeGlobalPrinters ()
|
||||
#ifdef USE_POSTSCRIPT
|
||||
nsCOMPtr<nsIPref> pPrefs = do_GetService(NS_PREF_CONTRACTID);
|
||||
PRBool psPrintModuleEnabled = PR_TRUE;
|
||||
if (pPrefs) {
|
||||
if (NS_FAILED(pPrefs->GetBoolPref("print.postscript.enabled", &psPrintModuleEnabled))) {
|
||||
psPrintModuleEnabled = PR_TRUE;
|
||||
|
||||
const char *val = PR_GetEnv("MOZILLA_POSTSCRIPT_ENABLED");
|
||||
if (val) {
|
||||
if (val[0] == '0' || !strcasecmp(val, "false"))
|
||||
psPrintModuleEnabled = PR_FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pPrefs) {
|
||||
if (NS_FAILED(pPrefs->GetBoolPref("print.postscript.enabled", &psPrintModuleEnabled))) {
|
||||
psPrintModuleEnabled = PR_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user