Bo Peng wrote: >> A "" viewer could either mean "don't view this format" or "use the auto >> viewer". If we make it the latter (as in Jean-Marcs patch) we can use the >> noview flag that I want to introduce (and that we need anyway to get rid >> of some hardcoding) to mark those formats that should not be viewable at >> all. IMHO this is a cleaner solution than the "auto" entry. > > I do not know what you have in mind for this 'noview' flag, but you > should at least list the benefits of your approach. My question is: > why should we decide 'noview' for users? With my original approach, we > set '', for example, for ooffice formats. Then, if a user installs > openoffice, he can set the viewer to 'auto' and view the related > formats. Adding a 'allow view' check box for 'noview' formats can > mimic this behavior, but seems unnecessary.
We need the 'noview' flaag for a completely different reason: Currently we have in expandFormats() in MenuBackend.C: // we need to hide the default graphic export formats // from the external menu, because we need them only // for the internal lyx-view and external latex run if (label == "EPS" || label == "XPM" || label == "PNG") continue; This hardcoding is wrong, if you need e.g. a eps -> bmp converter in a converter chain you will suddenly have a menu entry View->BMP. If we flag the formats that are "export formats" we don't need this hardcoding anymore. A nice side effect is that you can also use it for the auto view stuff: By default, we flag all pure image formats as internal formats. We also detect all formats that can be autoviewed, and only those formats that are not internal and can be autoviewed will be shown in the menu. Your ooffice example would not require any setting by the user: It would be listed as viewable format, and when ooffice is installed it will be detected as autoviewable and show up in the menu. Summary: Since we need this flag anyway we can as well use it for auto-view, and don't need to clutter the configure script with the "auto" viewer. Does this answer your question? Georg