]> git.lyx.org Git - lyx.git/commitdiff
se Floating::listName() as title of
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 28 Jul 2005 14:36:16 +0000 (14:36 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 28 Jul 2005 14:36:16 +0000 (14:36 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10369 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/MenuBackend.C

index 2566c7779cd626d1896191c745e01f02dc95f321..763ab97ceebc5268edd32c59c97024bd9c59277f 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-28  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * MenuBackend.C (expandToc): use Floating::listName() as title of
+       the floats submenus.
+
 2005-07-27  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * toc.[Ch]: Do not use translatable strings (bug 1870).
index 97fd3a7d4f0300539641adc7092907e321b9622c..b2eb7ba10d3972215c88bac93894a1a0a8eb3bc4 100644 (file)
@@ -666,7 +666,9 @@ void expandToc(Menu & tomenu, LyXView const * view)
        // know that all the entries in a TOC will be have status_ ==
        // OK, so we avoid this unnecessary overhead (JMarc)
 
-       if (!view->buffer()) {
+
+       Buffer const * buf = view->buffer();
+       if (!buf) {
                tomenu.add(MenuItem(MenuItem::Command,
                                    _("No Documents Open!"),
                                    FuncRequest(LFUN_NOACTION)),
@@ -674,7 +676,8 @@ void expandToc(Menu & tomenu, LyXView const * view)
                return;
        }
 
-       lyx::toc::TocList toc_list = lyx::toc::getTocList(*view->buffer());
+       FloatList const & floatlist = buf->params().getLyXTextClass().floats();
+       lyx::toc::TocList toc_list = lyx::toc::getTocList(*buf);
        lyx::toc::TocList::const_iterator cit = toc_list.begin();
        lyx::toc::TocList::const_iterator end = toc_list.end();
        for (; cit != end; ++cit) {
@@ -692,8 +695,7 @@ void expandToc(Menu & tomenu, LyXView const * view)
                                           label,
                                           FuncRequest(ccit->action())));
                }
-               string const & floatName = cit->first;
-               // Is the _(...) really needed here? (Lgb)
+               string const & floatName = floatlist.getType(cit->first).listName();
                MenuItem item(MenuItem::Submenu, _(floatName));
                item.submenu(menu.release());
                tomenu.add(item);