Search
j0ke.net Open Build Service
>
Projects
>
mozilla
>
mozilla-xulrunner190
> toolkit-ui-lockdown.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File toolkit-ui-lockdown.patch of Package mozilla-xulrunner190
From: Robert O'Callahan Subject: Lockdown feature for Toolkit UI References: diff --git a/mozilla/toolkit/components/printing/content/printdialog.js b/mozilla/toolkit/components/printing/content/printdialog.js index 3e674af..50e99c0 100644 --- a/mozilla/toolkit/components/printing/content/printdialog.js +++ b/mozilla/toolkit/components/printing/content/printdialog.js @@ -50,6 +50,7 @@ var gPrintSettings = null; var gWebBrowserPrint = null; var gPrintSetInterface = Components.interfaces.nsIPrintSettings; var doDebug = false; +var gPrefService = null; //--------------------------------------------------- function initDialog() @@ -87,11 +88,23 @@ function initDialog() dialog.fpDialog = document.getElementById("fpDialog"); dialog.enabled = false; + + gPrefService = Components.classes["@mozilla.org/preferences-service;1"] + .getService(Components.interfaces.nsIPrefService).getBranch(null); + if (gPrefService.getBoolPref("config.lockdown.savepage")) { + dialog.fileCheck.setAttribute("disabled", "true"); + } + if (gPrefService.getBoolPref("config.lockdown.printing")) { + dialog.printButton.setAttribute("disabled", "true"); + } } //--------------------------------------------------- function checkInteger(element) { + if (gPrefService.getBoolPref("config.lockdown.printing")) + return; + var value = element.value; if (value && value.length > 0) { value = value.replace(/[^0-9]/g,"");