<!ENTITY staff.printing.normal_settings.header "Normal Settings">
<!ENTITY staff.printing.advanced_settings.header "Advanced Settings">
<!ENTITY staff.printing.advanced.mozilla_print "Use default print strategy (Mozilla Print)">
+<!ENTITY staff.printing.advanced.mozilla_print.print_silent "Print silently when using Mozilla Print">
<!ENTITY staff.printing.advanced.dos_print "Use alternate print strategy (DOS LPT1 Print)">
<!ENTITY staff.printing.advanced.custom_print "Use alternate print strategy (Custom/External Print)">
<!ENTITY staff.printing.advanced.dos_print.warning.header "Note on DOS LPT1 Print">
<button onclick="try { g.printer_settings(); } catch(E) { alert(E); }">&staff.printing.set_default;</button>
<button onclick="try { g.page_settings(); } catch(E) { alert(E); }">&staff.printing.page_settings;</button><br />
<h1>&staff.printing.advanced_settings.header;</h1>
+ <form>
+ <input type='checkbox' id='print_silent' onclick='g.toggle_silent_print(event);'>&staff.printing.advanced.mozilla_print.print_silent;</input>
+ </form>
<button onclick="try { g.set_print_strategy('webBrowserPrint'); } catch(E) { alert(E); }">&staff.printing.advanced.mozilla_print;</button>
<button onclick="try { g.set_print_strategy('dos.print'); } catch(E) { alert(E); }">&staff.printing.advanced.dos_print;</button>
<button onclick="try { g.set_print_strategy('custom.print'); } catch(E) { alert(E); }">&staff.printing.advanced.custom_print;</button>
g.prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
+ var print_silent_pref = false;
+ if (g.prefs.prefHasUserValue('print.always_print_silent')) {
+ print_silent_pref = g.prefs.getBoolPref('print.always_print_silent');
+ }
+ var x = document.getElementById('print_silent');
+ x.checked = print_silent_pref;
+
/*
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
g.PSSVC = Components.classes["@mozilla.org/gfx/printsettings-service;1"].getService(Components.interfaces.nsIPrintSettingsService);
}
}
+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');
+}
+
g.set_printer_context = function(context) {
g.context = context || 'default';
JSAN.use('util.print'); g.print = new util.print(g.context);