From 9ecf6723bc913430e81d038ee944941505291a22 Mon Sep 17 00:00:00 2001 From: Michael Schmitt Date: Sun, 29 Oct 2006 22:50:24 +0000 Subject: [PATCH] * src/frontends/Toolbars.h: * 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 --- lib/ui/default.ui | 1 - src/frontends/LyXView.C | 10 ++++++---- src/frontends/Toolbars.C | 4 ++-- src/frontends/Toolbars.h | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/ui/default.ui b/lib/ui/default.ui index 66c0b4d4b5..737fcf18cb 100644 --- a/lib/ui/default.ui +++ b/lib/ui/default.ui @@ -38,5 +38,4 @@ Toolbars "table" "table,bottom" "math" "math,bottom" "minibuffer" "off,bottom" - "review" "review,top" End diff --git a/src/frontends/LyXView.C b/src/frontends/LyXView.C index a793d80fdc..fe5b702ecd 100644 --- a/src/frontends/LyXView.C +++ b/src/frontends/LyXView.C @@ -287,13 +287,15 @@ BufferView * LyXView::view() const 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. diff --git a/src/frontends/Toolbars.C b/src/frontends/Toolbars.C index 4d2ed7cfa8..6529298628 100644 --- a/src/frontends/Toolbars.C +++ b/src/frontends/Toolbars.C @@ -65,7 +65,7 @@ void Toolbars::display(string const & name, bool show) } -void Toolbars::update(bool in_math, bool in_table, bool change_tracking) +void Toolbars::update(bool in_math, bool in_table, bool review) { update(); @@ -79,7 +79,7 @@ void Toolbars::update(bool in_math, bool in_table, bool change_tracking) else if (cit->flags & ToolbarBackend::TABLE) displayToolbar(*cit, in_table); else if (cit->flags & ToolbarBackend::REVIEW) - displayToolbar(*cit, change_tracking); + displayToolbar(*cit, review); } } diff --git a/src/frontends/Toolbars.h b/src/frontends/Toolbars.h index 7fe1c57e24..4ea55274e5 100644 --- a/src/frontends/Toolbars.h +++ b/src/frontends/Toolbars.h @@ -84,7 +84,7 @@ public: 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);