- // remove empty items and duplicates
- list.erase(std::remove(list.begin(), list.end(), ""), list.end());
- eliminate_duplicates(list);
+QString guiName(string const & type, BufferParams const & bp)
+{
+ if (type == "tableofcontents")
+ return qt_("Table of Contents");
+ if (type == "child")
+ return qt_("Child Documents");
+ if (type == "graphics")
+ return qt_("List of Graphics");
+ if (type == "equation")
+ return qt_("List of Equations");
+ if (type == "footnote")
+ return qt_("List of Footnotes");
+ if (type == "listing")
+ return qt_("List of Listings");
+ if (type == "index")
+ return qt_("List of Indexes");
+ if (type == "marginalnote")
+ return qt_("List of Marginal notes");
+ if (type == "note")
+ return qt_("List of Notes");
+ if (type == "citation")
+ return qt_("List of Citations");
+ if (type == "label")
+ return qt_("Labels and References");
+ if (type == "branch")
+ return qt_("List of Branches");
+ if (type == "change")
+ return qt_("List of Changes");
+
+ FloatList const & floats = bp.documentClass().floats();
+ if (floats.typeExist(type))
+ return qt_(floats.getType(type).listName());
+
+ return qt_(type);