* src/frontends/Toolbars.C: rename change_tracking to review
* lib/ui/default.ui: remove duplicate "review" toolbar
* src/frontends/LyXView.C: implement context-sensitivity for
the review toolbar
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15610
a592a061-630c-0410-9148-
cb99ea01b6c8
"table" "table,bottom"
"math" "math,bottom"
"minibuffer" "off,bottom"
- "review" "review,top"
End
void LyXView::updateToolbars()
{
- bool const math = work_area_->bufferView().cursor().inMathed();
+ bool const math =
+ work_area_->bufferView().cursor().inMathed();
bool const table =
lyx::getStatus(FuncRequest(LFUN_LAYOUT_TABULAR)).enabled();
- // TODO: How should we handle the CT toolbar?
- bool const change_tracking = true;
+ bool const review =
+ lyx::getStatus(FuncRequest(LFUN_CHANGES_TRACK)).enabled() &&
+ lyx::getStatus(FuncRequest(LFUN_CHANGES_TRACK)).onoff(true);
- toolbars_->update(math, table, change_tracking);
+ toolbars_->update(math, table, review);
// update redaonly status of open dialogs. This could also be in
// updateMenubar(), but since updateToolbars() and updateMenubar()
// are always called together it is only here.
}
-void Toolbars::update(bool in_math, bool in_table, bool change_tracking)
+void Toolbars::update(bool in_math, bool in_table, bool review)
{
update();
else if (cit->flags & ToolbarBackend::TABLE)
displayToolbar(*cit, in_table);
else if (cit->flags & ToolbarBackend::REVIEW)
- displayToolbar(*cit, change_tracking);
+ displayToolbar(*cit, review);
}
}
void display(std::string const & name, bool show);
/// Update the state of the toolbars.
- void update(bool in_math, bool in_table, bool change_tracking);
+ void update(bool in_math, bool in_table, bool review);
/// Select the right layout in the combox.
void setLayout(std::string const & layout);