diff options
author | Doug Kearns <dougkearns@gmail.com> | 2008-12-20 01:08:24 +1100 |
---|---|---|
committer | Doug Kearns <dougkearns@gmail.com> | 2008-12-20 01:12:31 +1100 |
commit | 86f14b77ccb127678c0743c3483175c15e901467 (patch) | |
tree | 049efb59effff9c118d1dcdb056620b66c05335e | |
parent | 03fed06b39c36357858f1b45f7b9e51d6f838ce7 (diff) | |
download | pentadactyl-86f14b77ccb127678c0743c3483175c15e901467.tar.gz |
document :hardcopy >{filename}...since it was committed
-rw-r--r-- | common/content/buffer.js | 18 | ||||
-rw-r--r-- | vimperator/NEWS | 1 | ||||
-rw-r--r-- | vimperator/locale/en-US/print.txt | 6 |
3 files changed, 18 insertions, 7 deletions
diff --git a/common/content/buffer.js b/common/content/buffer.js index 66f15316..23989362 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -467,14 +467,18 @@ function Buffer() //{{{ "Print current document", function (args) { + let arg = args[0]; + + // FIXME: arg handling is a bit of a mess, check for filename + if (arg && (liberator.has("Win32") || arg[0] != ">")) + return liberator.echoerr("E488: Trailing characters"); + options.temporaryContext(function () { - if (args[0]) + if (arg) { - if (args[0][0] != ">") - return liberator.echoerr("E488: Trailing characters"); options.setPref("print.print_to_file", "true"); - options.setPref("print.print_to_filename", io.getFile(args[0].substr(1)).path); - liberator.echomsg("Printing to file: " + args[0].substr(1)); + options.setPref("print.print_to_filename", io.getFile(arg.substr(1)).path); + liberator.echomsg("Printing to file: " + arg.substr(1)); } else { @@ -487,8 +491,8 @@ function Buffer() //{{{ getBrowser().contentWindow.print(); }); - if (args[0]) - liberator.echomsg("Printed: " + args[0].substr(1)); + if (arg) + liberator.echomsg("Printed: " + arg.substr(1)); else liberator.echomsg("Print job sent."); }, diff --git a/vimperator/NEWS b/vimperator/NEWS index c850ec2b..f982feda 100644 --- a/vimperator/NEWS +++ b/vimperator/NEWS @@ -21,6 +21,7 @@ VimperatorLeave respectively * IMPORTANT: 'verbose' is now by default at 1, set to 0 to not show any status messages + * :hardcopy now supports output redirection to a file on Unix and MacUnix * add ";f" extended hint mode to focus a frame * add "r", "l", and "b" to 'guioptions' to toggle the scrollbars. * remove spaces and newlines when open urls starting with http:// or similar diff --git a/vimperator/locale/en-US/print.txt b/vimperator/locale/en-US/print.txt index aad69e18..397f9dbb 100644 --- a/vimperator/locale/en-US/print.txt +++ b/vimperator/locale/en-US/print.txt @@ -10,6 +10,12 @@ number of copies, orientation, etc. When used with [!], the dialog is skipped and the default printer used. ________________________________________________________________________________ + +||:ha[rdcopy][!] >{filename}|| + +________________________________________________________________________________ +As above, but write the output to {filename}. +________________________________________________________________________________ + section:Firefox{nbsp}printing{nbsp}dialogs[firefox-print-dialogs] The "Print Preview" and "Page Setup" dialogs can be opened via the :dialog command |