]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetfloatlist.C
(Herbert): strip the extension from the graphics filename when exporting
[lyx.git] / src / insets / insetfloatlist.C
index 8d2c565f094cfedad4a40994294d6208c7612f2e..cb2785b5197d4733287f9bb931d16d2538511da4 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "insetfloatlist.h"
 #include "FloatList.h"
+#include "LaTeXFeatures.h"
 #include "frontends/Dialogs.h"
 #include "LyXView.h"
 #include "BufferView.h"
@@ -23,7 +24,7 @@ InsetFloatList::InsetFloatList()
 {
 }
 
+
 InsetFloatList::InsetFloatList(string const & type)
        : InsetCommand(InsetCommandParams())
 {
@@ -31,12 +32,11 @@ InsetFloatList::InsetFloatList(string const & type)
 }
 
 
-string const InsetFloatList::getScreenLabel(Buffer const *) const 
+string const InsetFloatList::getScreenLabel(Buffer const *) const
 {
-       string const guiName = floatList[getCmdName()]->second.name();
+       string const guiName = floatList[getCmdName()]->second.listName();
        if (!guiName.empty()) {
-               string const res = guiName + _(" List");
-               return res;
+               return _(guiName);
        }
        return _("ERROR: Nonexistent float type!");
 }
@@ -54,7 +54,7 @@ void InsetFloatList::write(Buffer const *, ostream & os) const
 }
 
 
-void InsetFloatList::read(Buffer const *, LyXLex & lex) 
+void InsetFloatList::read(Buffer const *, LyXLex & lex)
 {
        string token;
 
@@ -105,7 +105,7 @@ int InsetFloatList::latex(Buffer const *, ostream & os, bool, bool) const
                        }
                } else {
                        os << "\\listof{" << getCmdName() << "}{"
-                          << _("List of ") << cit->second.name() << "}\n";
+                          << cit->second.listName() << "}\n";
                }
        } else {
                os << "%%\\listof{" << getCmdName() << "}{"
@@ -133,3 +133,9 @@ int InsetFloatList::ascii(Buffer const * buffer, ostream & os, int) const
        os << "\n";
        return 0;
 }
+
+
+void InsetFloatList::validate(LaTeXFeatures & features) const
+{
+       features.useFloat(getCmdName());
+}