]> git.lyx.org Git - features.git/commitdiff
Implement the Edit>Floats menu
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 3 Nov 2000 15:22:04 +0000 (15:22 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 3 Nov 2000 15:22:04 +0000 (15:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1193 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
lib/ui/default.ui
src/LyXAction.C
src/commandtags.h
src/lyxfunc.C

index fdbac9efed347fc92c946361ad74cf594ae03962..451234e62c964fcf6c3d92b2215269f07594c366 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2000-11-03  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * 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  <lahaye@postech.edu>
 
        * lib/ui/default.ui: update again the menu layout (fix some
index 6617c379ecb1796c36d1d6edbafced2cf389d9fd..ca97dff7cba5650d4eca67dbc696869c6c25e981 100644 (file)
@@ -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"
index d89f4ffd39000c1f2ce300e4c15c59f57b3810c1..5c0dc92f4b3b236145f79783ef51bb7ba2998752 100644 (file)
@@ -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",
index 0ea038588b53a728104d9d25a483430c6627a9dc..c84d89f27043c0655b1a87a6c1876f8eb9319369 100644 (file)
@@ -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,
index 1d82d1de9aa69ee002428d78cd7e48b5db24c44e..9a64088e7feb9ec16ec8a784582c15a87a2258e0 100644 (file)
@@ -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();