]> git.lyx.org Git - lyx.git/blobdiff - src/MenuBackend.cpp
This is the first of a series of commits that will make InsetLayout a real class.
[lyx.git] / src / MenuBackend.cpp
index 8d269f3e02e5761d1baff98aa1fc7ec22acade8b..9959bd0d4c083a2e3d0cd082bcc54eb00a0d86f1 100644 (file)
 #include "BufferParams.h"
 #include "Converter.h"
 #include "CutAndPaste.h"
-#include "support/debug.h"
 #include "Floating.h"
 #include "FloatList.h"
 #include "Format.h"
-#include "support/gettext.h"
 #include "KeyMap.h"
 #include "Session.h"
 #include "LyXAction.h"
 
 #include "frontends/Application.h"
 
+#include "support/convert.h"
+#include "support/debug.h"
 #include "support/filetools.h"
+#include "support/gettext.h"
 #include "support/lstrings.h"
-#include "support/convert.h"
 
 #include <boost/bind.hpp>
 
@@ -648,7 +648,7 @@ void expandFlexInsert(Menu & tomenu, Buffer const * buf, string s)
        InsetLayouts::const_iterator end = insetlayouts.end();
        for (; cit != end; ++cit) {
                docstring const label = cit->first;
-               if (cit->second.lyxtype == s)
+               if (cit->second.lyxtype() == s)
                        tomenu.addWithStatusCheck(MenuItem(MenuItem::Command, 
                                label, FuncRequest(LFUN_FLEX_INSERT,
                                                label)));
@@ -768,8 +768,18 @@ void expandToc(Menu & tomenu, Buffer const * buf)
                        label = _(floatName);
                // BUG3633: listings is not a proper float so its name
                // is not shown in floatlist.
+               else if (cit->first == "equation")
+                       label = _("List of Equations");
+               else if (cit->first == "index")
+                       label = _("List of Indexes");
                else if (cit->first == "listing")
-                       label = _("List of listings");
+                       label = _("List of Listings");
+               else if (cit->first == "marginalnote")
+                       label = _("List of Marginal notes");
+               else if (cit->first == "note")
+                       label = _("List of Notes");
+               else if (cit->first == "footnote")
+                       label = _("List of Foot notes");
                // this should not happen now, but if something else like
                // listings is added later, this can avoid an empty menu name.
                else