+ if (kind == MenuItem::ImportFormats) {
+ if ((*fit)->name() == "text")
+ label = _("ASCII text as lines");
+ else if ((*fit)->name() == "textparagraph")
+ label = _("ASCII text as paragraphs");
+ label += "...";
+ }
+ if (!(*fit)->shortcut().empty())
+ label += '|' + (*fit)->shortcut();
+ int const action2 = lyxaction.
+ getPseudoAction(action, (*fit)->name());
+ tomenu.add(MenuItem(MenuItem::Command, label, action2));
+ }
+}
+
+
+void expandFloatListInsert(Menu & tomenu, Buffer const * buf)
+{
+ if (!buf) {
+ tomenu.add(MenuItem(MenuItem::Command,
+ _("No Documents Open!"), LFUN_NOACTION));
+ return;
+ }
+
+ FloatList const & floats = buf->params.getLyXTextClass().floats();
+ FloatList::const_iterator cit = floats.begin();
+ FloatList::const_iterator end = floats.end();
+ for (; cit != end; ++cit) {
+ int const action = lyxaction
+ .getPseudoAction(LFUN_FLOAT_LIST, cit->second.type());
+ tomenu.add(MenuItem(MenuItem::Command,
+ _(cit->second.listName()),
+ action));
+ }
+}
+
+
+void expandFloatInsert(Menu & tomenu, Buffer const * buf)
+{
+ if (!buf) {
+ tomenu.add(MenuItem(MenuItem::Command,
+ _("No Documents Open!"), LFUN_NOACTION));
+ return;
+ }
+
+ FloatList const & floats = buf->params.getLyXTextClass().floats();
+ FloatList::const_iterator cit = floats.begin();
+ FloatList::const_iterator end = floats.end();
+ for (; cit != end; ++cit) {
+ // normal float
+ int const action =
+ lyxaction.getPseudoAction(LFUN_INSET_FLOAT,
+ cit->second.type());
+ string const label = _(cit->second.name());
+ tomenu.add(MenuItem(MenuItem::Command, label, action));
+ }
+}