]> git.lyx.org Git - features.git/commitdiff
FuncStatus::enabled(bool) --> FuncStatus::setEnabled(bool)
authorRichard Heck <rgheck@comcast.net>
Thu, 29 May 2008 15:14:00 +0000 (15:14 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 29 May 2008 15:14:00 +0000 (15:14 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24999 a592a061-630c-0410-9148-cb99ea01b6c8

37 files changed:
src/BufferView.cpp
src/FuncStatus.cpp
src/FuncStatus.h
src/LyXFunc.cpp
src/Text3.cpp
src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiView.cpp
src/frontends/qt4/Menus.cpp
src/insets/Inset.cpp
src/insets/InsetBibtex.cpp
src/insets/InsetBox.cpp
src/insets/InsetBranch.cpp
src/insets/InsetCaption.cpp
src/insets/InsetCollapsable.cpp
src/insets/InsetCommand.cpp
src/insets/InsetERT.cpp
src/insets/InsetExternal.cpp
src/insets/InsetFloat.cpp
src/insets/InsetGraphics.cpp
src/insets/InsetInclude.cpp
src/insets/InsetListings.cpp
src/insets/InsetNewline.cpp
src/insets/InsetNewpage.cpp
src/insets/InsetNote.cpp
src/insets/InsetSpace.cpp
src/insets/InsetTabular.cpp
src/insets/InsetVSpace.cpp
src/insets/InsetWrap.cpp
src/mathed/InsetMathAMSArray.cpp
src/mathed/InsetMathCases.cpp
src/mathed/InsetMathGrid.cpp
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathNest.cpp
src/mathed/InsetMathRef.cpp
src/mathed/InsetMathSplit.cpp
src/mathed/InsetMathSubstack.cpp
src/mathed/MathMacroTemplate.cpp

index a3f3672e5c0996d77813ec0f23e7223b3999c54b..13e90d23f7a3bb4dbfc6567c4b044346329a4556 100644 (file)
@@ -837,17 +837,17 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
        switch (cmd.action) {
 
        case LFUN_UNDO:
-               flag.enabled(buffer_.undo().hasUndoStack());
+               flag.setEnabled(buffer_.undo().hasUndoStack());
                break;
        case LFUN_REDO:
-               flag.enabled(buffer_.undo().hasRedoStack());
+               flag.setEnabled(buffer_.undo().hasRedoStack());
                break;
        case LFUN_FILE_INSERT:
        case LFUN_FILE_INSERT_PLAINTEXT_PARA:
        case LFUN_FILE_INSERT_PLAINTEXT:
        case LFUN_BOOKMARK_SAVE:
                // FIXME: Actually, these LFUNS should be moved to Text
-               flag.enabled(cur.inTexted());
+               flag.setEnabled(cur.inTexted());
                break;
        case LFUN_FONT_STATE:
        case LFUN_LABEL_INSERT:
@@ -865,7 +865,7 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
        case LFUN_BIBTEX_DATABASE_ADD:
        case LFUN_BIBTEX_DATABASE_DEL:
        case LFUN_STATISTICS:
-               flag.enabled(true);
+               flag.setEnabled(true);
                break;
 
        case LFUN_NEXT_INSET_TOGGLE: 
@@ -883,18 +883,18 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
        }
 
        case LFUN_LABEL_GOTO: {
-               flag.enabled(!cmd.argument().empty()
+               flag.setEnabled(!cmd.argument().empty()
                    || getInsetByCode<InsetRef>(cur, REF_CODE));
                break;
        }
 
        case LFUN_CHANGES_TRACK:
-               flag.enabled(true);
+               flag.setEnabled(true);
                flag.setOnOff(buffer_.params().trackChanges);
                break;
 
        case LFUN_CHANGES_OUTPUT:
-               flag.enabled(true);
+               flag.setEnabled(true);
                flag.setOnOff(buffer_.params().outputChanges);
                break;
 
@@ -906,7 +906,7 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
                // In principle, these command should only be enabled if there
                // is a change in the document. However, without proper
                // optimizations, this will inevitably result in poor performance.
-               flag.enabled(true);
+               flag.setEnabled(true);
                break;
 
        case LFUN_BUFFER_TOGGLE_COMPRESSION: {
@@ -919,25 +919,25 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
        case LFUN_SCROLL:
        case LFUN_SCREEN_UP_SELECT:
        case LFUN_SCREEN_DOWN_SELECT:
-               flag.enabled(true);
+               flag.setEnabled(true);
                break;
 
        case LFUN_LAYOUT_TABULAR:
-               flag.enabled(cur.innerInsetOfType(TABULAR_CODE));
+               flag.setEnabled(cur.innerInsetOfType(TABULAR_CODE));
                break;
 
        case LFUN_LAYOUT:
-               flag.enabled(!cur.inset().forceEmptyLayout(cur.idx()));
+               flag.setEnabled(!cur.inset().forceEmptyLayout(cur.idx()));
                break;
 
        case LFUN_LAYOUT_PARAGRAPH:
-               flag.enabled(cur.inset().allowParagraphCustomization(cur.idx()));
+               flag.setEnabled(cur.inset().allowParagraphCustomization(cur.idx()));
                break;
 
        case LFUN_INSET_SETTINGS: {
                InsetCode code = cur.inset().lyxCode();
                if (cmd.getArg(0) == insetName(code)) {
-                       flag.enabled(true);
+                       flag.setEnabled(true);
                        break;
                }
                bool enable = false;
@@ -958,12 +958,12 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
                        default:
                                break;
                }
-               flag.enabled(enable);
+               flag.setEnabled(enable);
                break;
        }
 
        case LFUN_DIALOG_SHOW_NEW_INSET:
-               flag.enabled(cur.inset().lyxCode() != ERT_CODE &&
+               flag.setEnabled(cur.inset().lyxCode() != ERT_CODE &&
                        cur.inset().lyxCode() != LISTINGS_CODE);
                if (cur.inset().lyxCode() == CAPTION_CODE) {
                        FuncStatus flag;
@@ -978,12 +978,12 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
                docstring const branchName = cmd.argument();
                if (!branchName.empty())
                        enable = buffer_.params().branchlist().find(branchName);
-               flag.enabled(enable);
+               flag.setEnabled(enable);
                break;
        }
 
        default:
-               flag.enabled(false);
+               flag.setEnabled(false);
        }
 
        return flag;
index f7b529b856056094394910345459edbdfa9b7b05..d56df61aa01e5130523e42623cd9af3349f75b38 100644 (file)
@@ -52,7 +52,7 @@ bool FuncStatus::unknown() const
 }
 
 
-void FuncStatus::enabled(bool b)
+void FuncStatus::setEnabled(bool b)
 {
        if (b)
                v_ &= ~DISABLED;
index 02949ed0bfd0f4839288ec32e370702adffc2d03..af2801389e8e2ca4cbf3b8b3644cf3b7cc9eec49 100644 (file)
@@ -59,7 +59,7 @@ public:
        bool unknown() const;
 
        ///
-       void enabled(bool b);
+       void setEnabled(bool b);
        /// tells whether it can be invoked (otherwise it will be grayed-out).
        bool enabled() const;
 
index c0c3eb0b15fcfa4fff5fa082bb97011dd5ddba77..ad802c7c2ca60862dbb5aa67b771cea5000c41b8 100644 (file)
@@ -389,7 +389,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
 
        if (cmd.action == LFUN_NOACTION) {
                flag.message(from_utf8(N_("Nothing to do")));
-               flag.enabled(false);
+               flag.setEnabled(false);
                return flag;
        }
 
@@ -399,7 +399,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        case LFUN_THESAURUS_ENTRY:
 #endif
                flag.unknown(true);
-               flag.enabled(false);
+               flag.setEnabled(false);
                break;
 
        default:
@@ -422,7 +422,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
                // no, exit directly
                flag.message(from_utf8(N_("Command not allowed with"
                                    "out any document open")));
-               flag.enabled(false);
+               flag.setEnabled(false);
                return flag;
        }
 
@@ -624,14 +624,14 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
        }
 
        if (!enable)
-               flag.enabled(false);
+               flag.setEnabled(false);
 
        // Can we use a readonly buffer?
        if (buf && buf->isReadonly()
            && !lyxaction.funcHasFlag(cmd.action, LyXAction::ReadOnly)
            && !lyxaction.funcHasFlag(cmd.action, LyXAction::NoBuffer)) {
                flag.message(from_utf8(N_("Document is read-only")));
-               flag.enabled(false);
+               flag.setEnabled(false);
        }
 
        // Are we in a DELETED change-tracking region?
@@ -640,7 +640,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
            && !lyxaction.funcHasFlag(cmd.action, LyXAction::ReadOnly)
            && !lyxaction.funcHasFlag(cmd.action, LyXAction::NoBuffer)) {
                flag.message(from_utf8(N_("This portion of the document is deleted.")));
-               flag.enabled(false);
+               flag.setEnabled(false);
        }
 
        // the default error message if we disable the command
index e787e08d07515cedb9a86a78a1db90cfe2dbbf16..5e91672f0aeeb7f1674073bcaea32fa34a1f1b61 100644 (file)
@@ -2298,7 +2298,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
            && (cur.empty() || !cur.inset().insetAllowed(code)))
                enable = false;
 
-       flag.enabled(enable);
+       flag.setEnabled(enable);
        return true;
 }
 
index eaeb6e138aeca5109e414841280eae804fbd632a..d3c8439492ed610d046dcaafc2ac070c669592db 100644 (file)
@@ -515,7 +515,7 @@ bool GuiApplication::getStatus(FuncRequest const & cmd, FuncStatus & flag) const
        }
 
        if (!enable)
-               flag.enabled(false);
+               flag.setEnabled(false);
 
        return true;
 }
index 565a4fcf75dfc60dc9ce5c81738ffd17d75328c5..90e33c36ab8ebf0d12b1605b92657eda77866e71 100644 (file)
@@ -1175,7 +1175,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
        }
 
        if (!enable)
-               flag.enabled(false);
+               flag.setEnabled(false);
 
        return true;
 }
index 928559999f91d5e6c5e5f911db9f0a8bb70f2660..6f8aba311a2efacd4dd55ca60fa546a20dde3d7e 100644 (file)
@@ -352,7 +352,7 @@ void MenuDefinition::addWithStatusCheck(MenuItem const & i)
                        }
                        if (enabled || !i.optional()) {
                                items_.push_back(i);
-                               items_.back().status().enabled(enabled);
+                               items_.back().status().setEnabled(enabled);
                        }
                }
                else
index b16dfb57acbfd3c28029b2dc28b36c484fd028fb..d83fc6629ddc029ae2a6f23ae2a2e683ce9f073b 100644 (file)
@@ -241,19 +241,19 @@ bool Inset::getStatus(Cursor &, FuncRequest const & cmd,
                // Allow modification of our data.
                // This needs to be handled in the doDispatch method of our
                // instantiatable children.
-               flag.enabled(true);
+               flag.setEnabled(true);
                return true;
 
        case LFUN_INSET_INSERT:
                // Don't allow insertion of new insets.
                // Every inset that wants to allow new insets from open
                // dialogs needs to override this.
-               flag.enabled(false);
+               flag.setEnabled(false);
                return true;
 
        case LFUN_INSET_TOGGLE:
                // remove this if we dissociate toggle from edit.
-               flag.enabled(editable() == IS_EDITABLE);
+               flag.setEnabled(editable() == IS_EDITABLE);
                return true;
 
        default:
index 7965242266b852fda45b543a8a57f8fde9b9b54d..38845a4a1674cab40f90b0a3923cc50b8bde0b2d 100644 (file)
@@ -108,7 +108,7 @@ bool InsetBibtex::getStatus(Cursor & cur, FuncRequest const & cmd,
 {
        switch (cmd.action) {
        case LFUN_INSET_EDIT:
-               flag.enabled(true);
+               flag.setEnabled(true);
                return true;
 
        default:
index b716e7dab456bffa9d3b5312719c0ddd6d0cc8ea..25911bc985f4f0b0612c1a0b4b8a0cc56e818652 100644 (file)
@@ -223,17 +223,17 @@ bool InsetBox::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "changetype")
                        flag.setOnOff(cmd.getArg(1) == params_.type);
-               flag.enabled(true);
+               flag.setEnabled(true);
                return true;
 
        case LFUN_INSET_DIALOG_UPDATE:
-               flag.enabled(true);
+               flag.setEnabled(true);
                return true;
 
        case LFUN_BREAK_PARAGRAPH:
                if (params_.inner_box || params_.type == "Framed")
                        return InsetCollapsable::getStatus(cur, cmd, flag);
-               flag.enabled(false);
+               flag.setEnabled(false);
                return true;
 
        default:
index d2dbc527dc6ea476311743d4527a6d13ffc99756..c0be8352b1790459f7b9d0beeb0a418d24f2929a 100644 (file)
@@ -168,20 +168,20 @@ bool InsetBranch::getStatus(Cursor & cur, FuncRequest const & cmd,
        switch (cmd.action) {
        case LFUN_INSET_MODIFY:
        case LFUN_INSET_DIALOG_UPDATE:
-               flag.enabled(true);
+               flag.setEnabled(true);
                break;
 
        case LFUN_INSET_TOGGLE:
                if (cmd.argument() == "open" || cmd.argument() == "close" ||
                    cmd.argument() == "toggle")
-                       flag.enabled(true);
+                       flag.setEnabled(true);
                else if (cmd.argument() == "assign" || cmd.argument().empty()) {
                        if (isBranchSelected())
-                               flag.enabled(status() != Open);
+                               flag.setEnabled(status() != Open);
                        else
-                               flag.enabled(status() != Collapsed);
+                               flag.setEnabled(status() != Collapsed);
                } else
-                       flag.enabled(true);
+                       flag.setEnabled(true);
                break;
 
        default:
index c3fb149bf963d17d3387c25997bd0b7880135fcc..7dca728ee8ff32f441e13d44648ec82255362a5e 100644 (file)
@@ -191,11 +191,11 @@ bool InsetCaption::getStatus(Cursor & cur, FuncRequest const & cmd,
 
        case LFUN_BREAK_PARAGRAPH:
        case LFUN_BREAK_PARAGRAPH_SKIP:
-               status.enabled(false);
+               status.setEnabled(false);
                return true;
 
        case LFUN_OPTIONAL_INSERT:
-               status.enabled(cur.paragraph().insetList().find(OPTARG_CODE) == -1);
+               status.setEnabled(cur.paragraph().insetList().find(OPTARG_CODE) == -1);
                return true;
 
        case LFUN_INSET_TOGGLE:
index c255d24709b367f42d91db9bcd62cfe43fc6e094..54530751e080cf34b61960002b4cc3fca3194b2c 100644 (file)
@@ -713,30 +713,30 @@ bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_TOC_INSERT:
        case LFUN_WRAP_INSERT:
                if (layout_->isPassThru()) {
-                       flag.enabled(false);
+                       flag.setEnabled(false);
                        return true;
                }
                return InsetText::getStatus(cur, cmd, flag);
 
        case LFUN_INSET_TOGGLE:
                if (cmd.argument() == "open")
-                       flag.enabled(status_ != Open);
+                       flag.setEnabled(status_ != Open);
                else if (cmd.argument() == "close")
-                       flag.enabled(status_ == Open);
+                       flag.setEnabled(status_ == Open);
                else if (cmd.argument() == "toggle" || cmd.argument().empty()) {
-                       flag.enabled(true);
+                       flag.setEnabled(true);
                        flag.setOnOff(status_ == Open);
                } else
-                       flag.enabled(false);
+                       flag.setEnabled(false);
                return true;
 
        case LFUN_LANGUAGE:
-               flag.enabled(!layout_->isForceLtr());
+               flag.setEnabled(!layout_->isForceLtr());
                return InsetText::getStatus(cur, cmd, flag);
 
        case LFUN_BREAK_PARAGRAPH:
        case LFUN_BREAK_PARAGRAPH_SKIP:
-               flag.enabled(layout_->isMultiPar());
+               flag.setEnabled(layout_->isMultiPar());
                return true;
 
        default:
index cf860e3079dfb0d51fdc1991f2b6bcbaeb5f0093..745cfeca8a1e0956ed43abbeeaf7d1c52a25bebc 100644 (file)
@@ -156,19 +156,19 @@ bool InsetCommand::getStatus(Cursor & cur, FuncRequest const & cmd,
        switch (cmd.action) {
        // suppress these
        case LFUN_ERT_INSERT:
-               status.enabled(false);
+               status.setEnabled(false);
                return true;
        // we handle these
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "changetype") {
                        string const newtype = cmd.getArg(1);
-                       status.enabled(p_.isCompatibleCommand(p_.code(), newtype));
+                       status.setEnabled(p_.isCompatibleCommand(p_.code(), newtype));
                        status.setOnOff(newtype == p_.getCmdName());
                } 
-               status.enabled(true);
+               status.setEnabled(true);
                return true;
        case LFUN_INSET_DIALOG_UPDATE:
-               status.enabled(true);
+               status.setEnabled(true);
                return true;
        default:
                return Inset::getStatus(cur, cmd, status);
index c11df694cdf790a9fce03b3eedff8664de0f6aa6..30a290510d3fb9e2e3aaee31e7e2e5605ca044f5 100644 (file)
@@ -141,7 +141,7 @@ bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd,
                case LFUN_PASTE:
                case LFUN_PRIMARY_SELECTION_PASTE:
                case LFUN_QUOTE_INSERT:
-                       status.enabled(true);
+                       status.setEnabled(true);
                        return true;
 
                // this one is difficult to get right. As a half-baked
index 63f7b7d96af293a52fd6af7c19f12e1854314e0f..42efa6d289d32958fe981fdb9f7decaffd3942bb 100644 (file)
@@ -468,7 +468,7 @@ bool InsetExternal::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_INSET_EDIT:
        case LFUN_INSET_MODIFY:
        case LFUN_INSET_DIALOG_UPDATE:
-               flag.enabled(true);
+               flag.setEnabled(true);
                return true;
 
        default:
index 2d923668032378411db308773fa780a0ad5f1ac6..a98d52170f57a932c5e43ea2bcb0f72da698e8f0 100644 (file)
@@ -180,7 +180,7 @@ bool InsetFloat::getStatus(Cursor & cur, FuncRequest const & cmd,
 
        case LFUN_INSET_MODIFY:
        case LFUN_INSET_DIALOG_UPDATE:
-               flag.enabled(true);
+               flag.setEnabled(true);
                return true;
 
        default:
index 640124a8600ec2fc668c9f3bf63f12897a927079..4a577c02cdce952543293af0b038e317df127a39 100644 (file)
@@ -230,7 +230,7 @@ bool InsetGraphics::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_INSET_EDIT:
        case LFUN_INSET_MODIFY:
        case LFUN_INSET_DIALOG_UPDATE:
-               flag.enabled(true);
+               flag.setEnabled(true);
                return true;
 
        default:
index 87741831e631c62d4bf35a04e645d8fb4e356a6c..fee3bc22913863f8397c3a0b94ab32eda6b48aa1 100644 (file)
@@ -304,7 +304,7 @@ bool InsetInclude::getStatus(Cursor & cur, FuncRequest const & cmd,
 
        case LFUN_INSET_EDIT:
        case LFUN_INSET_MODIFY:
-               flag.enabled(true);
+               flag.setEnabled(true);
                return true;
 
        default:
index 94909a054a1efbda3af5006cb43cf5a62e7a4403..a2cb9851a40148092aa1b67baa144682e04a0c6a 100644 (file)
@@ -231,10 +231,10 @@ bool InsetListings::getStatus(Cursor & cur, FuncRequest const & cmd,
        switch (cmd.action) {
                case LFUN_INSET_MODIFY:
                case LFUN_INSET_DIALOG_UPDATE:
-                       status.enabled(true);
+                       status.setEnabled(true);
                        return true;
                case LFUN_CAPTION_INSERT:
-                       status.enabled(!params().isInline());
+                       status.setEnabled(!params().isInline());
                        return true;
                default:
                        return InsetCollapsable::getStatus(cur, cmd, status);
index cd48f96a515308fcf02e366733cbecc44e4708d1..62be1d3ca87e2f909b1cab6929de57236768d743 100644 (file)
@@ -116,7 +116,7 @@ bool InsetNewline::getStatus(Cursor & cur, FuncRequest const & cmd,
                        string2params(to_utf8(cmd.argument()), params);
                        status.setOnOff(params_.kind == params.kind);
                }
-               status.enabled(true);
+               status.setEnabled(true);
                return true;
        default:
                return Inset::getStatus(cur, cmd, status);
index 7a6667a8e536989cc5ead60f8eb0a6765e1c2da8..9cb680c6849007c1ccfe3b036880b0fda889a5cf 100644 (file)
@@ -164,7 +164,7 @@ bool InsetNewpage::getStatus(Cursor & cur, FuncRequest const & cmd,
                        string2params(to_utf8(cmd.argument()), params);
                        status.setOnOff(params_.kind == params.kind);
                } 
-               status.enabled(true);
+               status.setEnabled(true);
                return true;
        default:
                return Inset::getStatus(cur, cmd, status);
index c8dededc59efd2b55677973ab1e85fc4de771cff..c44d637a56ca55a1e2ba718ebca2233f71a52d80 100644 (file)
@@ -202,7 +202,7 @@ bool InsetNote::getStatus(Cursor & cur, FuncRequest const & cmd,
 
        case LFUN_INSET_MODIFY:
                // disallow comment and greyed out in commands
-               flag.enabled(!cur.paragraph().layout().isCommand() ||
+               flag.setEnabled(!cur.paragraph().layout().isCommand() ||
                                cmd.getArg(2) == "Note");
                if (cmd.getArg(0) == "note") {
                        InsetNoteParams params;
@@ -212,7 +212,7 @@ bool InsetNote::getStatus(Cursor & cur, FuncRequest const & cmd,
                return true;
 
        case LFUN_INSET_DIALOG_UPDATE:
-               flag.enabled(true);
+               flag.setEnabled(true);
                return true;
 
        default:
index 89325bae7c0c1a4d216bd821f1d8ed6c6e0699a6..8667fae83762a686dfd1a0aef51bc3de672b512b 100644 (file)
@@ -159,7 +159,7 @@ bool InsetSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
                        string2params(to_utf8(cmd.argument()), params);
                        status.setOnOff(params_.kind == params.kind);
                }
-               status.enabled(true);
+               status.setEnabled(true);
                return true;
        default:
                return Inset::getStatus(cur, cmd, status);
index e49c2a7a6d420999ddfcb0a69b42b1f97a4c51dd..462029dabeee61e960648d9dfd62c27b5ff42ab8 100644 (file)
@@ -2745,7 +2745,7 @@ bool InsetTableCell::getStatus(Cursor & cur, FuncRequest const & cmd,
        default:
                return InsetText::getStatus(cur, cmd, status);
        }
-       status.enabled(enabled);
+       status.setEnabled(enabled);
        return true;
 }
 
@@ -3550,33 +3550,33 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
                        return true;
 
                case Tabular::MULTICOLUMN:
-                       status.enabled(sel_row_start == sel_row_end);
+                       status.setEnabled(sel_row_start == sel_row_end);
                        status.setOnOff(tabular.isMultiColumn(cur.idx()));
                        break;
 
                case Tabular::SET_ALL_LINES:
                case Tabular::UNSET_ALL_LINES:
                case Tabular::SET_BORDER_LINES:
-                       status.enabled(!tabular.ltCaption(tabular.cellRow(cur.idx())));
+                       status.setEnabled(!tabular.ltCaption(tabular.cellRow(cur.idx())));
                        break;
 
                case Tabular::TOGGLE_LINE_TOP:
-                       status.enabled(!tabular.ltCaption(tabular.cellRow(cur.idx())));
+                       status.setEnabled(!tabular.ltCaption(tabular.cellRow(cur.idx())));
                        status.setOnOff(tabular.topLine(cur.idx()));
                        break;
 
                case Tabular::TOGGLE_LINE_BOTTOM:
-                       status.enabled(!tabular.ltCaption(tabular.cellRow(cur.idx())));
+                       status.setEnabled(!tabular.ltCaption(tabular.cellRow(cur.idx())));
                        status.setOnOff(tabular.bottomLine(cur.idx()));
                        break;
 
                case Tabular::TOGGLE_LINE_LEFT:
-                       status.enabled(!tabular.ltCaption(tabular.cellRow(cur.idx())));
+                       status.setEnabled(!tabular.ltCaption(tabular.cellRow(cur.idx())));
                        status.setOnOff(tabular.leftLine(cur.idx()));
                        break;
 
                case Tabular::TOGGLE_LINE_RIGHT:
-                       status.enabled(!tabular.ltCaption(tabular.cellRow(cur.idx())));
+                       status.setEnabled(!tabular.ltCaption(tabular.cellRow(cur.idx())));
                        status.setOnOff(tabular.rightLine(cur.idx()));
                        break;
 
@@ -3599,7 +3599,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
                        break;
 
                case Tabular::ALIGN_BLOCK:
-                       status.enabled(!tabular.getPWidth(cur.idx()).zero());
+                       status.setEnabled(!tabular.getPWidth(cur.idx()).zero());
                        status.setOnOff(tabular.getAlignment(cur.idx(), flag) == LYX_ALIGN_BLOCK);
                        break;
 
@@ -3693,7 +3693,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
                        break;
 
                case Tabular::TOGGLE_LTCAPTION:
-                       status.enabled(sel_row_start == sel_row_end);
+                       status.setEnabled(sel_row_start == sel_row_end);
                        status.setOnOff(tabular.ltCaption(sel_row_start));
                        break;
 
@@ -3707,7 +3707,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
 
                default:
                        status.clear();
-                       status.enabled(false);
+                       status.setEnabled(false);
                        break;
                }
                return true;
@@ -3716,7 +3716,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
        // These are only enabled inside tabular
        case LFUN_CELL_BACKWARD:
        case LFUN_CELL_FORWARD:
-               status.enabled(true);
+               status.setEnabled(true);
                return true;
 
        // disable these with multiple cells selected
@@ -3738,7 +3738,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_WRAP_INSERT:
        case LFUN_ERT_INSERT: {
                if (tablemode(cur)) {
-                       status.enabled(false);
+                       status.setEnabled(false);
                        return true;
                } else
                        return cell(cur.idx())->getStatus(cur, cmd, status);
@@ -3749,7 +3749,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_BREAK_PARAGRAPH:
        case LFUN_BREAK_PARAGRAPH_SKIP: {
                if (tabular.getPWidth(cur.idx()).zero()) {
-                       status.enabled(false);
+                       status.setEnabled(false);
                        return true;
                } else
                        return cell(cur.idx())->getStatus(cur, cmd, status);
@@ -3757,14 +3757,14 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
 
        case LFUN_PASTE:
                if (tabularStackDirty() && theClipboard().isInternal()) {
-                       status.enabled(true);
+                       status.setEnabled(true);
                        return true;
                } else
                        return cell(cur.idx())->getStatus(cur, cmd, status);
 
        case LFUN_INSET_MODIFY:
                if (insetCode(cmd.getArg(0)) == TABULAR_CODE) {
-                       status.enabled(true);
+                       status.setEnabled(true);
                        return true;
                }
                // Fall through
index f93a7e2ee65f00274553169ba3255d2edd76bee1..e109896ed2edc165d0217cf8b26dcabb91a82e83 100644 (file)
@@ -90,7 +90,7 @@ bool InsetVSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
                        InsetVSpace::string2params(to_utf8(cmd.argument()), vspace);
                        status.setOnOff(vspace == space_);
                } 
-               status.enabled(true);
+               status.setEnabled(true);
                return true;
        default:
                return Inset::getStatus(cur, cmd, status);
index 92dddaf489ae9ce548ab688adaaf615c787f3539..ad5036a26a9e4e5814c4a9a43e19e097136755de 100644 (file)
@@ -107,7 +107,7 @@ bool InsetWrap::getStatus(Cursor & cur, FuncRequest const & cmd,
        switch (cmd.action) {
        case LFUN_INSET_MODIFY:
        case LFUN_INSET_DIALOG_UPDATE:
-               flag.enabled(true);
+               flag.setEnabled(true);
                return true;
 
        default:
index 3a8c3783806f18d94dc2998f70c73b581633ea6a..3a615d987acacfc02546cb209d8db10e44c6f8e1 100644 (file)
@@ -109,7 +109,7 @@ bool InsetMathAMSArray::getStatus(Cursor & cur, FuncRequest const & cmd,
                if (s == "add-vline-left" || s == "add-vline-right") {
                        flag.message(bformat(
                                from_utf8(N_("Can't add vertical grid lines in '%1$s'")),       name_));
-                       flag.enabled(false);
+                       flag.setEnabled(false);
                        return true;
                }
                return InsetMathGrid::getStatus(cur, cmd, flag);
index 6ade4d2ebe875d6eacc725b769a7a6e7e6e6d8a8..63a78848c2e7a7ae81b580b58858597665f3a0a6 100644 (file)
@@ -92,7 +92,7 @@ bool InsetMathCases::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_TABULAR_FEATURE: {
                docstring const & s = cmd.argument();
                if (s == "add-vline-left" || s == "add-vline-right") {
-                       flag.enabled(false);
+                       flag.setEnabled(false);
                        flag.message(bformat(
                                from_utf8(N_("No vertical grid lines in 'cases': feature %1$s")),
                                s));
index 683235e748e8da3e12f2f33dfa5b25db39a0bb79..0d2460f617ad8c4608cc1cd0abcab1f63e14d55c 100644 (file)
@@ -1341,13 +1341,13 @@ bool InsetMathGrid::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_TABULAR_FEATURE: {
                string const s = to_utf8(cmd.argument());
                if (nrows() <= 1 && (s == "delete-row" || s == "swap-row")) {
-                       status.enabled(false);
+                       status.setEnabled(false);
                        status.message(from_utf8(N_("Only one row")));
                        return true;
                }
                if (ncols() <= 1 &&
                    (s == "delete-column" || s == "swap-column")) {
-                       status.enabled(false);
+                       status.setEnabled(false);
                        status.message(from_utf8(N_("Only one column")));
                        return true;
                }
@@ -1355,7 +1355,7 @@ bool InsetMathGrid::getStatus(Cursor & cur, FuncRequest const & cmd,
                     s == "delete-hline-above") ||
                    (rowinfo_[cur.row() + 1].lines_ == 0 &&
                     s == "delete-hline-below")) {
-                       status.enabled(false);
+                       status.setEnabled(false);
                        status.message(from_utf8(N_("No hline to delete")));
                        return true;
                }
@@ -1364,7 +1364,7 @@ bool InsetMathGrid::getStatus(Cursor & cur, FuncRequest const & cmd,
                     s == "delete-vline-left") ||
                    (colinfo_[cur.col() + 1].lines_ == 0 &&
                     s == "delete-vline-right")) {
-                       status.enabled(false);
+                       status.setEnabled(false);
                        status.message(from_utf8(N_("No vline to delete")));
                        return true;
                }
@@ -1379,9 +1379,9 @@ bool InsetMathGrid::getStatus(Cursor & cur, FuncRequest const & cmd,
                    s == "copy-column" || s == "swap-column" ||
                    s == "add-vline-left" || s == "add-vline-right" ||
                    s == "delete-vline-left" || s == "delete-vline-right")
-                       status.enabled(true);
+                       status.setEnabled(true);
                else {
-                       status.enabled(false);
+                       status.setEnabled(false);
                        status.message(bformat(
                                from_utf8(N_("Unknown tabular feature '%1$s'")), lyx::from_ascii(s)));
                }
@@ -1412,18 +1412,18 @@ bool InsetMathGrid::getStatus(Cursor & cur, FuncRequest const & cmd,
                        break;
                }
                status.setOnOff(cmd.argument()[0] == v_align_);
-               status.enabled(true);
+               status.setEnabled(true);
 #endif
                return true;
        }
 
        case LFUN_CELL_SPLIT:
-               status.enabled(true);
+               status.setEnabled(true);
                return true;
 
        case LFUN_CELL_BACKWARD:
        case LFUN_CELL_FORWARD:
-               status.enabled(true);
+               status.setEnabled(true);
                return true;
 
        default:
index c9e540bed6ca8c88190728d2baf12277eccf39e3..f5c2cabce36b1c5b883569d6aef3c49183afa72b 100644 (file)
@@ -1299,12 +1299,12 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_MATH_MUTATE:
        case LFUN_MATH_DISPLAY:
                // we handle these
-               status.enabled(true);
+               status.setEnabled(true);
                return true;
        case LFUN_MATH_NUMBER_TOGGLE:
                // FIXME: what is the right test, this or the one of
                // LABEL_INSERT?
-               status.enabled(display());
+               status.setEnabled(display());
                status.setOnOff(numberedType());
                return true;
        case LFUN_MATH_NUMBER_LINE_TOGGLE: {
@@ -1313,16 +1313,16 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
                bool const enable = (type_ == hullMultline) ?
                        (nrows() - 1 == cur.row()) : display();
                row_type const r = (type_ == hullMultline) ? nrows() - 1 : cur.row();
-               status.enabled(enable);
+               status.setEnabled(enable);
                status.setOnOff(numbered(r));
                return true;
        }
        case LFUN_LABEL_INSERT:
-               status.enabled(type_ != hullSimple);
+               status.setEnabled(type_ != hullSimple);
                return true;
        case LFUN_INSET_INSERT:
                if (cmd.getArg(0) == "label") {
-                       status.enabled(type_ != hullSimple);
+                       status.setEnabled(type_ != hullSimple);
                        return true;
                }
                return InsetMathGrid::getStatus(cur, cmd, status);
@@ -1337,7 +1337,7 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
                        status.message(bformat(
                                from_utf8(N_("Can't change number of rows in '%1$s'")),
                                hullName(type_)));
-                       status.enabled(false);
+                       status.setEnabled(false);
                        return true;
                }
                if (!colChangeOK()
@@ -1347,7 +1347,7 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
                        status.message(bformat(
                                from_utf8(N_("Can't change number of columns in '%1$s'")),
                                hullName(type_)));
-                       status.enabled(false);
+                       status.setEnabled(false);
                        return true;
                }
                if ((type_ == hullSimple
@@ -1357,20 +1357,20 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
                        status.message(bformat(
                                from_utf8(N_("Can't add horizontal grid lines in '%1$s'")),
                                hullName(type_)));
-                       status.enabled(false);
+                       status.setEnabled(false);
                        return true;
                }
                if (s == "add-vline-left" || s == "add-vline-right") {
                        status.message(bformat(
                                from_utf8(N_("Can't add vertical grid lines in '%1$s'")),
                                hullName(type_)));
-                       status.enabled(false);
+                       status.setEnabled(false);
                        return true;
                }
                if (s == "valign-top" || s == "valign-middle"
                 || s == "valign-bottom" || s == "align-left"
                 || s == "align-center" || s == "align-right") {
-                       status.enabled(false);
+                       status.setEnabled(false);
                        return true;
                }
                return InsetMathGrid::getStatus(cur, cmd, status);
index c63bcfeec32ecdbfd820b686ab58a59367a82c88..3ebeafb79853e387ad29de038c0fdacc4559a507 100644 (file)
@@ -1161,7 +1161,7 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd,
        string const arg = to_utf8(cmd.argument());
        switch (cmd.action) {
        case LFUN_TABULAR_FEATURE:
-               flag.enabled(false);
+               flag.setEnabled(false);
                break;
 #if 0
        case LFUN_TABULAR_FEATURE:
@@ -1192,7 +1192,7 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_FONT_NOUN:
        case LFUN_FONT_ROMAN:
        case LFUN_FONT_DEFAULT:
-               flag.enabled(true);
+               flag.setEnabled(true);
                break;
        case LFUN_MATH_MUTATE:
                //flag.setOnOff(mathcursor::formula()->hullType() == to_utf8(cmd.argument()));
@@ -1204,11 +1204,11 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_MATH_SPACE:
        case LFUN_MATH_LIMITS:
        case LFUN_MATH_EXTERN:
-               flag.enabled(true);
+               flag.setEnabled(true);
                break;
 
        case LFUN_FONT_FRAK:
-               flag.enabled(currentMode() != TEXT_MODE);
+               flag.setEnabled(currentMode() != TEXT_MODE);
                break;
 
        case LFUN_MATH_INSERT: {
@@ -1219,12 +1219,12 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd,
                        arg == "\\textsl"   || arg == "\\textup" ||
                        arg == "\\texttt"   || arg == "\\textbb" ||
                        arg == "\\textnormal";
-               flag.enabled(currentMode() != TEXT_MODE || textarg);
+               flag.setEnabled(currentMode() != TEXT_MODE || textarg);
                break;
        }
 
        case LFUN_MATH_MATRIX:
-               flag.enabled(currentMode() == MATH_MODE);
+               flag.setEnabled(currentMode() == MATH_MODE);
                break;
 
        case LFUN_INSET_INSERT: {
@@ -1232,31 +1232,31 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd,
                // getStatus is not called with a valid reference and the
                // dialog would not be applyable.
                string const name = cmd.getArg(0);
-               flag.enabled(name == "ref");
+               flag.setEnabled(name == "ref");
                break;
        }
 
        case LFUN_MATH_DELIM:
        case LFUN_MATH_BIGDELIM:
                // Don't do this with multi-cell selections
-               flag.enabled(cur.selBegin().idx() == cur.selEnd().idx());
+               flag.setEnabled(cur.selBegin().idx() == cur.selEnd().idx());
                break;
                
        case LFUN_MATH_MACRO_FOLD:
        case LFUN_MATH_MACRO_UNFOLD: {
                Cursor it = cur;
                bool found = findMacroToFoldUnfold(it, cmd.action == LFUN_MATH_MACRO_FOLD);
-               flag.enabled(found);
+               flag.setEnabled(found);
                break;
        }
                
        case LFUN_SPECIALCHAR_INSERT:
                // FIXME: These would probably make sense in math-text mode
-               flag.enabled(false);
+               flag.setEnabled(false);
                break;
 
        case LFUN_INSET_DISSOLVE:
-               flag.enabled(!asHullInset());
+               flag.setEnabled(!asHullInset());
                break;
 
        default:
index 998653b38b68fe6dd3161d7a266e2878791ffb63..36a678ae06ac03d28e25a30e92b7910839524f9c 100644 (file)
@@ -114,7 +114,7 @@ bool InsetMathRef::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_MOUSE_RELEASE:
        case LFUN_MOUSE_PRESS:
        case LFUN_MOUSE_MOTION:
-               status.enabled(true);
+               status.setEnabled(true);
                return true;
        default:
                return CommandInset::getStatus(cur, cmd, status);
index 01b5bcfe68c018764b7a1a6b64e598135c7253f3..d05b5f25e303c3f8054311f25dc836c8d9f70c89 100644 (file)
@@ -74,7 +74,7 @@ bool InsetMathSplit::getStatus(Cursor & cur, FuncRequest const & cmd,
                if (s == "add-vline-left" || s == "add-vline-right") {
                        flag.message(bformat(
                                from_utf8(N_("Can't add vertical grid lines in '%1$s'")),       name_));
-                       flag.enabled(false);
+                       flag.setEnabled(false);
                        return true;
                }
                return InsetMathGrid::getStatus(cur, cmd, flag);
index 1ecf2b04e7d4674aee8498bdcffb633da32851e7..fd0d57acec8897d4015f9d114af131a9047292a0 100644 (file)
@@ -70,7 +70,7 @@ bool InsetMathSubstack::getStatus(Cursor & cur, FuncRequest const & cmd,
                        flag.message(bformat(
                                from_utf8(N_("Can't add vertical grid lines in '%1$s'")),
                                from_utf8(name)));
-                       flag.enabled(false);
+                       flag.setEnabled(false);
                        return true;
                }
                return InsetMathGrid::getStatus(cur, cmd, flag);
index b6e1fbc032edb6a3311f2f2114a6009e6d534662..989a5f5e3e1691f11ce5e468a9ee11dfefcc772f 100644 (file)
@@ -1047,48 +1047,48 @@ bool MathMacroTemplate::getStatus(Cursor & /*cur*/, FuncRequest const & cmd,
                                num = convert<int>(arg);
                        bool on = (num >= optionals_
                                   && numargs_ < 9 && num <= numargs_ + 1);
-                       flag.enabled(on);
+                       flag.setEnabled(on);
                        break;
                }
 
                case LFUN_MATH_MACRO_APPEND_GREEDY_PARAM:
-                       flag.enabled(numargs_ < 9);
+                       flag.setEnabled(numargs_ < 9);
                        break;
 
                case LFUN_MATH_MACRO_REMOVE_PARAM: {
                        int num = numargs_;
                        if (arg.size() != 0)
                                num = convert<int>(arg);
-                       flag.enabled(num >= 1 && num <= numargs_);
+                       flag.setEnabled(num >= 1 && num <= numargs_);
                        break;
                }
 
                case LFUN_MATH_MACRO_MAKE_OPTIONAL:
-                       flag.enabled(numargs_ > 0
+                       flag.setEnabled(numargs_ > 0
                                     && optionals_ < numargs_
                                     && type_ != MacroTypeDef);
                        break;
 
                case LFUN_MATH_MACRO_MAKE_NONOPTIONAL:
-                       flag.enabled(optionals_ > 0
+                       flag.setEnabled(optionals_ > 0
                                     && type_ != MacroTypeDef);
                        break;
 
                case LFUN_MATH_MACRO_ADD_OPTIONAL_PARAM:
-                       flag.enabled(numargs_ < 9);
+                       flag.setEnabled(numargs_ < 9);
                        break;
 
                case LFUN_MATH_MACRO_REMOVE_OPTIONAL_PARAM:
-                       flag.enabled(optionals_ > 0);
+                       flag.setEnabled(optionals_ > 0);
                        break;
 
                case LFUN_MATH_MACRO_ADD_GREEDY_OPTIONAL_PARAM:
-                       flag.enabled(numargs_ == 0
+                       flag.setEnabled(numargs_ == 0
                                     && type_ != MacroTypeDef);
                        break;
 
                case LFUN_IN_MATHMACROTEMPLATE:
-                       flag.enabled(true);
+                       flag.setEnabled(true);
                        break;
 
                default: