]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiLabel.cpp
rename buffer parameter math_number_before to math_numbering_side
[lyx.git] / src / frontends / qt4 / GuiLabel.cpp
index 6d9ee79daee40e912f591210b08bc146d1655f68..d5b207f7738ce426aa8b7f19e6c6d341b7b4d27b 100644 (file)
@@ -54,12 +54,23 @@ docstring GuiLabel::dialogToParams() const
 {
        InsetCommandParams params(insetCode());
        params["name"] = qstring_to_ucs4(keywordED->text());
-       return from_ascii(InsetLabel::params2string("label", params));
+       return from_utf8(InsetLabel::params2string(params));
 }
 
 
-bool GuiLabel::checkWidgets() const
+bool GuiLabel::initialiseParams(std::string const & data)
 {
+       InsetCommandParams p(insetCode());
+       if (!InsetCommand::string2params(data, p))
+               return false;
+       keywordED->setText(toqstr(p["name"]));
+       return true;
+}
+
+
+bool GuiLabel::checkWidgets(bool readonly) const
+{
+       keywordED->setReadOnly(readonly);
        if (!InsetParamsWidget::checkWidgets())
                return false;
        return !keywordED->text().isEmpty();