updateLayoutChoice();
updateWindowTitle();
updateStatusBar();
+ updateTab();
busy(false);
work_area_->redraw();
}
updateToolbars();
updateLayoutChoice();
updateWindowTitle();
+ updateTab();
if (loaded) {
connectBuffer(*work_area_->bufferView().buffer());
showErrorList("Parse");
bufferChangedConnection_ =
buf.changed.connect(
- boost::bind(&WorkArea::redraw, work_area_));
+ boost::bind(&WorkArea::redraw, work_area_, _1));
errorsConnection_ =
buf.errors.connect(
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();
- toolbars_->update(math, table);
+ bool const review =
+ lyx::getStatus(FuncRequest(LFUN_CHANGES_TRACK)).enabled() &&
+ lyx::getStatus(FuncRequest(LFUN_CHANGES_TRACK)).onoff(true);
+
+ 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.
}
+ToolbarBackend::Flags LyXView::getToolbarState(string const & name)
+{
+ return toolbars_->getToolbarState(name);
+}
+
+
+void LyXView::toggleToolbarState(string const & name)
+{
+ // it is possible to get current toolbar status like this,...
+ // but I decide to obey the order of ToolbarBackend::flags
+ // and disregard real toolbar status.
+ // toolbars_->saveToolbarInfo();
+ //
+ // toggle state on/off/auto
+ toolbars_->toggleToolbarState(name);
+ // update toolbar
+ updateToolbars();
+}
+
+
void LyXView::updateMenubar()
{
menubar_->update();
void LyXView::updateWindowTitle()
{
- static docstring last_title = lyx::from_ascii("LyX");
docstring maximize_title = lyx::from_ascii("LyX");
docstring minimize_title = lyx::from_ascii("LyX");
}
}
- if (maximize_title != last_title) {
- setWindowTitle(maximize_title, minimize_title);
- last_title = maximize_title;
- }
+ setWindowTitle(maximize_title, minimize_title);
}