]> git.lyx.org Git - features.git/commitdiff
* src/frontends/Toolbars.h:
authorMichael Schmitt <michael.schmitt@teststep.org>
Sun, 29 Oct 2006 22:50:24 +0000 (22:50 +0000)
committerMichael Schmitt <michael.schmitt@teststep.org>
Sun, 29 Oct 2006 22:50:24 +0000 (22:50 +0000)
        * 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
src/frontends/LyXView.C
src/frontends/Toolbars.C
src/frontends/Toolbars.h

index 66c0b4d4b560013ec4032dbd858c9295a1c2ccc3..737fcf18cbecd1e426837ed7066511de473cdb67 100644 (file)
@@ -38,5 +38,4 @@ Toolbars
        "table" "table,bottom"
        "math" "math,bottom"
        "minibuffer" "off,bottom"
-       "review" "review,top"
 End
index a793d80fdc5f094292c10aec89e4ddcc507c67e5..fe5b702ecd74ccab65f4f913a17035cc87c3ed59 100644 (file)
@@ -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.
index 4d2ed7cfa8cb359e341489b723d05190ccf2103b..6529298628df4cf83a27717b1f0c49c4e4fbee2d 100644 (file)
@@ -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);
        }
 }
 
index 7fe1c57e2476edd9a3dd5df77b5a3774d2cf8ffe..4ea55274e5ba63decf3386000ad8e7cc32b0d2f5 100644 (file)
@@ -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);