From: Vincent van Ravesteijn Date: Thu, 31 Dec 2009 16:47:36 +0000 (+0000) Subject: Update the GuiLabel view when the document is read-only. Also disable the text field. X-Git-Tag: 2.0.0~4657 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0a7705a6736a85c3c751f7b4e9998833cdb71fc9;p=lyx.git Update the GuiLabel view when the document is read-only. Also disable the text field. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32696 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiLabel.cpp b/src/frontends/qt4/GuiLabel.cpp index 8a4a7c26fa..8c46909f9e 100644 --- a/src/frontends/qt4/GuiLabel.cpp +++ b/src/frontends/qt4/GuiLabel.cpp @@ -79,6 +79,13 @@ void GuiLabel::applyView() } + +void GuiLabel::enableView(bool enable) +{ + keywordED->setEnabled(enable); +} + + bool GuiLabel::isValid() { return !keywordED->text().isEmpty(); diff --git a/src/frontends/qt4/GuiLabel.h b/src/frontends/qt4/GuiLabel.h index ef59bfd530..64a9a0e8a1 100644 --- a/src/frontends/qt4/GuiLabel.h +++ b/src/frontends/qt4/GuiLabel.h @@ -47,6 +47,10 @@ private: void dispatchParams(); /// bool isBufferDependent() const { return true; } + /// + void enableView(bool enable); + /// + bool canApply() const { return true; } private: ///