]> git.lyx.org Git - features.git/commitdiff
GuiInfo: implement checkWidgets.
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 1 Apr 2015 08:07:20 +0000 (10:07 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 1 Apr 2015 08:07:20 +0000 (10:07 +0200)
src/frontends/qt4/GuiInfo.cpp
src/frontends/qt4/GuiInfo.h

index dcc5ee9855cbc53dfe052b3692794650686e6cee..8994b9431e8fdb54fbe41fafb3b325a5356a2c1b 100644 (file)
@@ -90,6 +90,16 @@ docstring GuiInfo::dialogToParams() const
 }
 
 
+bool GuiInfo::checkWidgets(bool readonly) const
+{
+       nameLE->setReadOnly(readonly);
+       typeCO->setEnabled(!readonly);
+       if (!InsetParamsWidget::checkWidgets())
+               return false;
+       return !nameLE->text().isEmpty();
+}
+
+
 } // namespace frontend
 } // namespace lyx
 
index 8911172c0aa64142dadd5f7286848a01362775e9..4d3e2965313ec105466807b88575d208e07f5ebb 100644 (file)
@@ -35,6 +35,7 @@ private:
        FuncCode creationCode() const { return LFUN_INFO_INSERT; }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
+       bool checkWidgets(bool readonly = false) const;
        //@}
 };