- string const guiName = floatList[float_type]->second.name();
- if (!guiName.empty()) {
- string const res = _("List of ") + guiName;
- return res;
- }
- return _("ERROR nonexistant float type!");
+}
+
+
+InsetFloatList::InsetFloatList(string const & type)
+ : InsetCommand(InsetCommandParams())
+{
+ setCmdName(type);
+}
+
+
+InsetFloatList::~InsetFloatList()
+{
+ InsetCommandMailer mailer("toc", *this);
+ mailer.hideDialog();
+}
+
+
+string const InsetFloatList::getScreenLabel(Buffer const * buf) const
+{
+ FloatList const & floats = buf->params.getLyXTextClass().floats();
+ FloatList::const_iterator it = floats[getCmdName()];
+ if (it != floats.end())
+ return _(it->second.listName());
+ else
+ return _("ERROR: Nonexistent float type!");