>>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:
Georg> Angus Leeming wrote: >> Jean-Marc Lasgouttes wrote: >>> The two solutions I see are Figure/Table (use the GUIName of the >>> float) or "List of Figures"/"List of Tables" (we have this string >>> too). >> >>> Which one would you prefer? >> "List of Figures"/"List of Tables" Georg> Me too. Like this? Lars, is that OK, provided I add a changelog entry? JMarc
Index: src/MenuBackend.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/MenuBackend.C,v retrieving revision 1.106 diff -u -p -r1.106 MenuBackend.C --- src/MenuBackend.C 9 Jun 2005 09:58:05 -0000 1.106 +++ src/MenuBackend.C 28 Jul 2005 13:21:15 -0000 @@ -666,7 +666,9 @@ void expandToc(Menu & tomenu, LyXView co // 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 co 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,7 +695,7 @@ void expandToc(Menu & tomenu, LyXView co label, FuncRequest(ccit->action()))); } - string const & floatName = cit->first; + string const & floatName = floatlist.getType(cit->first).listName(); // Is the _(...) really needed here? (Lgb) MenuItem item(MenuItem::Submenu, _(floatName)); item.submenu(menu.release());