Improve GSearch's sensitivity behaviour on readonly documents

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9037 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Spray 2004-10-03 12:31:38 +00:00
parent 3f4d7c6ac0
commit ac89ab9cfe
2 changed files with 10 additions and 3 deletions

View File

@ -62,6 +62,13 @@ void GSearch::doBuild()
}
void GSearch::update()
{
bc().refreshReadOnly();
onFindEntryChanged();
}
void GSearch::onFindNext()
{
controller().find(findentry->get_text(),
@ -101,8 +108,8 @@ void GSearch::onFindEntryChanged()
replaceallbutton->set_sensitive(false);
} else {
findnextbutton->set_sensitive(true);
replacebutton->set_sensitive(true);
replaceallbutton->set_sensitive(true);
replacebutton->set_sensitive(!readOnly());
replaceallbutton->set_sensitive(!readOnly());
}
}

View File

@ -27,7 +27,7 @@ public:
private:
virtual void apply() {}
virtual void doBuild();
virtual void update() {}
virtual void update();
void onFindNext();
void onReplace();