]> git.lyx.org Git - features.git/commitdiff
fix behaviour when a viewer has not been found
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 8 Oct 2002 09:24:01 +0000 (09:24 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 8 Oct 2002 09:24:01 +0000 (09:24 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5367 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/MenuBackend.C
src/lyxrc.C

index de10e188f1f9d5699c7be66cfc66eb86044dbb4d..f4582bfebc9389437fa693b1f3bb263e4a3128b8 100644 (file)
@@ -1,5 +1,11 @@
 2002-10-07  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
+       * lyxrc.C (read): treat a viewer or converter command of "none" as
+       if it were empty.
+
+       * MenuBackend.C (expandFormats): for an update, also allow the
+       formats that are not viewable
+
        * lyx_main.C (queryUserLyXDir): re-run automatically the configure
        script if it is newer than the lyxrc.defaults in user directory
 
index 2af19defcbe8080f1a124e2d3e9bee3811f33c38..2148e9bd4b7c12e533044d41a361757111f78d82 100644 (file)
@@ -352,7 +352,7 @@ void expandFormats(MenuItem::Kind kind, Menu & tomenu, Buffer const * buf)
                action = LFUN_PREVIEW;
                break;
        case MenuItem::UpdateFormats:
-               formats = Exporter::GetExportableFormats(buf, true);
+               formats = Exporter::GetExportableFormats(buf, false);
                action = LFUN_UPDATE;
                break;
        default:
index e7d25273a6c7bf0b1cbd691814381c8b340f716b..cc25842280416196170d3cfaeed86cf45b2a1514 100644 (file)
@@ -977,7 +977,8 @@ int LyXRC::read(string const & filename)
                        if (lexrc.next()) {
                                flags = lexrc.getString();
                        }
-                       if (command.empty() || command == "none") {
+                       if (command.empty()
+                           || token(command, ' ', 0) == "none") {
                                converters.erase(from, to);
                        } else {
                                converters.add(from, to, command, flags);
@@ -991,6 +992,8 @@ int LyXRC::read(string const & filename)
                        }
                        if (lexrc.next()) {
                                command = lexrc.getString();
+                               if (token(command, ' ', 0) == "none")
+                                       command.erase();
                        }
                        formats.setViewer(format, command);
                        break;