From 3b9f84afb31578ca39f518cb68c86072ffc86bf6 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Mon, 29 Apr 2002 09:50:34 +0000 Subject: [PATCH] (Herbert): rather ugly hard-coded fix to hide some graphics formats from the 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 | 5 +++++ src/MenuBackend.C | 9 +++++++++ src/frontends/controllers/ChangeLog | 5 +++++ src/frontends/controllers/ControlSendto.C | 8 ++++++-- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6613cec435..f4c673a223 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,11 @@ * BufferView_pimpl.C (Dispatch): Check that float type exists when inserting list of floats. +2002-04-25 Herbert Voss + + * MenuBackend.C (expand): don't add the graphics extensions to the + export menu + 2002-04-24 Jean-Marc Lasgouttes * CutAndPaste.C (SwitchLayoutsBetweenClasses): when converting a diff --git a/src/MenuBackend.C b/src/MenuBackend.C index b852d14c3c..e3c7687777 100644 --- a/src/MenuBackend.C +++ b/src/MenuBackend.C @@ -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"); diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 638359f286..3f8f2fb261 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,8 @@ +2002-04-25 Herbert Voss + + * ControlSendto.C (allFormats): don't add the graphics extensions to the + export menu + 2002-04-22 Angus Leeming * biblio.C (getAbbreviatedAuthor, getYear): Deal with sub-standard diff --git a/src/frontends/controllers/ControlSendto.C b/src/frontends/controllers/ControlSendto.C index 7c9f320e34..93e1467f0b 100644 --- a/src/frontends/controllers/ControlSendto.C +++ b/src/frontends/controllers/ControlSendto.C @@ -70,9 +70,13 @@ vector 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)); - } } } -- 2.39.2