From 0a7705a6736a85c3c751f7b4e9998833cdb71fc9 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Thu, 31 Dec 2009 16:47:36 +0000 Subject: [PATCH] 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 --- src/frontends/qt4/GuiLabel.cpp | 7 +++++++ src/frontends/qt4/GuiLabel.h | 4 ++++ 2 files changed, 11 insertions(+) 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: ///