[open-ils-commits] r20328 - in branches/rel_2_1/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:48 EDT 2011
Author: phasefx
Date: 2011-04-26 16:44:43 -0400 (Tue, 26 Apr 2011)
New Revision: 20328
Modified:
branches/rel_2_1/Open-ILS/xul/staff_client/chrome/content/util/print.js
branches/rel_2_1/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: branches/rel_2_1/Open-ILS/xul/staff_client/chrome/content/util/print.js
===================================================================
--- branches/rel_2_1/Open-ILS/xul/staff_client/chrome/content/util/print.js 2011-04-26 20:44:11 UTC (rev 20327)
+++ branches/rel_2_1/Open-ILS/xul/staff_client/chrome/content/util/print.js 2011-04-26 20:44:43 UTC (rev 20328)
@@ -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: branches/rel_2_1/Open-ILS/xul/staff_client/server/admin/printer_settings.js
===================================================================
--- branches/rel_2_1/Open-ILS/xul/staff_client/server/admin/printer_settings.js 2011-04-26 20:44:11 UTC (rev 20327)
+++ branches/rel_2_1/Open-ILS/xul/staff_client/server/admin/printer_settings.js 2011-04-26 20:44:43 UTC (rev 20328)
@@ -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