[open-ils-commits] r20326 - in trunk/Open-ILS/xul/staff_client: chrome/content/util server/admin (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 26 16:44:13 EDT 2011
Author: phasefx
Date: 2011-04-26 16:44:08 -0400 (Tue, 26 Apr 2011)
New Revision: 20326
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/util/print.js
trunk/Open-ILS/xul/staff_client/server/admin/printer_settings.js
Log:
Setting print.always_print_silent to false is a bad thing, since it trumps gPrintSettings.printSilent, and will cause a print dialog regardless of Printer Prompt or Auto-Print checkboxes. Let's clear it instead when toggling it off, and if we find it lingering as false from past code, let's clear it then too.
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/print.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/print.js 2011-04-26 17:24:16 UTC (rev 20325)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/print.js 2011-04-26 20:44:08 UTC (rev 20326)
@@ -22,6 +22,16 @@
}
this.oils_printer_external_cmd = has_key ? prefs.getCharPref(key) : '';
+ try {
+ if (prefs.prefHasUserValue('print.always_print_silent')) {
+ if (! prefs.getBoolPref('print.always_print_silent')) {
+ prefs.clearUserPref('print.always_print_silent');
+ }
+ }
+ } catch(E) {
+ dump('Error in print.js trying to clear print.always_print_silent\n');
+ }
+
return this;
};
Modified: trunk/Open-ILS/xul/staff_client/server/admin/printer_settings.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/printer_settings.js 2011-04-26 17:24:16 UTC (rev 20325)
+++ trunk/Open-ILS/xul/staff_client/server/admin/printer_settings.js 2011-04-26 20:44:08 UTC (rev 20326)
@@ -67,10 +67,13 @@
print_silent_pref = g.prefs.getBoolPref('print.always_print_silent');
}
g.prefs.setBoolPref('print.always_print_silent', false);
+ g.prefs.clearUserPref('print.always_print_silent');
var w = get_contentWindow(document.getElementById('sample'));
g.print.NSPrint(w ? w : window, false, {});
g.print.save_settings();
- g.prefs.setBoolPref('print.always_print_silent', print_silent_pref);
+ if (print_silent_pref) {
+ g.prefs.setBoolPref('print.always_print_silent', true);
+ }
}
g.set_print_strategy = function(which) {
More information about the open-ils-commits
mailing list