From: Jean-Marc Lasgouttes Date: Fri, 3 Nov 2000 15:22:04 +0000 (+0000) Subject: Implement the Edit>Floats menu X-Git-Tag: 1.6.10~21843 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=70b76609333834b5367b20449a8bc1b2b3858743;p=features.git Implement the Edit>Floats menu git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1193 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/ChangeLog b/ChangeLog index fdbac9efed..451234e62c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-11-03 Jean-Marc Lasgouttes + + * lib/ui/default.ui: Populate "edit_float" menu + + * src/lyxfunc.C (Dispatch): implement LFUN_FLOATSOPERATE. + + * src/LyXAction.C (init): add new entry LFUN_FLOATSOPERATE, name + "floats-operate". The name is ugly (and the func also), but this + is just a band-aid until we switch to new insets. + 2000-11-03 Rob Lahaye * lib/ui/default.ui: update again the menu layout (fix some diff --git a/lib/ui/default.ui b/lib/ui/default.ui index 6617c379ec..ca97dff7cb 100644 --- a/lib/ui/default.ui +++ b/lib/ui/default.ui @@ -123,7 +123,14 @@ Menuset End Menu "edit_floats" - Item "? What should go here ?" "" + Item "Open/Close|O" "open-stuff" + Item "Melt|M" "melt" + Item "Open All Footnotes/Margin Notes|A" "floats-operate openfoot" + Item "Close All Footnotes/Margin Notes|C" "floats-operate closefoot" + Item "Open All Figures/Tables|F" "floats-operate openfig" + Item "Close All Figures/Tables|T" "floats-operate closefig" + Separator + Item "Remove all Error Boxes|R" "error-remove-all" End Menu "edit_tabular" diff --git a/src/LyXAction.C b/src/LyXAction.C index d89f4ffd39..5c0dc92f4b 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -226,6 +226,7 @@ void LyXAction::init() #endif { LFUN_INSET_MARGINAL, "marginalnote-insert", N_("Insert Marginalnote"), Noop }, + { LFUN_FLOATSOPERATE, "floats-operate", "", ReadOnly }, { LFUN_RIGHTSEL, "forward-select", N_("Select next char"), ReadOnly }, { LFUN_HFILL, "hfill-insert", diff --git a/src/commandtags.h b/src/commandtags.h index 0ea038588b..c84d89f270 100644 --- a/src/commandtags.h +++ b/src/commandtags.h @@ -52,6 +52,7 @@ enum kb_action { LFUN_TEX, LFUN_FOOTMELT, // schedule for deletion LFUN_MARGINMELT, // schedule for deletion + LFUN_FLOATSOPERATE, //schedule for deletion? LFUN_EMPH, LFUN_BOLD, LFUN_ROMAN, diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 1d82d1de9a..9a64088e7f 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -1185,6 +1185,20 @@ string const LyXFunc::Dispatch(int ac, Margin(owner->view()); owner->view()->setState(); break; +#endif +#ifndef NEW_INSETS + case LFUN_FLOATSOPERATE: + if (argument == "openfoot") + owner->view()->allFloats(1,0); + else if (argument == "closefoot") + owner->view()->allFloats(0,0); + else if (argument == "openfig") + owner->view()->allFloats(1,1); + else if (argument == "closefig") + owner->view()->allFloats(0,1); + break; +#else +#warning Find another implementation here (or another lyxfunc)! #endif case LFUN_HELP_COPYRIGHT: owner->getDialogs()->showCopyright();