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
This commit is contained in:
Jean-Marc Lasgouttes 2002-10-16 16:07:14 +00:00
parent 8f6a9ee292
commit 181f765889
4 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2002-10-16 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* configure.m4: add mozilla as default previewer for html
2002-10-14 André Pönitz <poenitz@gmx.net> 2002-10-14 André Pönitz <poenitz@gmx.net>
* ui/default.ui: support for flalign * ui/default.ui: support for flalign

View File

@ -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_PROG([for a DVI previewer],DVI_VIEWER, xdvi windvi yap)
# Search something to preview html # 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 for a program to preview latex code
SEARCH_PROG([for a LaTeX preview],LATEX_VIEWER, "xterm -e less") SEARCH_PROG([for a LaTeX preview],LATEX_VIEWER, "xterm -e less")

View File

@ -1,3 +1,9 @@
2002-10-16 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* 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 <jug@sad.it> 2002-10-14 Juergen Vigna <jug@sad.it>
* undo_funcs.C (textHandleUndo): alter the order in which the * undo_funcs.C (textHandleUndo): alter the order in which the

View File

@ -51,6 +51,7 @@ namespace {
string const token_from("$$i"); string const token_from("$$i");
string const token_base("$$b"); string const token_base("$$b");
string const token_to("$$o"); 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 += '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; lyxerr[Debug::FILES] << "Executing command: " << command << endl;
ShowMessage(buffer, _("Executing command:"), command); ShowMessage(buffer, _("Executing command:"), command);