From: Jean-Marc Lasgouttes Date: Wed, 16 Oct 2002 16:07:14 +0000 (+0000) Subject: improve viewer command line syntax; support mozilla as default html viewer X-Git-Tag: 1.6.10~18162 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=181f765889f02a09a8b594105f23d2fc31224b39;p=features.git improve viewer command line syntax; support mozilla as default html viewer git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5426 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/ChangeLog b/lib/ChangeLog index 700a6a45a4..4c6e8b097e 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2002-10-16 Jean-Marc Lasgouttes + + * configure.m4: add mozilla as default previewer for html + 2002-10-14 André Pönitz * ui/default.ui: support for flalign diff --git a/lib/configure.m4 b/lib/configure.m4 index 742d13033a..7bd23d8076 100644 --- a/lib/configure.m4 +++ b/lib/configure.m4 @@ -253,7 +253,7 @@ SEARCH_PROG([for a PDF preview],PDF_VIEWER,acroread gv ghostview xpdf) SEARCH_PROG([for a DVI previewer],DVI_VIEWER, xdvi windvi yap) # Search something to preview html -SEARCH_PROG([for a HTML previewer],HTML_VIEWER, netscape) +SEARCH_PROG([for a HTML previewer],HTML_VIEWER, "mozilla file://\$\$p\$\$i" netscape) # Search for a program to preview latex code SEARCH_PROG([for a LaTeX preview],LATEX_VIEWER, "xterm -e less") diff --git a/src/ChangeLog b/src/ChangeLog index d1bdbbcf8e..9e6eba627c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2002-10-16 Jean-Marc Lasgouttes + + * converter.C (view): add support for $$i (file name) and $$p + (file path) for the viewer command. If $$i is not specified, then + it is appended to the command (for compatibility with old syntax) + 2002-10-14 Juergen Vigna * undo_funcs.C (textHandleUndo): alter the order in which the diff --git a/src/converter.C b/src/converter.C index 4b3bf5fe86..df407c65ad 100644 --- a/src/converter.C +++ b/src/converter.C @@ -51,6 +51,7 @@ namespace { string const token_from("$$i"); string const token_base("$$b"); string const token_to("$$o"); +string const token_path("$$p"); ////////////////////////////////////////////////////////////////////////////// @@ -194,7 +195,12 @@ bool Formats::view(Buffer const * buffer, string const & filename, command += 'r'; } - command += " " + QuoteName(OnlyFilename((filename))); + if (!contains(command, token_from)) + command += " " + token_from; + + command = subst(command, token_from, + QuoteName(OnlyFilename(filename))); + command = subst(command, token_path, QuoteName(OnlyPath(filename))); lyxerr[Debug::FILES] << "Executing command: " << command << endl; ShowMessage(buffer, _("Executing command:"), command);