]> git.lyx.org Git - lyx.git/blobdiff - src/MenuBackend.C
* remove various xforms relicts, in particular:
[lyx.git] / src / MenuBackend.C
index 3c334aadf1529a85955195797285ebac9b82c1e5..aeb5162691fce7df53c093dc7a1673d66c1b0bbf 100644 (file)
@@ -504,23 +504,24 @@ void expandFormats(MenuItem::Kind kind, Menu & tomenu, LyXView const * view)
                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:
+               case MenuItem::UpdateFormats:
+                       if (!(*fit)->documentFormat())
                                continue;
+                       break;
+               default:
+                       BOOST_ASSERT(false);
+                       break;
                }
                if (!(*fit)->shortcut().empty())
                        label += '|' + (*fit)->shortcut();