[open-ils-commits] r20330 - branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Apr 26 16:46:09 EDT 2011


Author: phasefx
Date: 2011-04-26 16:46:03 -0400 (Tue, 26 Apr 2011)
New Revision: 20330

Modified:
   branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/print.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_0/Open-ILS/xul/staff_client/chrome/content/util/print.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/print.js	2011-04-26 20:44:46 UTC (rev 20329)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/util/print.js	2011-04-26 20:46:03 UTC (rev 20330)
@@ -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;
 };
 



More information about the open-ils-commits mailing list