]> git.lyx.org Git - features.git/commitdiff
improve viewer command line syntax; support mozilla as default html viewer
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 16 Oct 2002 16:07:14 +0000 (16:07 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 16 Oct 2002 16:07:14 +0000 (16:07 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5426 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ChangeLog
lib/configure.m4
src/ChangeLog
src/converter.C

index 700a6a45a49319e29a1c479ff6ad34c44caa5c11..4c6e8b097e2a707f500883d4e99958fe29aa88e8 100644 (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>
 
        * ui/default.ui: support for flalign
index 742d13033ac6aebbcc50c57dc0b3db5635b37264..7bd23d80762a9570a06a2f45651f003dcae75f27 100644 (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 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")
index d1bdbbcf8e29f71042d4ff86a315e434420d19c8..9e6eba627ca6023bc5b18be63d45606a70ea6b95 100644 (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>
 
        * undo_funcs.C (textHandleUndo): alter the order in which the
index 4b3bf5fe86701abdbc51142e966e4aadc34cac81..df407c65ad08c6dc62628cacf4c557cfd4ec1b36 100644 (file)
@@ -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);