if (kind == MenuItem::ImportFormats) {
if ((*fit)->name() == "text")
- label = _("ASCII text as lines");
+ label = _("Plain Text as Lines");
else if ((*fit)->name() == "textparagraph")
- label = _("ASCII text as paragraphs");
+ label = _("Plain Text as Paragraphs");
label += "...";
}
if (!(*fit)->shortcut().empty())
// check whether depth is smaller than the smallest depth in toc.
int min_depth = 1000;
- for (lyx::toc::Toc::size_type i = from; i < to; ++i)
+ for (lyx::toc::Toc::size_type i = from; i < to; ++i)
min_depth = std::min(min_depth, toc_list[i].depth);
if (min_depth > depth)
depth = min_depth;
// 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)),
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) {
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);