mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
branch: Refresh the contents of some dialogs when the document is read-only.
Update the view also when the document is read-only. see r32694. Update the GuiInfo dialog also when the document is read-only. A dialog that does not dispatch a single LFUN (see getLfun()) but is buffer dependent (see isBufferDependent()) should implement the canApply function (if I'm correct). see r32695. Update the GuiLabel view when the document is read-only. Also disable the text field. see r32696. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32802 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
58ca8035bb
commit
0c3357e510
@ -221,7 +221,7 @@ Inset const * Dialog::inset(InsetCode code) const
|
||||
|
||||
void Dialog::checkStatus()
|
||||
{
|
||||
// buffer independant dialogs are always active.
|
||||
// buffer independent dialogs are always active.
|
||||
// This check allows us leave canApply unimplemented for some dialogs.
|
||||
if (!isBufferDependent()) {
|
||||
updateView();
|
||||
@ -241,9 +241,7 @@ void Dialog::checkStatus()
|
||||
// refreshReadOnly() is too generous in _enabling_ widgets
|
||||
// update dialog to disable disabled widgets again
|
||||
|
||||
if (!readonly || canApplyToReadOnly())
|
||||
updateView();
|
||||
|
||||
updateView();
|
||||
} else
|
||||
enableView(false);
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
void dispatchParams() {}
|
||||
void enableView(bool enable);
|
||||
bool isBufferDependent() const { return true; }
|
||||
bool canApply() const { return true; }
|
||||
//@}
|
||||
|
||||
private Q_SLOTS:
|
||||
|
@ -79,6 +79,13 @@ void GuiLabel::applyView()
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GuiLabel::enableView(bool enable)
|
||||
{
|
||||
keywordED->setEnabled(enable);
|
||||
}
|
||||
|
||||
|
||||
bool GuiLabel::isValid()
|
||||
{
|
||||
return !keywordED->text().isEmpty();
|
||||
|
@ -47,6 +47,10 @@ private:
|
||||
void dispatchParams();
|
||||
///
|
||||
bool isBufferDependent() const { return true; }
|
||||
///
|
||||
void enableView(bool enable);
|
||||
///
|
||||
bool canApply() const { return true; }
|
||||
|
||||
private:
|
||||
///
|
||||
|
@ -114,6 +114,8 @@ What's new
|
||||
- Update the status bar after starting LyX and closing the last document.
|
||||
|
||||
- Do not paint the cursor after resizing if it is invisible (bug 6332).
|
||||
|
||||
- Refresh the contents of some dialogs when the document is read-only.
|
||||
|
||||
|
||||
* DOCUMENTATION AND LOCALIZATION
|
||||
|
Loading…
Reference in New Issue
Block a user