Bo Peng wrote: >> Bo> The "auto" viewer is just a walk around of lyx' current behavior, >> Bo> since if there is no viewer specified for pdf, view->pdflatex etc >> Bo> will disappear. >> >> But there is no point in keeping the old behaviour and working around >> it using configure.py tricks. > > Then, we should change MenuBackend ViewFormats to simply view > everything under windows.
No. You'll end up with a lot of unwanted entries then. > This might be achieved by changing the logic > in Graph::getReachable(). No, Graph is a graph class and should know nothing about windows and/or formats. > Still, changing configure.py is the easiest > solution. > > Let us wait for Georg's patch to configure.py. He said that he had a > better idea. I just finished the patch. It is tested and works. It adds a "noexport" flag to the format definition and removes the hardcoded exceptions for some image formats. With this patch you don't need to change configure.py anymore. This is going in tomorrow if I don't get objections. Georg
Index: src/format.C =================================================================== --- src/format.C (Revision 13733) +++ src/format.C (Arbeitskopie) @@ -84,9 +84,12 @@ bool operator<(Format const & a, Format return compare_ascii_no_case(a.prettyname(), b.prettyname()) < 0; } + Format::Format(string const & n, string const & e, string const & p, - string const & s, string const & v, string const & ed) - : name_(n), extension_(e), prettyname_(p), shortcut_(s), viewer_(v), editor_(ed) + string const & s, string const & v, string const & ed, + bool ex) + : name_(n), extension_(e), prettyname_(p), shortcut_(s), viewer_(v), + editor_(ed), exportable_(ex) {} @@ -167,22 +170,24 @@ int Formats::getNumber(string const & na void Formats::add(string const & name) { if (!getFormat(name)) - add(name, name, name, string(), string(), string()); + add(name, name, name, string(), string(), string(), true); } void Formats::add(string const & name, string const & extension, string const & prettyname, string const & shortcut, - string const & viewer, string const & editor) + string const & viewer, string const & editor, bool exportable) { FormatList::iterator it = find_if(formatlist.begin(), formatlist.end(), FormatNamesEqual(name)); if (it == formatlist.end()) formatlist.push_back(Format(name, extension, prettyname, - shortcut, viewer, editor)); + shortcut, viewer, editor, + exportable)); else - *it = Format(name, extension, prettyname, shortcut, viewer, editor); + *it = Format(name, extension, prettyname, shortcut, viewer, + editor, exportable); } Index: src/frontends/qt3/QPrefsDialog.C =================================================================== --- src/frontends/qt3/QPrefsDialog.C (Revision 13733) +++ src/frontends/qt3/QPrefsDialog.C (Arbeitskopie) @@ -187,6 +187,7 @@ QPrefsDialog::QPrefsDialog(QPrefs * form connect(fileformatsModule->extensionED, SIGNAL(textChanged(const QString&)), this, SLOT(fileformat_changed())); connect(fileformatsModule->viewerED, SIGNAL(textChanged(const QString&)), this, SLOT(fileformat_changed())); connect(fileformatsModule->editorED, SIGNAL(textChanged(const QString&)), this, SLOT(fileformat_changed())); + connect(fileformatsModule->exportCB, SIGNAL(toggled(bool)), this, SLOT(fileformat_changed())); connect(convertersModule->converterNewPB, SIGNAL(clicked()), this, SLOT(new_converter())); connect(convertersModule->converterRemovePB, SIGNAL(clicked()), this, SLOT(remove_converter())); @@ -727,6 +728,7 @@ void QPrefsDialog::switch_format(int nr) fileformatsModule->shortcutED->setText(toqstr(f.shortcut())); fileformatsModule->viewerED->setText(toqstr(f.viewer())); fileformatsModule->editorED->setText(toqstr(f.editor())); + fileformatsModule->exportCB->setChecked(f.exportable()); fileformatsModule->formatRemovePB->setEnabled( !form_->converters().formatIsUsed(f.name())); @@ -768,16 +770,18 @@ void QPrefsDialog::updateFormatsButtons( string const old_extension(f.extension()); string const old_viewer(f.viewer()); string const old_editor(f.editor()); + bool const old_exportable(f.exportable()); string const new_pretty(fromqstr(gui_name)); string const new_shortcut(fromqstr(fileformatsModule->shortcutED->text())); string const new_extension(fromqstr(fileformatsModule->extensionED->text())); string const new_viewer(fromqstr(fileformatsModule->viewerED->text())); string const new_editor(fromqstr(fileformatsModule->editorED->text())); + bool const new_exportable(fileformatsModule->exportCB->isChecked()); bool modified = ((old_pretty != new_pretty) || (old_shortcut != new_shortcut) || (old_extension != new_extension) || (old_viewer != new_viewer) - || (old_editor != new_editor)); + || (old_editor != new_editor)) || old_exportable != new_exportable; fileformatsModule->formatModifyPB->setEnabled( valid && known && modified && !known_otherwise); @@ -794,8 +798,10 @@ void QPrefsDialog::new_format() string const shortcut = fromqstr(fileformatsModule->shortcutED->text()); string const viewer = fromqstr(fileformatsModule->viewerED->text()); string const editor = fromqstr(fileformatsModule->editorED->text()); + bool const exportable = fileformatsModule->exportCB->isChecked(); - form_->formats().add(name, extension, prettyname, shortcut, viewer, editor); + form_->formats().add(name, extension, prettyname, shortcut, viewer, + editor, exportable); form_->formats().sort(); updateFormats(); fileformatsModule->formatsLB->setCurrentItem(form_->formats().getNumber(name)); @@ -823,8 +829,9 @@ void QPrefsDialog::modify_format() string const shortcut = fromqstr(fileformatsModule->shortcutED->text()); string const viewer = fromqstr(fileformatsModule->viewerED->text()); string const editor = fromqstr(fileformatsModule->editorED->text()); + bool const exportable = fileformatsModule->exportCB->isChecked(); - form_->formats().add(name, extension, prettyname, shortcut, viewer, editor); + form_->formats().add(name, extension, prettyname, shortcut, viewer, editor, exportable); form_->formats().sort(); fileformatsModule->formatsLB->setUpdatesEnabled(false); Index: src/frontends/qt3/ui/QPrefFileformatsModule.ui =================================================================== --- src/frontends/qt3/ui/QPrefFileformatsModule.ui (Revision 13733) +++ src/frontends/qt3/ui/QPrefFileformatsModule.ui (Arbeitskopie) @@ -14,7 +14,7 @@ <x>0</x> <y>0</y> <width>419</width> - <height>261</height> + <height>281</height> </rect> </property> <property stdset="1"> @@ -59,6 +59,25 @@ <cstring>editorED</cstring> </property> </widget> + <widget row="6" column="1" > + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>exportCB</cstring> + </property> + <property stdset="1"> + <name>enabled</name> + <bool>true</bool> + </property> + <property stdset="1"> + <name>text</name> + <string>Enable Ex&port to this format</string> + </property> + <property> + <name>toolTip</name> + <string>Enable Export to this format</string> + </property> + </widget> <widget row="2" column="1" > <class>QLineEdit</class> <property stdset="1"> @@ -133,6 +152,21 @@ <cstring>editorED</cstring> </property> </widget> + <widget row="6" column="0" > + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>exportLA</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Export:</string> + </property> + <property> + <name>buddy</name> + <cstring>exportCB</cstring> + </property> + </widget> <widget row="0" column="1" > <class>QLineEdit</class> <property stdset="1"> @@ -402,5 +436,6 @@ <tabstop>extensionED</tabstop> <tabstop>viewerED</tabstop> <tabstop>editorED</tabstop> + <tabstop>exportCB</tabstop> </tabstops> </UI> Index: src/frontends/qt4/QPrefsDialog.C =================================================================== --- src/frontends/qt4/QPrefsDialog.C (Revision 13733) +++ src/frontends/qt4/QPrefsDialog.C (Arbeitskopie) @@ -326,6 +326,7 @@ QPrefsDialog::QPrefsDialog(QPrefs * form connect(fileformatsModule->extensionED, SIGNAL(textChanged(const QString&)), this, SLOT(fileformat_changed())); connect(fileformatsModule->viewerED, SIGNAL(textChanged(const QString&)), this, SLOT(fileformat_changed())); connect(fileformatsModule->editorED, SIGNAL(textChanged(const QString&)), this, SLOT(fileformat_changed())); + connect(fileformatsModule->exportCB, SIGNAL(toggled(bool)), this, SLOT(fileformat_changed())); connect(fileformatsModule->formatNewPB, SIGNAL(clicked()), this, SLOT(change_adaptor())); connect(fileformatsModule->formatRemovePB, SIGNAL(clicked()), this, SLOT(change_adaptor())); connect(fileformatsModule->formatModifyPB, SIGNAL(clicked()), this, SLOT(change_adaptor())); @@ -850,6 +851,7 @@ void QPrefsDialog::switch_format(int nr) fileformatsModule->shortcutED->setText(toqstr(f.shortcut())); fileformatsModule->viewerED->setText(toqstr(f.viewer())); fileformatsModule->editorED->setText(toqstr(f.editor())); + fileformatsModule->exportCB->setChecked((f.exportable())); fileformatsModule->formatRemovePB->setEnabled( !form_->converters().formatIsUsed(f.name())); @@ -891,16 +893,18 @@ void QPrefsDialog::updateFormatsButtons( string const old_extension(f.extension()); string const old_viewer(f.viewer()); string const old_editor(f.editor()); + bool const old_exportable(f.exportable()); string const new_pretty(fromqstr(gui_name)); string const new_shortcut(fromqstr(fileformatsModule->shortcutED->text())); string const new_extension(fromqstr(fileformatsModule->extensionED->text())); string const new_viewer(fromqstr(fileformatsModule->viewerED->text())); string const new_editor(fromqstr(fileformatsModule->editorED->text())); + bool const new_exportable(fileformatsModule->exportCB->isChecked()); bool modified = ((old_pretty != new_pretty) || (old_shortcut != new_shortcut) || (old_extension != new_extension) || (old_viewer != new_viewer) - || (old_editor != new_editor)); + || (old_editor != new_editor) || old_exportable != new_exportable); fileformatsModule->formatModifyPB->setEnabled( valid && known && modified && !known_otherwise); @@ -917,8 +921,10 @@ void QPrefsDialog::new_format() string const shortcut = fromqstr(fileformatsModule->shortcutED->text()); string const viewer = fromqstr(fileformatsModule->viewerED->text()); string const editor = fromqstr(fileformatsModule->editorED->text()); + bool const exportable = fileformatsModule->exportCB->isChecked(); - form_->formats().add(name, extension, prettyname, shortcut, viewer, editor); + form_->formats().add(name, extension, prettyname, shortcut, viewer, + editor, exportable); form_->formats().sort(); updateFormats(); fileformatsModule->formatsLB->setCurrentItem(form_->formats().getNumber(name)); @@ -946,8 +952,10 @@ void QPrefsDialog::modify_format() string const shortcut = fromqstr(fileformatsModule->shortcutED->text()); string const viewer = fromqstr(fileformatsModule->viewerED->text()); string const editor = fromqstr(fileformatsModule->editorED->text()); + bool const exportable = fileformatsModule->exportCB->isChecked(); - form_->formats().add(name, extension, prettyname, shortcut, viewer, editor); + form_->formats().add(name, extension, prettyname, shortcut, viewer, + editor, exportable); form_->formats().sort(); fileformatsModule->formatsLB->setUpdatesEnabled(false); Index: src/frontends/qt4/ui/QPrefFileformatsUi.ui =================================================================== --- src/frontends/qt4/ui/QPrefFileformatsUi.ui (Revision 13733) +++ src/frontends/qt4/ui/QPrefFileformatsUi.ui (Arbeitskopie) @@ -9,7 +9,7 @@ <x>0</x> <y>0</y> <width>419</width> - <height>261</height> + <height>281</height> </rect> </property> <property name="windowTitle" > @@ -108,6 +108,19 @@ <item row="3" column="1" > <widget class="QLineEdit" name="extensionED" /> </item> + <item row="6" column="0" > + <widget class="QCheckBox" name="exportCB" > + <property name="enabled" > + <bool>true</bool> + </property> + <property name="toolTip" > + <string>Enable Export to this format</string> + </property> + <property name="text" > + <string>Enable Ex&port to this format</string> + </property> + </widget> + </item> </layout> </item> <item row="1" column="1" colspan="2" > @@ -275,6 +288,7 @@ <tabstop>extensionED</tabstop> <tabstop>viewerED</tabstop> <tabstop>editorED</tabstop> + <tabstop>exportCB</tabstop> </tabstops> <resources/> <connections/> Index: src/frontends/xforms/FormPreferences.C =================================================================== --- src/frontends/xforms/FormPreferences.C (Revision 13733) +++ src/frontends/xforms/FormPreferences.C (Arbeitskopie) @@ -1313,6 +1313,7 @@ void FormPreferences::Formats::build() setPrehandler(dialog_->input_viewer); setPrehandler(dialog_->input_editor); setPrehandler(dialog_->input_shrtcut); + setPrehandler(dialog_->check_export); } @@ -1345,6 +1346,9 @@ FormPreferences::Formats::feedback(FL_OB return _("Remove the current format from the list of available " "formats. Note: you must then \"Apply\" the change."); + if (ob == dialog_->check_export) + return _("Enable Export to this format."); + if (ob == dialog_->button_add) { if (string(ob->label) == _("Add")) return _("Add the current format to the list of available " @@ -1368,7 +1372,8 @@ bool FormPreferences::Formats::input(FL_ || ob == dialog_->input_shrtcut || ob == dialog_->input_extension || ob == dialog_->input_viewer - || ob == dialog_->input_editor) + || ob == dialog_->input_editor + || ob == dialog_->check_export) return Input(); if (ob == dialog_->button_add) @@ -1416,10 +1421,12 @@ bool FormPreferences::Formats::Add() string const shortcut = getString(dialog_->input_shrtcut); string const viewer = getString(dialog_->input_viewer); string const editor = getString(dialog_->input_editor); + bool const exportable = fl_get_button(dialog_->check_export); Format const * old = formats().getFormat(name); string const old_prettyname = old ? old->prettyname() : string(); - formats().add(name, extension, prettyname, shortcut, viewer, editor); + formats().add(name, extension, prettyname, shortcut, viewer, editor, + exportable); if (!old || prettyname != old_prettyname) { UpdateBrowser(); if (old) @@ -1447,6 +1454,7 @@ bool FormPreferences::Formats::Browser() fl_set_input(dialog_->input_extension, f.extension().c_str()); fl_set_input(dialog_->input_viewer, f.viewer().c_str()); fl_set_input(dialog_->input_editor, f.editor().c_str()); + fl_set_button(dialog_->check_export, f.exportable()); fl_set_object_label(dialog_->button_add, idex(_("Modify|#M")).c_str()); Index: src/frontends/xforms/forms/form_preferences.fd =================================================================== --- src/frontends/xforms/forms/form_preferences.fd (Revision 13733) +++ src/frontends/xforms/forms/form_preferences.fd (Arbeitskopie) @@ -1704,8 +1704,8 @@ argument: =============== FORM =============== Name: form_preferences_formats Width: 450 -Height: 400 -Number of Objects: 10 +Height: 440 +Number of Objects: 11 -------------------- class: FL_BOX @@ -1852,9 +1852,27 @@ callback: C_FormDialogView_InputCB argument: 0 -------------------- +class: FL_CHECKBUTTON +type: PUSH_BUTTON +box: 200 270 150 30 +boxtype: FL_NO_BOX +colors: FL_COL1 FL_YELLOW +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Enable Export to this format|#p +shortcut: +resize: FL_RESIZE_NONE +gravity: FL_West FL_West +name: check_export +callback: C_FormDialogView_InputCB +argument: 0 + +-------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 240 300 90 30 +box: 240 340 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -1872,7 +1890,7 @@ argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 340 300 90 30 +box: 340 340 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER Index: src/format.h =================================================================== --- src/format.h (Revision 13733) +++ src/format.h (Arbeitskopie) @@ -21,7 +21,8 @@ class Format { public: /// Format(std::string const & n, std::string const & e, std::string const & p, - std::string const & s, std::string const & v, std::string const & ed); + std::string const & s, std::string const & v, std::string const & ed, + bool ex); /// bool dummy() const; /// @@ -56,6 +57,10 @@ public: std::string const & editor() const { return editor_; } + /// + bool exportable() const { + return exportable_; + } private: std::string name_; /// @@ -68,6 +73,8 @@ private: std::string viewer_; /// std::string editor_; + /// + bool exportable_; }; @@ -99,8 +106,9 @@ public: void add(std::string const & name); /// void add(std::string const & name, std::string const & extension, - std::string const & prettyname, std::string const & shortcut, - std::string const & viewer, std::string const & editor); + std::string const & prettyname, std::string const & shortcut, + std::string const & viewer, std::string const & editor, + bool exportable); /// void erase(std::string const & name); /// Index: src/lyxrc.C =================================================================== --- src/lyxrc.C (Revision 13733) +++ src/lyxrc.C (Arbeitskopie) @@ -48,6 +48,7 @@ using lyx::support::expandPath; using lyx::support::getEnv; using lyx::support::libFileSearch; using lyx::support::token; +using lyx::support::tokenPos; using std::cout; using std::endl; @@ -1088,28 +1089,39 @@ int LyXRC::read(LyXLex & lexrc) shortcut = lexrc.getString(); } string viewer, editor; + if (lexrc.next()) + viewer = lexrc.getString(); + if (token(viewer, ' ', 0) == "none") + viewer.erase(); + if (lexrc.next()) + editor = lexrc.getString(); + if (token(editor, ' ', 0) == "none") + editor.erase(); + // The only supported flag for now is "noexport". + // More flags could be added in the future. + // Therefore we use tokenPos below to read the flag. + string flags; // Hack to ensure compatibility with versions older - // than 1.4.0 + // than 1.5.0 int le = lexrc.lex(); if (le != LyXLex::LEX_FEOF && le != LyXLex::LEX_UNDEF) { - viewer = lexrc.getString(); - if (le == LyXLex::LEX_DATA) { - if (token(viewer, ' ', 0) == "none") - viewer.erase(); - if (lexrc.next()) { - editor = lexrc.getString(); - if (token(editor, ' ', 0) == "none") - editor.erase(); - } - } else { + flags = lexrc.getString(); + if (le != LyXLex::LEX_DATA) { // We have got a known token. // Therefore this is an old style // format definition without - // viewer and editor. - lexrc.pushToken(viewer); - viewer.erase(); + // flags. + lexrc.pushToken(flags); + flags.erase(); } } + bool const exportable = + (tokenPos(flags, ',', "noexport") < 0); + if (!flags.empty() && flags != "noexport") + lyxerr << "Ignoring flags other than " + "`noexport' in `" << flags + << "' for format `" << format << "'." + << endl; if (prettyname.empty()) { if (converters.formatIsUsed(format)) { lyxerr << "Can't delete format " @@ -1119,7 +1131,7 @@ int LyXRC::read(LyXLex & lexrc) } } else { formats.add(format, extension, prettyname, - shortcut, viewer, editor); + shortcut, viewer, editor, exportable); } break; } @@ -2013,7 +2025,7 @@ void LyXRC::write(ostream & os, bool ign << "#\n\n"; case RC_FORMAT: - // New/modifed formats + // New/modified formats for (Formats::const_iterator cit = formats.begin(); cit != formats.end(); ++cit) { Format const * format = @@ -2023,13 +2035,18 @@ void LyXRC::write(ostream & os, bool ign format->prettyname() != cit->prettyname() || format->shortcut() != cit->shortcut() || format->viewer() != cit->viewer() || - format->editor() != cit->editor()) + format->editor() != cit->editor() || + format->exportable() != cit->exportable()) { os << "\\format \"" << cit->name() << "\" \"" << cit->extension() << "\" \"" << cit->prettyname() << "\" \"" << cit->shortcut() << "\" \"" << cit->viewer() << "\" \"" - << cit->editor() << "\"\n"; + << cit->editor() << "\" \""; + if (!cit->exportable()) + os << "noexport"; + os << "\"\n"; + } } // Look for deleted formats Index: src/MenuBackend.C =================================================================== --- src/MenuBackend.C (Revision 13733) +++ src/MenuBackend.C (Arbeitskopie) @@ -492,9 +492,10 @@ void expandFormats(MenuItem::Kind kind, formats = Exporter::getExportableFormats(*view->buffer(), true); action = LFUN_UPDATE; break; - default: + case MenuItem::ExportFormats: formats = Exporter::getExportableFormats(*view->buffer(), false); action = LFUN_EXPORT; + break; } sort(formats.begin(), formats.end(), compare_format()); @@ -504,23 +505,22 @@ void expandFormats(MenuItem::Kind kind, if ((*fit)->dummy()) continue; string label = (*fit)->prettyname(); - // 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; - if (kind == MenuItem::ImportFormats) { + switch (kind) { + case MenuItem::ImportFormats: if ((*fit)->name() == "text") label = _("Plain Text as Lines"); else if ((*fit)->name() == "textparagraph") label = _("Plain Text as Paragraphs"); label += "..."; - } else if (kind == MenuItem::ExportFormats) { - // exporting to LyX does not make sense - // FIXME: Introduce noexport flag - if ((*fit)->name() == "lyx") + break; + case MenuItem::ViewFormats: + case MenuItem::ExportFormats: + if (!(*fit)->exportable()) continue; + break; + case MenuItem::UpdateFormats: + break; } if (!(*fit)->shortcut().empty()) label += '|' + (*fit)->shortcut(); Index: lib/configure.py =================================================================== --- lib/configure.py (Revision 13733) +++ lib/configure.py (Arbeitskopie) @@ -189,76 +189,76 @@ def checkLatex(): def checkFormatEntries(): ''' Check all formats (\Format entries) ''' checkProg('a Tgif viewer and editor', ['tgif'], - rc_entry = [ r'\Format tgif obj Tgif "" "%%" "%%"']) + rc_entry = [ r'\Format tgif obj Tgif "" "%%" "%%" ""']) # checkProg('a FIG viewer and editor', ['xfig'], - rc_entry = [ r'\Format fig fig FIG "" "%%" "%%"'] ) + rc_entry = [ r'\Format fig fig FIG "" "%%" "%%" ""'] ) # checkProg('a Grace viewer and editor', ['xmgrace'], - rc_entry = [ r'\Format agr agr Grace "" "%%" "%%"'] ) + rc_entry = [ r'\Format agr agr Grace "" "%%" "%%" ""'] ) # checkProg('a FEN viewer and editor', ['xboard -lpf $$i -mode EditPosition'], - rc_entry = [ r'\Format fen fen FEN "" "%%" "%%"' ]) + rc_entry = [ r'\Format fen fen FEN "" "%%" "%%" ""' ]) # path, iv = checkProg('a raster image viewer', ['xv', 'kview', 'gimp']) path, ie = checkProg('a raster image editor', ['gimp']) - addToRC(r'''\Format bmp bmp BMP "" "%s" "%s" -\Format gif gif GIF "" "%s" "%s" -\Format jpg jpg JPEG "" "%s" "%s" -\Format pbm pbm PBM "" "%s" "%s" -\Format pgm pgm PGM "" "%s" "%s" -\Format png png PNG "" "%s" "%s" -\Format ppm ppm PPM "" "%s" "%s" -\Format tiff tif TIFF "" "%s" "%s" -\Format xbm xbm XBM "" "%s" "%s" -\Format xpm xpm XPM "" "%s" "%s"''' % \ + addToRC(r'''\Format bmp bmp BMP "" "%s" "%s" "noexport" +\Format gif gif GIF "" "%s" "%s" "noexport" +\Format jpg jpg JPEG "" "%s" "%s" "noexport" +\Format pbm pbm PBM "" "%s" "%s" "noexport" +\Format pgm pgm PGM "" "%s" "%s" "noexport" +\Format png png PNG "" "%s" "%s" "noexport" +\Format ppm ppm PPM "" "%s" "%s" "noexport" +\Format tiff tif TIFF "" "%s" "%s" "noexport" +\Format xbm xbm XBM "" "%s" "%s" "noexport" +\Format xpm xpm XPM "" "%s" "%s" "noexport"''' % \ (iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie) ) # checkProg('a text editor', ['xemacs', 'gvim', 'kedit', 'kwrite', 'kate', \ 'nedit', 'gedit', 'notepad'], - rc_entry = [ r'''\Format asciichess asc "Plain text (chess output)" "" "" "%%" -\Format asciiimage asc "Plain text (image)" "" "" "%%" -\Format asciixfig asc "Plain text (Xfig output)" "" "" "%%" -\Format dateout tmp "date (output)" "" "" "%%" -\Format docbook sgml DocBook B "" "%%" -\Format docbook-xml xml "Docbook (XML)" "" "" "%%" -\Format literate nw NoWeb N "" "%%" -\Format latex tex "TeX (latex)" l "" "%%" -\Format linuxdoc sgml LinuxDoc x "" "%%" -\Format pdflatex tex "TeX (pdflatex)" "" "" "%%" -\Format text txt "Plain text" a "" "%%" -\Format textparagraph txt "Plain text (paragraphs)" "" "" "%%"''' ]) + rc_entry = [ r'''\Format asciichess asc "Plain text (chess output)" "" "" "%%" "" +\Format asciiimage asc "Plain text (image)" "" "" "%%" "" +\Format asciixfig asc "Plain text (Xfig output)" "" "" "%%" "" +\Format dateout tmp "date (output)" "" "" "%%" "" +\Format docbook sgml DocBook B "" "%%" "" +\Format docbook-xml xml "Docbook (XML)" "" "" "%%" "" +\Format literate nw NoWeb N "" "%%" "" +\Format latex tex "TeX (latex)" l "" "%%" "" +\Format linuxdoc sgml LinuxDoc x "" "%%" "" +\Format pdflatex tex "TeX (pdflatex)" "" "" "%%" "" +\Format text txt "Plain text" a "" "%%" "" +\Format textparagraph txt "Plain text (paragraphs)" "" "" "%%" ""''' ]) # #checkProg('a Postscript interpreter', ['gs'], # rc_entry = [ r'\ps_command "%%"' ]) checkProg('a Postscript previewer', ['gsview32', 'gv', 'ghostview -swap', 'kghostview'], - rc_entry = [ r'''\Format eps eps EPS "" "%%" "" -\Format ps ps Postscript t "%%" ""''' ]) + rc_entry = [ r'''\Format eps eps EPS "" "%%" "" "noexport" +\Format ps ps Postscript t "%%" "" ""''' ]) # checkProg('a PDF previewer', ['acrobat', 'acrord32', 'gsview32', \ 'acroread', 'gv', 'ghostview', 'xpdf', 'kpdf', 'kghostview'], - rc_entry = [ r'''\Format pdf pdf "PDF (ps2pdf)" P "%%" "" -\Format pdf2 pdf "PDF (pdflatex)" F "%%" "" -\Format pdf3 pdf "PDF (dvipdfm)" m "%%" ""''' ]) + rc_entry = [ r'''\Format pdf pdf "PDF (ps2pdf)" P "%%" "" "" +\Format pdf2 pdf "PDF (pdflatex)" F "%%" "" "" +\Format pdf3 pdf "PDF (dvipdfm)" m "%%" "" ""''' ]) # checkProg('a DVI previewer', ['xdvi', 'windvi', 'yap', 'kdvi'], - rc_entry = [ r'\Format dvi dvi DVI D "%%" ""' ]) + rc_entry = [ r'\Format dvi dvi DVI D "%%" "" ""' ]) # checkProg('a HTML previewer', ['mozilla file://$$p$$i', 'netscape'], - rc_entry = [ r'\Format html html HTML H "%%" ""' ]) + rc_entry = [ r'\Format html html HTML H "%%" "" ""' ]) # # entried that do not need checkProg - addToRC(r'''\Format date "" "date command" "" "" "" -\Format fax "" Fax "" "" "" -\Format lyx lyx LyX "" "" "" -\Format lyx13x lyx13 "LyX 1.3.x" "" "" "" -\Format lyxpreview lyxpreview "LyX Preview" "" "" "" -\Format pdftex pdftex_t PDFTEX "" "" "" -\Format program "" Program "" "" "" -\Format pstex pstex_t PSTEX "" "" "" -\Format sxw sxw "OpenOffice.Org Writer" O "" "" -\Format word doc "MS Word" W "" "" -\Format wordhtml html "MS Word (HTML)" "" "" "" + addToRC(r'''\Format date "" "date command" "" "" "" "" +\Format fax "" Fax "" "" "" "" +\Format lyx lyx LyX "" "" "" "noexport" +\Format lyx13x lyx13 "LyX 1.3.x" "" "" "" "" +\Format lyxpreview lyxpreview "LyX Preview" "" "" "" "" +\Format pdftex pdftex_t PDFTEX "" "" "" "" +\Format program "" Program "" "" "" "" +\Format pstex pstex_t PSTEX "" "" "" "" +\Format sxw sxw "OpenOffice.Org Writer" O "" "" "" +\Format word doc "MS Word" W "" "" "" +\Format wordhtml html "MS Word (HTML)" "" "" "" "" ''')