fix behaviour when a viewer has not been found

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5367 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-10-08 09:24:01 +00:00
parent c8f0a3516c
commit 997b73a21a
3 changed files with 11 additions and 2 deletions

View 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

View 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:

View 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;