]> git.lyx.org Git - features.git/commitdiff
* FuncStatus: unify naming of functions.
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 16 Apr 2010 10:51:20 +0000 (10:51 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 16 Apr 2010 10:51:20 +0000 (10:51 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34160 a592a061-630c-0410-9148-cb99ea01b6c8

src/FuncStatus.cpp
src/FuncStatus.h
src/Text3.cpp
src/frontends/qt4/Action.cpp
src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiView.cpp
src/insets/InsetTabular.cpp

index d56df61aa01e5130523e42623cd9af3349f75b38..36af548180037666aac100d03f94348ca4bc3f88 100644 (file)
@@ -36,7 +36,7 @@ void FuncStatus::operator|=(FuncStatus const & f)
 }
 
 
-void FuncStatus::unknown(bool b)
+void FuncStatus::setUnknown(bool b)
 {
        if (b)
                v_ |= UNKNOWN;
@@ -73,7 +73,7 @@ void FuncStatus::setOnOff(bool b)
 }
 
 
-bool FuncStatus::onoff(bool b) const
+bool FuncStatus::onOff(bool b) const
 {
        if (b)
                return (v_ & ON);
index af2801389e8e2ca4cbf3b8b3644cf3b7cc9eec49..1433f5c665b59c471c68a9a5739a002033c5a846 100644 (file)
@@ -54,7 +54,7 @@ public:
        ///
        void operator|=(FuncStatus const & f);
        ///
-       void unknown(bool b);
+       void setUnknown(bool b);
        ///
        bool unknown() const;
 
@@ -67,7 +67,7 @@ public:
        void setOnOff(bool b);
        /// tells whether the menu item should have a check mark
        /// (or the toolbar icon should be pushed).
-       bool onoff(bool b) const;
+       bool onOff(bool b) const;
 
        ///
        void message(docstring const & m);
index 69015cac62a76326e39b8e04ad79266ead93f612..0dd3b6492c96ee94fb1906e658d4fa0ae9533c95 100644 (file)
@@ -2288,7 +2288,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                        if (cit == floats.end() ||
                                        // and that we know how to generate a list of them
                            (!cit->second.needsFloatPkg() && cit->second.listCommand().empty())) {
-                               flag.unknown(true);
+                               flag.setUnknown(true);
                                // probably not necessary, but...
                                enable = false;
                        }
index b58e853dd4642f770315191d842b3e921b5f103b..3014e9a82f6a6604279c0f6aada3d071ec203d3a 100644 (file)
@@ -45,10 +45,10 @@ void Action::update()
 {
        FuncStatus const status = getStatus(func_);
 
-       if (status.onoff(true)) {
+       if (status.onOff(true)) {
                setCheckable(true);
                setChecked(true);
-       } else if (status.onoff(false)) {
+       } else if (status.onOff(false)) {
                setCheckable(true);
                setChecked(false);
        } else {
index aef110d6a6434dcab8e3a2de33cf1175f4c88e9c..770ef2fe198a9323f16eea012a34055a785f09a2 100644 (file)
@@ -863,7 +863,7 @@ FuncStatus GuiApplication::getStatus(FuncRequest const & cmd) const
        }
 
        if (cmd.action() == LFUN_UNKNOWN_ACTION) {
-               flag.unknown(true);
+               flag.setUnknown(true);
                flag.setEnabled(false);
                flag.message(from_utf8(N_("Unknown action")));
                return flag;
index 011d0b9d91d99714d162d67adf62e16b83997950..921f5595febdc7a85bbf91ec7daf79d703bfb1cf 100644 (file)
@@ -1200,7 +1200,7 @@ void GuiView::updateToolbars()
                        lyx::getStatus(FuncRequest(LFUN_LAYOUT_TABULAR)).enabled();
                bool const review =
                        lyx::getStatus(FuncRequest(LFUN_CHANGES_TRACK)).enabled() &&
-                       lyx::getStatus(FuncRequest(LFUN_CHANGES_TRACK)).onoff(true);
+                       lyx::getStatus(FuncRequest(LFUN_CHANGES_TRACK)).onOff(true);
                bool const mathmacrotemplate =
                        lyx::getStatus(FuncRequest(LFUN_IN_MATHMACROTEMPLATE)).enabled();
 
index 55476b4c5b6aa5207d5c5ba7d68203f2a1c5a65e..ad0d6f37b162ecd0d17ccc36b2b122d5893d4814 100644 (file)
@@ -4001,7 +4001,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
                }
                if (action == Tabular::LAST_ACTION) {
                        status.clear();
-                       status.unknown(true);
+                       status.setUnknown(true);
                        return true;
                }