]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiInfo.cpp
Use QMessageBox for toggleWarning if possible
[lyx.git] / src / frontends / qt4 / GuiInfo.cpp
index 130317130d84bba8500ab0f45b2cdfc6fa7c451d..8994b9431e8fdb54fbe41fafb3b325a5356a2c1b 100644 (file)
@@ -23,6 +23,7 @@
 #include "insets/InsetInfo.h"
 
 #include "support/debug.h"
+#include "support/gettext.h"
 #include "support/lstrings.h"
 
 
@@ -89,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