diff --git a/NEWS b/NEWS index dca8f68d..bff0121b 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ generous donation which made this behavior possible) * IMPORTANT: ctrl-x/a never take possible negative URLs into account, it was just too unpredictable + * add a special version to :hardcopy to skip the Print dialog * add :bl[ast], :bf[irst], :br[ewind] to go to first/last tab * add :bn[ext], :bp[revious], :bN[ext] to switch to next/previous tab * add :pagestyle command to allow for switching between alternate style sheets diff --git a/content/buffer.js b/content/buffer.js index b01f18f5..35e86725 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -446,7 +446,17 @@ liberator.Buffer = function () //{{{ liberator.commands.add(["ha[rdcopy]"], "Print current document", - function () { getBrowser().contentWindow.print(); }); + function (args, special) + { + // TODO: Hide the progress bar ("print.show_print_progress") when + // the special version is called? + var value = liberator.options.getPref("print.always_print_silent"); + liberator.options.setPref("print.always_print_silent", special); + + getBrowser().contentWindow.print(); + + liberator.options.setPref("print.always_print_silent", value); + }); liberator.commands.add(["pa[geinfo]"], "Show various page information", diff --git a/content/liberator.js b/content/liberator.js index bd558ede..861da861 100644 --- a/content/liberator.js +++ b/content/liberator.js @@ -382,7 +382,7 @@ const liberator = (function () //{{{ // TODO: move files to liberator.config var files = ["intro.html", "tutorial.html", "starting.html", "browsing.html", "buffer.html", "options.html", "tabs.html", "hints.html", "map.html", "eval.html", "marks.html", - "repeat.html", "autocommands.html", "developer.html", "various.html"]; + "repeat.html", "autocommands.html", "print.html", "developer.html", "various.html"]; for (var file in files) { diff --git a/locale/en-US/intro.txt b/locale/en-US/intro.txt index 3856b533..3e8ffb40 100644 --- a/locale/en-US/intro.txt +++ b/locale/en-US/intro.txt @@ -61,6 +61,7 @@ section:Help{nbsp}topics[overview] recurring workflows. - help:Autocommands[autocommands.html]: Automatically execute code on certain events. +- help:Print[print.html]: Printing commands. - help:Developer{nbsp}information[developer.html]: How to write docs or plugins. - help:Various[various.html]: Other help which didn't fit into any other category. diff --git a/locale/en-US/print.txt b/locale/en-US/print.txt new file mode 100644 index 00000000..13d474ca --- /dev/null +++ b/locale/en-US/print.txt @@ -0,0 +1,25 @@ +HEADER + +|printing| + + +|:ha| |:hardcopy| + +||:ha[rdcopy][!]|| +________________________________________________________________________________ +Print current document. Open a GUI dialog where you can select the printer, +number of copies, orientation, etc. When used with [a]![a], the dialog is +skipped and the default printer used. +________________________________________________________________________________ + +section:Firefox{nbsp}printing{nbsp}dialogs[firefox-print-dialogs] + +The "Print Preview" and "Page Setup" dialogs can be opened via the :dialog command + + :dialog printpreview + +and + + :dialog printsetup + +respectively. + +// vim: set syntax=asciidoc: diff --git a/locale/en-US/various.txt b/locale/en-US/various.txt index 4ddfc4fd..86d5e915 100644 --- a/locale/en-US/various.txt +++ b/locale/en-US/various.txt @@ -238,14 +238,6 @@ in a new tab. Here, downloads can be paused, canceled and resumed. ________________________________________________________________________________ -|:ha| |:hardcopy| + -||:ha[rdcopy]|| -________________________________________________________________________________ -Print current document. Open a GUI dialog where you can select the printer, -number of copies, orientation, etc. -________________________________________________________________________________ - - |:noh| |:nohlsearch| + ||:noh[lsearch]|| ________________________________________________________________________________