[open-ils-commits] r19866 - trunk/Open-ILS/xul/staff_client/server/admin (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 28 12:31:33 EDT 2011
Author: phasefx
Date: 2011-03-28 12:31:30 -0400 (Mon, 28 Mar 2011)
New Revision: 19866
Modified:
trunk/Open-ILS/xul/staff_client/server/admin/printer_settings.js
Log:
clear print.always_print_silent instead of setting it to false in the Printer Settings Editor
Modified: trunk/Open-ILS/xul/staff_client/server/admin/printer_settings.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/printer_settings.js 2011-03-28 16:31:26 UTC (rev 19865)
+++ trunk/Open-ILS/xul/staff_client/server/admin/printer_settings.js 2011-03-28 16:31:30 UTC (rev 19866)
@@ -36,8 +36,17 @@
g.toggle_silent_print = function() {
var x = document.getElementById('print_silent');
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- g.prefs.setBoolPref('print.always_print_silent', x.checked);
- dump('Setting print.always_print_silent to ' + x.checked + '\n');
+ if (x.checked) {
+ g.prefs.setBoolPref('print.always_print_silent', true);
+ dump('Setting print.always_print_silent to true\n');
+ } else {
+ // Setting print.always_print_silent to false is not the same as clearing it, since a false here will prevent
+ // gPrintSettings.printSilent = true from working when fed to webBrowserPrint
+ if (g.prefs.HasUserValue('print.always_print_silent')) {
+ g.prefs.clearUserPref('print.always_print_silent');
+ }
+ dump('Clearing print.always_print_silent\n');
+ }
}
g.set_printer_context = function(context) {
More information about the open-ils-commits
mailing list