Implement GuiParagraph::enableView() for readonly documents. Does not fully work yet as the paragraph alignment are not updated with cursor position.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22861 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-08 16:08:45 +00:00
parent faf2f10824
commit 722023c413
2 changed files with 19 additions and 1 deletions

View File

@ -263,6 +263,22 @@ void GuiParagraph::updateView()
}
void GuiParagraph::enableView(bool enable)
{
indentCB->setEnabled(enable);
linespacing->setEnabled(enable);
labelWidth->setEnabled(enable);
synchronizedViewCB->setEnabled(enable);
applyPB->setEnabled(enable);
restorePB->setEnabled(enable);
if (!enable)
synchronizedViewCB->setChecked(true);
RadioMap::const_iterator it = radioMap.begin();
for (; it != radioMap.end(); ++it)
it->second->setEnabled(enable);
}
ParagraphParameters & GuiParagraph::params()
{
if (haveMulitParSelection()) {
@ -287,7 +303,7 @@ void GuiParagraph::dispatchParams()
if (haveMulitParSelection()) {
ostringstream data;
multiparsel_.write(data);
FuncRequest const fr(LFUN_PARAGRAPH_PARAMS_APPLY, data.str());
FuncRequest const fr(getLfun(), data.str());
dispatch(fr);
return;
}

View File

@ -48,7 +48,9 @@ public:
//@{
void updateView();
void dispatchParams();
void enableView(bool enable);
bool isBufferDependent() const { return true; }
virtual kb_action getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; }
//@}
private: