Dear Jean-Marc,

following our previous discussion, I have prepared a patch that addresses three different issues:

lyx-devel/src/MenuBackend.C:
Only viewable formats should be updatable (as the menu name "View" implies)

lyx-devel/src/buffer.C:
If a text class is unknown, LyX converts the document. The error message should say so.

lyx-devel/src/lyxfunc.C:
Currently, only the export of "fax" can be disabled. I can see no good reason why other
formats cannot be disabled at all.

Regards, Michael

--
=======================================================================
Michael Schmitt Telefon: +49 651 97551-40
Institut für Telematik Telefax: +49 651 97551-12
Bahnhofstrasse 30-32 WWW: http://www.ti.fhg.de
D-54292 Trier E-Mail: mailto:[EMAIL PROTECTED]
=======================================================================

Index: lyx-devel//src/MenuBackend.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/MenuBackend.C,v
retrieving revision 1.63
diff -u -r1.63 MenuBackend.C
--- lyx-devel//src/MenuBackend.C        2003/01/16 10:41:14     1.63
+++ lyx-devel//src/MenuBackend.C        2003/01/20 14:07:46
@@ -352,7 +352,7 @@
                action = LFUN_PREVIEW;
                break;
        case MenuItem::UpdateFormats:
-               formats = Exporter::GetExportableFormats(buf, false);
+               formats = Exporter::GetExportableFormats(buf, true);
                action = LFUN_UPDATE;
                break;
        default:
Index: lyx-devel//src/buffer.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/buffer.C,v
retrieving revision 1.397
diff -u -r1.397 buffer.C
--- lyx-devel//src/buffer.C     2003/01/16 21:17:08     1.397
+++ lyx-devel//src/buffer.C     2003/01/20 14:07:46
@@ -621,13 +621,13 @@
 #if USE_BOOST_FORMAT
                        Alert::alert(_("Textclass error"),
                                boost::io::str(boost::format(_("The document uses an 
unknown textclass \"%1$s\".")) % lex.getString()),
-                               _("LyX will not be able to produce output 
correctly."));
+                               _("-- substituting default"));
 #else
                        Alert::alert(
                                _("Textclass error"),
                                _("The document uses an unknown textclass ")
                                + lex.getString(),
-                               _("LyX will not be able to produce output 
correctly."));
+                               _("-- substituting default"));
 #endif
                        params.textclass = 0;
                }
Index: lyx-devel//src/lyxfunc.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/lyxfunc.C,v
retrieving revision 1.391
diff -u -r1.391 lyxfunc.C
--- lyx-devel//src/lyxfunc.C    2003/01/09 14:31:24     1.391
+++ lyx-devel//src/lyxfunc.C    2003/01/20 14:07:46
@@ -327,8 +327,7 @@
                        || lyxrc.print_command == "none";
                break;
        case LFUN_EXPORT:
-               disable = ev.argument == "fax" &&
-                       !Exporter::IsExportable(buf, ev.argument);
+               disable = !Exporter::IsExportable(buf, ev.argument);
                break;
        case LFUN_UNDO:
                disable = buf->undostack.empty();


Reply via email to