Angus Leeming wrote: > On Thursday 25 April 2002 6:25 pm, Herbert Voss wrote: > >>we should hide the graphic export formats for the >>file->export menu. >> >>Herbert >> > > Don't you hate hard-coding such things? Anyway, while you're at it, you > should do the same for the Custom Export dialog (ControlSendt.C) ;-)
here it comes together with the one of the keep-option in vspace Herbert -- http://www.lyx.org/help/
Index: src/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.691 diff -u -r1.691 ChangeLog --- src/ChangeLog 24 Apr 2002 21:45:28 -0000 1.691 +++ src/ChangeLog 26 Apr 2002 14:38:06 -0000 @@ -1,3 +1,13 @@ +2002-04-25 Herbert Voss <[EMAIL PROTECTED]> + + * buffer.C (parseSingleLyXformat2Token): fix bug with ignored + "keep" option + +2002-04-25 Herbert Voss <[EMAIL PROTECTED]> + + * MenuBackend.C (expand): don't add the graphics extensions to the + export menu + 2002-04-24 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> * CutAndPaste.C (SwitchLayoutsBetweenClasses): when converting a Index: src/MenuBackend.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/MenuBackend.C,v retrieving revision 1.39 diff -u -r1.39 MenuBackend.C --- src/MenuBackend.C 4 Apr 2002 14:39:55 -0000 1.39 +++ src/MenuBackend.C 26 Apr 2002 14:38:06 -0000 @@ -316,6 +316,11 @@ case MenuItem::ExportFormats: { if (!buf && cit->kind() != MenuItem::ImportFormats) { + // 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; tomenu.add(MenuItem(MenuItem::Command, _("No Documents Open!"), LFUN_NOACTION)); @@ -353,6 +358,11 @@ 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: src/buffer.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.C,v retrieving revision 1.326 diff -u -r1.326 buffer.C --- src/buffer.C 24 Apr 2002 10:00:38 -0000 1.326 +++ src/buffer.C 26 Apr 2002 14:38:07 -0000 @@ -1031,15 +1031,21 @@ } else if (token == "\\added_space_top") { lex.nextToken(); VSpace value = VSpace(lex.getString()); + // only add the length when value > 0 or + // with option keep if ((value.length().len().value() != 0) || + value.keep() || (value.kind() != VSpace::LENGTH)) - par->params().spaceTop(value); + par->params().spaceTop(value); } else if (token == "\\added_space_bottom") { lex.nextToken(); VSpace value = VSpace(lex.getString()); + // only add the length when value > 0 or + // with option keep if ((value.length().len().value() != 0) || + value.keep() || (value.kind() != VSpace::LENGTH)) - par->params().spaceBottom(value); + par->params().spaceBottom(value); #ifndef NO_COMPABILITY #ifndef NO_PEXTRA_REALLY } else if (token == "\\pextra_type") { Index: src/frontends/controllers/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ChangeLog,v retrieving revision 1.164 diff -u -r1.164 ChangeLog --- src/frontends/controllers/ChangeLog 26 Apr 2002 14:35:03 -0000 1.164 +++ src/frontends/controllers/ChangeLog 26 Apr 2002 14:38:08 -0000 @@ -1,3 +1,8 @@ +2002-04-25 Herbert Voss <[EMAIL PROTECTED]> + + * MenuBackend.C (expand): don't add the graphics extensions to the + export menu + 2002-04-22 Angus Leeming <[EMAIL PROTECTED]> * biblio.C (getAbbreviatedAuthor, getYear): Deal with sub-standard Index: src/frontends/controllers/ControlSendto.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlSendto.C,v retrieving revision 1.4 diff -u -r1.4 ControlSendto.C --- src/frontends/controllers/ControlSendto.C 21 Mar 2002 21:21:27 -0000 1.4 +++ src/frontends/controllers/ControlSendto.C 26 Apr 2002 14:38:08 -0000 @@ -66,13 +66,17 @@ // Start off with the native export format. // "formats" is LyX's list of recognised formats to.push_back(formats.getFormat(*ex_it)); - + 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)); - } } }