]> git.lyx.org Git - features.git/commitdiff
(Herbert): rather ugly hard-coded fix to hide some graphics formats from the
authorAngus Leeming <leeming@lyx.org>
Mon, 29 Apr 2002 09:50:34 +0000 (09:50 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 29 Apr 2002 09:50:34 +0000 (09:50 +0000)
export menu and from the custom-export dialog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4085 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/MenuBackend.C
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlSendto.C

index 6613cec435bcab7b3d76b34dca58750d4a68c344..f4c673a223fc4755d92e481b6b8436a432dc2514 100644 (file)
@@ -3,6 +3,11 @@
        * BufferView_pimpl.C (Dispatch): Check that float type exists when 
        inserting list of floats.
 
+2002-04-25  Herbert Voss  <voss@lyx.org>
+
+       * MenuBackend.C (expand): don't add the graphics extensions to the
+       export menu
+
 2002-04-24  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
 
        * CutAndPaste.C (SwitchLayoutsBetweenClasses): when converting a
index b852d14c3c304ae190128e0c4d217c46dc181077..e3c76877775b27f266dbec01c1f82b9ed7499639 100644 (file)
@@ -353,6 +353,15 @@ void Menu::expand(Menu & tomenu, Buffer * buf) const
                                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 (cit->kind() == MenuItem::ImportFormats)
                                        if ((*fit)->name() == "text")
                                                label = _("Ascii text as lines");
index 638359f286d4395516bfb9a64621426276bb34fe..3f8f2fb261851ace69d5e865ee76ecd717e61129 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-25  Herbert Voss  <voss@lyx.org>
+
+       * ControlSendto.C (allFormats): don't add the graphics extensions to the
+       export menu
+
 2002-04-22  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * biblio.C (getAbbreviatedAuthor, getYear): Deal with sub-standard
index 7c9f320e345b7b971322134314e65ffcebcd5d97..93e1467f0b3e16012179918e707ce72c876fc2a4 100644 (file)
@@ -70,9 +70,13 @@ vector<Format const *> const ControlSendto::allFormats() const
                Formats::const_iterator fo_it  = formats.begin();
                Formats::const_iterator fo_end = formats.end();
                for (; fo_it != fo_end; ++fo_it) {
-                       if (converters.isReachable(*ex_it, fo_it->name())) {
+                       // 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
+                       string const name = fo_it->name();
+                       if (name != "eps" && name != "xpm" && name != "png" &&
+                           converters.isReachable(*ex_it, name))
                                to.push_back(&(*fo_it));
-                       }
                }
        }