From 2fc3fce7139dd2d67b0ea3d0dec075f278050493 Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 26 Apr 2011 20:46:03 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@20330 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/chrome/content/util/print.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Open-ILS/xul/staff_client/chrome/content/util/print.js b/Open-ILS/xul/staff_client/chrome/content/util/print.js index 3f9e884b66..a51f4d3e24 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/print.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/print.js @@ -22,6 +22,16 @@ util.print = function (context) { } 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; }; -- 2.11.0