]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFloatList.cpp
Change inset label from ": filename" to "Program Listing: filename" for listings...
[lyx.git] / src / insets / InsetFloatList.cpp
index 745712a34b96f7d6ca90a6074678afaa7505012f..dd8cf315fa5773489442c5ebe828f893fd8acd6f 100644 (file)
@@ -68,7 +68,7 @@ bool InsetFloatList::isCompatibleCommand(string const & s)
 
 docstring InsetFloatList::screenLabel() const
 {
-       FloatList const & floats = buffer().params().textClass().floats();
+       FloatList const & floats = buffer().params().documentClass().floats();
        FloatList::const_iterator it = floats[to_ascii(getParam("type"))];
        if (it != floats.end())
                return buffer().B_(it->second.listName());
@@ -85,7 +85,8 @@ void InsetFloatList::write(ostream & os) const
 
 void InsetFloatList::read(Lexer & lex)
 {
-       FloatList const & floats = buffer().params().textClass().floats();
+       lex.setContext("InsetFloatList::read");
+       FloatList const & floats = buffer().params().documentClass().floats();
        string token;
 
        if (lex.eatLine()) {
@@ -93,9 +94,9 @@ void InsetFloatList::read(Lexer & lex)
                LYXERR(Debug::INSETS, "FloatList::float_type: "
                                      << to_ascii(getParam("type")));
                if (!floats.typeExist(to_ascii(getParam("type"))))
-                       lex.printError("InsetFloatList: Unknown float type: `$$Token'");
+                       lex.printError("Unknown float type");
        } else {
-               lex.printError("InsetFloatList: Parse error: `$$Token'");
+               lex.printError("Parse error");
        }
 
        while (lex.isOK()) {
@@ -105,15 +106,14 @@ void InsetFloatList::read(Lexer & lex)
                        break;
        }
        if (token != "\\end_inset") {
-               lex.printError("Missing \\end_inset at this point. "
-                              "Read: `$$Token'");
+               lex.printError("Missing \\end_inset at this point.");
        }
 }
 
 
 int InsetFloatList::latex(odocstream & os, OutputParams const &) const
 {
-       FloatList const & floats = buffer().params().textClass().floats();
+       FloatList const & floats = buffer().params().documentClass().floats();
        FloatList::const_iterator cit = floats[to_ascii(getParam("type"))];
 
        if (cit != floats.end()) {