]> git.lyx.org Git - features.git/commitdiff
This is just a giant renaming of member variables in FuncRequest,
authorRichard Heck <rgheck@comcast.net>
Fri, 9 Apr 2010 18:15:17 +0000 (18:15 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 9 Apr 2010 18:15:17 +0000 (18:15 +0000)
preparatory to making them private.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34105 a592a061-630c-0410-9148-cb99ea01b6c8

57 files changed:
src/Buffer.cpp
src/BufferView.cpp
src/CmdDef.cpp
src/Cursor.cpp
src/FuncRequest.cpp
src/FuncRequest.h
src/KeyMap.cpp
src/Text3.cpp
src/factory.cpp
src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiCommandBuffer.cpp
src/frontends/qt4/GuiPrefs.cpp
src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiWorkArea.cpp
src/frontends/qt4/Menus.cpp
src/frontends/qt4/TocWidget.cpp
src/frontends/qt4/Toolbars.cpp
src/insets/Inset.cpp
src/insets/InsetBibitem.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/InsetFlex.cpp
src/insets/InsetFloat.cpp
src/insets/InsetGraphics.cpp
src/insets/InsetInclude.cpp
src/insets/InsetIndex.cpp
src/insets/InsetInfo.cpp
src/insets/InsetLabel.cpp
src/insets/InsetListings.cpp
src/insets/InsetNewline.cpp
src/insets/InsetNewpage.cpp
src/insets/InsetNomencl.cpp
src/insets/InsetNote.cpp
src/insets/InsetPhantom.cpp
src/insets/InsetSpace.cpp
src/insets/InsetTabular.cpp
src/insets/InsetText.cpp
src/insets/InsetVSpace.cpp
src/insets/InsetWrap.cpp
src/lyxfind.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/InsetMathScript.cpp
src/mathed/InsetMathSpace.cpp
src/mathed/InsetMathSplit.cpp
src/mathed/InsetMathSubstack.cpp
src/mathed/MathMacroTemplate.cpp

index 80b136d75faa4036c73b9bb8c6728994d602491c..0e4e132556bc5fdf63a0623e8e1e7f98d4c4856f 100644 (file)
@@ -1815,7 +1815,7 @@ bool Buffer::getStatus(FuncRequest const & cmd, FuncStatus & flag)
 
        bool enable = true;
 
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
                case LFUN_BUFFER_TOGGLE_READ_ONLY:
                        flag.setOnOff(isReadonly());
@@ -1887,7 +1887,7 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
 {
        if (isInternal()) {
                // FIXME? if there is an Buffer LFUN that can be dispatched even
-               // if internal, put a switch '(cmd.action)' here.
+               // if internal, put a switch '(cmd.action_)' here.
                dr.dispatched(false);
                return;
        }
@@ -1896,7 +1896,7 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
        bool dispatched = true;
        undo().beginUndoGroup();
 
-       switch (func.action) {
+       switch (func.action_) {
        case LFUN_BUFFER_TOGGLE_READ_ONLY:
                if (lyxvc().inUse())
                        lyxvc().toggleReadOnly();
@@ -2014,7 +2014,7 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
                                bformat(_("Branch \"%1$s\" does not exist."), branchName);
                        dr.setMessage(msg);
                } else {
-                       branch->setSelected(func.action == LFUN_BRANCH_ACTIVATE);
+                       branch->setSelected(func.action_ == LFUN_BRANCH_ACTIVATE);
                        dr.setError(false);
                        dr.update(Update::Force);
                }
index d5e4a016e40884907883ff5063c5d5f4d1f24d91..a415c60589c6404b9560e1c8f632b1fe1b97c4df 100644 (file)
@@ -948,16 +948,16 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
 {
        // Can we use a readonly buffer?
        if (buffer_.isReadonly()
-           && !lyxaction.funcHasFlag(cmd.action, LyXAction::ReadOnly)
-           && !lyxaction.funcHasFlag(cmd.action, LyXAction::NoBuffer)) {
+           && !lyxaction.funcHasFlag(cmd.action_, LyXAction::ReadOnly)
+           && !lyxaction.funcHasFlag(cmd.action_, LyXAction::NoBuffer)) {
                flag.message(from_utf8(N_("Document is read-only")));
                flag.setEnabled(false);
                return true;
        }
        // Are we in a DELETED change-tracking region?
        if (lookupChangeType(d->cursor_, true) == Change::DELETED
-           && !lyxaction.funcHasFlag(cmd.action, LyXAction::ReadOnly)
-           && !lyxaction.funcHasFlag(cmd.action, LyXAction::NoBuffer)) {
+           && !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.setEnabled(false);
                return true;
@@ -968,7 +968,7 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
        if (cur.getStatus(cmd, flag))
                return true;
 
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        // FIXME: This is a bit problematic because we don't check if this is
        // a document BufferView or not for these LFUNs. We probably have to
@@ -1153,10 +1153,10 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
        //lyxerr << [ cmd = " << cmd << "]" << endl;
 
        // Make sure that the cached BufferView is correct.
-       LYXERR(Debug::ACTION, " action[" << cmd.action << ']'
+       LYXERR(Debug::ACTION, " action[" << cmd.action_ << ']'
                << " arg[" << to_utf8(cmd.argument()) << ']'
-               << " x[" << cmd.x << ']'
-               << " y[" << cmd.y << ']'
+               << " x[" << cmd.x_ << ']'
+               << " y[" << cmd.y_ << ']'
                << " button[" << cmd.button() << ']');
 
        string const argument = to_utf8(cmd.argument());
@@ -1164,14 +1164,14 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
 
        // Don't dispatch function that does not apply to internal buffers.
        if (buffer_.isInternal() 
-           && lyxaction.funcHasFlag(cmd.action, LyXAction::NoInternal))
+           && lyxaction.funcHasFlag(cmd.action_, LyXAction::NoInternal))
                return;
 
        // We'll set this back to false if need be.
        bool dispatched = true;
        buffer_.undo().beginUndoGroup();
 
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_BUFFER_PARAMS_APPLY: {
                DocumentClass const * const oldClass = buffer_.params().documentClassPtr();
@@ -1451,7 +1451,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                if (searched_string.empty())
                        break;
 
-               bool const fw = cmd.action == LFUN_WORD_FIND_FORWARD;
+               bool const fw = cmd.action_ == LFUN_WORD_FIND_FORWARD;
                docstring const data =
                        find2string(searched_string, true, false, fw);
                find(this, FuncRequest(LFUN_WORD_FIND, data));
@@ -1628,11 +1628,11 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                        showCursor();
                        p = getPos(cur, cur.boundary());
                }*/
-               int const scrolled = scroll(cmd.action == LFUN_SCREEN_UP
+               int const scrolled = scroll(cmd.action_ == LFUN_SCREEN_UP
                        ? -height_ : height_);
-               if (cmd.action == LFUN_SCREEN_UP && scrolled > -height_)
+               if (cmd.action_ == LFUN_SCREEN_UP && scrolled > -height_)
                        p = Point(0, 0);
-               if (cmd.action == LFUN_SCREEN_DOWN && scrolled < height_)
+               if (cmd.action_ == LFUN_SCREEN_DOWN && scrolled < height_)
                        p = Point(width_, height_);
                Cursor old = cur;
                bool const in_texted = cur.inTexted();
@@ -1641,7 +1641,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                updateHoveredInset();
 
                d->text_metrics_[&buffer_.text()].editXY(cur, p.x_, p.y_,
-                       true, cmd.action == LFUN_SCREEN_UP); 
+                       true, cmd.action_ == LFUN_SCREEN_UP); 
                //FIXME: what to do with cur.x_target()?
                bool update = in_texted && cur.bv().checkDepm(cur, old);
                cur.finishUndo();
@@ -1971,18 +1971,18 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0)
        // surrounding Text will handle this event.
 
        // make sure we stay within the screen...
-       cmd.y = min(max(cmd.y, -1), height_);
+       cmd.y_ = min(max(cmd.y_, -1), height_);
 
-       d->mouse_position_cache_.x_ = cmd.x;
-       d->mouse_position_cache_.y_ = cmd.y;
+       d->mouse_position_cache_.x_ = cmd.x_;
+       d->mouse_position_cache_.y_ = cmd.y_;
 
-       if (cmd.action == LFUN_MOUSE_MOTION && cmd.button() == mouse_button::none) {
+       if (cmd.action_ == LFUN_MOUSE_MOTION && cmd.button() == mouse_button::none) {
                updateHoveredInset();
                return;
        }
 
        // Build temporary cursor.
-       Inset * inset = d->text_metrics_[&buffer_.text()].editXY(cur, cmd.x, cmd.y);
+       Inset * inset = d->text_metrics_[&buffer_.text()].editXY(cur, cmd.x_, cmd.y_);
 
        // Put anchor at the same position.
        cur.resetAnchor();
index b0b03350c7fbf1307c4aa5818d4c03df35dc707f..17c6fc52f4ef459102a3cca62ed1f371caeac4e5 100644 (file)
@@ -163,8 +163,8 @@ CmdDef::newCmdDefResult CmdDef::newCmdDef(string const & name,
                return CmdDefExists;
 
        FuncRequest     func = lyxaction.lookupFunc(def);
-       if (func.action == LFUN_NOACTION
-               || func.action == LFUN_UNKNOWN_ACTION) {
+       if (func.action_ == LFUN_NOACTION
+               || func.action_ == LFUN_UNKNOWN_ACTION) {
                        return CmdDefInvalid;
        }
 
index bcfbcf7e2ec37247236ff73119199a7624b84359..6efa5b46a479591afa0574fa1c5c7e9f031fa4e7 100644 (file)
@@ -286,7 +286,7 @@ bool Cursor::getStatus(FuncRequest const & cmd, FuncStatus & status) const
 
        // Is this a function that acts on inset at point?
        Inset * inset = cur.nextInset();
-       if (lyxaction.funcHasFlag(cmd.action, LyXAction::AtPoint)
+       if (lyxaction.funcHasFlag(cmd.action_, LyXAction::AtPoint)
            && inset && inset->getStatus(cur, cmd, status))
                return true;
 
@@ -333,7 +333,7 @@ void Cursor::dispatch(FuncRequest const & cmd0)
        buffer()->undo().beginUndoGroup();
        
        // Is this a function that acts on inset at point?
-       if (lyxaction.funcHasFlag(cmd.action, LyXAction::AtPoint)
+       if (lyxaction.funcHasFlag(cmd.action_, LyXAction::AtPoint)
            && nextInset()) {
                result().dispatched(true);
                result().update(Update::FitCursor | Update::Force);
index c7624c38ae336775ffe6e2da052f8ffac60dbb8b..497c3b0ba1d38d7897eb558a40d802987b91e164 100644 (file)
@@ -29,43 +29,43 @@ FuncRequest const FuncRequest::unknown(LFUN_UNKNOWN_ACTION);
 FuncRequest const FuncRequest::noaction(LFUN_NOACTION);
 
 FuncRequest::FuncRequest(Origin o)
-       : action(LFUN_NOACTION), origin(o), x(0), y(0),
+       : action_(LFUN_NOACTION), origin_(o), x_(0), y_(0),
          button_(mouse_button::none)
 {}
 
 
 FuncRequest::FuncRequest(FuncCode act, Origin o)
-       : action(act), origin(o), x(0), y(0), button_(mouse_button::none)
+       : action_(act), origin_(o), x_(0), y_(0), button_(mouse_button::none)
 {}
 
 
 FuncRequest::FuncRequest(FuncCode act, docstring const & arg, Origin o)
-       : action(act), argument_(arg), origin(o), x(0), y(0),
+       : argument_(arg), action_(act), origin_(o), x_(0), y_(0),
          button_(mouse_button::none)
 {}
 
 
 FuncRequest::FuncRequest(FuncCode act, string const & arg, Origin o)
-       : action(act), argument_(from_utf8(arg)), origin(o), x(0), y(0),
+       : argument_(from_utf8(arg)), action_(act), origin_(o), x_(0), y_(0),
          button_(mouse_button::none)
 {}
 
 
 FuncRequest::FuncRequest(FuncCode act, int ax, int ay,
                         mouse_button::state but, Origin o)
-       : action(act), origin(o), x(ax), y(ay), button_(but)
+       : action_(act), origin_(o), x_(ax), y_(ay), button_(but)
 {}
 
 
 FuncRequest::FuncRequest(FuncRequest const & cmd, docstring const & arg, Origin o)
-       : action(cmd.action), argument_(arg), origin(o),
-         x(cmd.x), y(cmd.y), button_(cmd.button_)
+       : argument_(arg), action_(cmd.action_), origin_(o),
+         x_(cmd.x_), y_(cmd.y_), button_(cmd.button_)
 {}
 
 
 FuncRequest::FuncRequest(FuncRequest const & cmd, string const & arg, Origin o)
-       : action(cmd.action), argument_(from_utf8(arg)), origin(o),
-         x(cmd.x), y(cmd.y), button_(cmd.button_)
+       : argument_(from_utf8(arg)), action_(cmd.action_), origin_(o),
+         x_(cmd.x_), y_(cmd.y_), button_(cmd.button_)
 {}
 
 
@@ -130,18 +130,18 @@ string FuncRequest::getLongArg(unsigned int i) const
 
 bool operator==(FuncRequest const & lhs, FuncRequest const & rhs)
 {
-       return lhs.action == rhs.action && lhs.argument() == rhs.argument();
+       return lhs.action_ == rhs.action_ && lhs.argument() == rhs.argument();
 }
 
 
 ostream & operator<<(ostream & os, FuncRequest const & cmd)
 {
        return os
-               << " action: " << cmd.action 
-               << " [" << lyxaction.getActionName(cmd.action) << "] " 
+               << " action: " << cmd.action_ 
+               << " [" << lyxaction.getActionName(cmd.action_) << "] " 
                << " arg: '" << to_utf8(cmd.argument()) << "'"
-               << " x: " << cmd.x
-               << " y: " << cmd.y;
+               << " x: " << cmd.x_
+               << " y: " << cmd.y_;
 }
 
 
index 993f0a24bbcca4436a96e85ae31b39cb282edc64..1ec99b2a56c4549c0065877053073da04223dbca 100644 (file)
@@ -75,19 +75,18 @@ public:
        static FuncRequest const unknown;
        /// 
        static FuncRequest const noaction;
-public:  // should be private
-       /// the action
-       FuncCode action;
 private:
        /// the action's string argument
        docstring argument_;
-public:  // should be private
+public:
+       /// the action
+       FuncCode action_;
        /// who initiated the action
-       Origin origin;
+       Origin origin_;
        /// the x coordinate of a mouse press
-       int x;
+       int x_;
        /// the y coordinate of a mouse press
-       int y;
+       int y_;
        /// some extra information (like button number)
        mouse_button::state button_;
 };
index bf0172ed9a3e2f8bf2c05e542a091092687eb36c..2bb5c091948f67168bc33c025cf24375591e446c 100644 (file)
@@ -59,7 +59,7 @@ string const KeyMap::printKeySym(KeySymbol const & key, KeyModifier mod)
 size_t KeyMap::bind(string const & seq, FuncRequest const & func)
 {
        LYXERR(Debug::KBMAP, "BIND: Sequence `" << seq << "' Action `"
-              << func.action << '\'');
+              << func.action_ << '\'');
 
        KeySequence k(0, 0);
 
@@ -113,7 +113,7 @@ void KeyMap::bind(KeySequence * seq, FuncRequest const & func, unsigned int r)
                                        it->prefixes.reset();
                                }
                                it->func = func;
-                               it->func.origin = FuncRequest::KEYBOARD;
+                               it->func.origin_ = FuncRequest::KEYBOARD;
                                return;
                        } else if (!it->prefixes.get()) {
                                lyxerr << "Error: New binding for '"
@@ -133,7 +133,7 @@ void KeyMap::bind(KeySequence * seq, FuncRequest const & func, unsigned int r)
        newone->mod = seq->modifiers[r];
        if (r + 1 == seq->length()) {
                newone->func = func;
-               newone->func.origin = FuncRequest::KEYBOARD;
+               newone->func.origin_ = FuncRequest::KEYBOARD;
                newone->prefixes.reset();
        } else {
                newone->prefixes.reset(new KeyMap);
@@ -296,7 +296,7 @@ bool KeyMap::read(FileName const & bind_file, KeyMap * unbind_map)
                        string cmd = lexrc.getString();
 
                        FuncRequest func = lyxaction.lookupFunc(cmd);
-                       if (func.action == LFUN_UNKNOWN_ACTION) {
+                       if (func.action_ == LFUN_UNKNOWN_ACTION) {
                                lexrc.printError("BN_BIND: Unknown LyX function `$$Token'");
                                error = true;
                                break;
@@ -322,7 +322,7 @@ bool KeyMap::read(FileName const & bind_file, KeyMap * unbind_map)
                        string cmd = lexrc.getString();
 
                        FuncRequest func = lyxaction.lookupFunc(cmd);
-                       if (func.action == LFUN_UNKNOWN_ACTION) {
+                       if (func.action_ == LFUN_UNKNOWN_ACTION) {
                                lexrc.printError("BN_UNBIND: Unknown LyX"
                                                 " function `$$Token'");
                                error = true;
@@ -368,7 +368,7 @@ void KeyMap::write(string const & bind_file, bool append, bool unbind) const
        BindingList::const_iterator it = list.begin();
        BindingList::const_iterator it_end = list.end();
        for (; it != it_end; ++it) {
-               FuncCode action = it->request.action;
+               FuncCode action = it->request.action_;
                string arg = to_utf8(it->request.argument());
 
                os << tag << " \""
@@ -493,7 +493,7 @@ KeyMap::BindingList KeyMap::listBindings(bool unbound, KeyMap::ItemType tag) con
                        BindingList::const_iterator bit = list.begin();
                        BindingList::const_iterator const ben = list.end();
                        for (; bit != ben; ++bit)
-                               if (bit->request.action == action) {
+                               if (bit->request.action_ == action) {
                                        has_action = true;
                                        break;
                                }
index 704adceac62febde4f794668ebcb5b3a94fd0360..1ea42a988c99d0d24bc26d1f05e14e8dbdfb2ce1 100644 (file)
@@ -198,7 +198,7 @@ static void mathDispatch(Cursor & cur, FuncRequest const & cmd, bool display)
 
 void regexpDispatch(Cursor & cur, FuncRequest const & cmd)
 {
-       LASSERT(cmd.action == LFUN_REGEXP_MODE, return);
+       LASSERT(cmd.action_ == LFUN_REGEXP_MODE, return);
        if (cur.inRegexped()) {
                cur.message(_("Already in regular expression mode"));
                return;
@@ -239,7 +239,7 @@ static bool doInsertInset(Cursor & cur, Text * text,
                ci->setButtonLabel();
 
        cur.recordUndo();
-       if (cmd.action == LFUN_INDEX_INSERT) {
+       if (cmd.action_ == LFUN_INDEX_INSERT) {
                docstring ds = subst(text->getStringToIndex(cur), '\n', ' ');
                text->insertInset(cur, inset);
                if (edit)
@@ -472,13 +472,13 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        bool sel = cur.selection();
        // Signals that, even if needsUpdate == false, an update of the
        // cursor paragraph is required
-       bool singleParUpdate = lyxaction.funcHasFlag(cmd.action,
+       bool singleParUpdate = lyxaction.funcHasFlag(cmd.action_,
                LyXAction::SingleParUpdate);
        // Signals that a full-screen update is required
-       bool needsUpdate = !(lyxaction.funcHasFlag(cmd.action,
+       bool needsUpdate = !(lyxaction.funcHasFlag(cmd.action_,
                LyXAction::NoUpdate) || singleParUpdate);
 
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_PARAGRAPH_MOVE_DOWN: {
                pit_type const pit = cur.pit();
@@ -552,7 +552,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 
        case LFUN_BUFFER_BEGIN:
        case LFUN_BUFFER_BEGIN_SELECT:
-               needsUpdate |= cur.selHandle(cmd.action == LFUN_BUFFER_BEGIN_SELECT);
+               needsUpdate |= cur.selHandle(cmd.action_ == LFUN_BUFFER_BEGIN_SELECT);
                if (cur.depth() == 1)
                        needsUpdate |= cursorTop(cur);
                else
@@ -562,7 +562,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 
        case LFUN_BUFFER_END:
        case LFUN_BUFFER_END_SELECT:
-               needsUpdate |= cur.selHandle(cmd.action == LFUN_BUFFER_END_SELECT);
+               needsUpdate |= cur.selHandle(cmd.action_ == LFUN_BUFFER_END_SELECT);
                if (cur.depth() == 1)
                        needsUpdate |= cursorBottom(cur);
                else
@@ -572,7 +572,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 
        case LFUN_INSET_BEGIN:
        case LFUN_INSET_BEGIN_SELECT:
-               needsUpdate |= cur.selHandle(cmd.action == LFUN_INSET_BEGIN_SELECT);
+               needsUpdate |= cur.selHandle(cmd.action_ == LFUN_INSET_BEGIN_SELECT);
                if (cur.depth() == 1 || !cur.top().at_begin())
                        needsUpdate |= cursorTop(cur);
                else
@@ -582,7 +582,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 
        case LFUN_INSET_END:
        case LFUN_INSET_END_SELECT:
-               needsUpdate |= cur.selHandle(cmd.action == LFUN_INSET_END_SELECT);
+               needsUpdate |= cur.selHandle(cmd.action_ == LFUN_INSET_END_SELECT);
                if (cur.depth() == 1 || !cur.top().at_end())
                        needsUpdate |= cursorBottom(cur);
                else
@@ -605,7 +605,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_CHAR_FORWARD:
        case LFUN_CHAR_FORWARD_SELECT:
                //LYXERR0(" LFUN_CHAR_FORWARD[SEL]:\n" << cur);
-               needsUpdate |= cur.selHandle(cmd.action == LFUN_CHAR_FORWARD_SELECT);
+               needsUpdate |= cur.selHandle(cmd.action_ == LFUN_CHAR_FORWARD_SELECT);
                needsUpdate |= cursorForward(cur);
 
                if (!needsUpdate && oldTopSlice == cur.top()
@@ -631,7 +631,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_CHAR_BACKWARD:
        case LFUN_CHAR_BACKWARD_SELECT:
                //lyxerr << "handle LFUN_CHAR_BACKWARD[_SELECT]:\n" << cur << endl;
-               needsUpdate |= cur.selHandle(cmd.action == LFUN_CHAR_BACKWARD_SELECT);
+               needsUpdate |= cur.selHandle(cmd.action_ == LFUN_CHAR_BACKWARD_SELECT);
                needsUpdate |= cursorBackward(cur);
 
                if (!needsUpdate && oldTopSlice == cur.top()
@@ -657,7 +657,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_CHAR_LEFT:
        case LFUN_CHAR_LEFT_SELECT:
                if (lyxrc.visual_cursor) {
-                       needsUpdate |= cur.selHandle(cmd.action == LFUN_CHAR_LEFT_SELECT);
+                       needsUpdate |= cur.selHandle(cmd.action_ == LFUN_CHAR_LEFT_SELECT);
                        needsUpdate |= cursorVisLeft(cur);
                        if (!needsUpdate && oldTopSlice == cur.top()
                                        && cur.boundary() == oldBoundary) {
@@ -666,10 +666,10 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        }
                } else {
                        if (reverseDirectionNeeded(cur)) {
-                               cmd.action = cmd.action == LFUN_CHAR_LEFT_SELECT ?
+                               cmd.action_ = cmd.action_ == LFUN_CHAR_LEFT_SELECT ?
                                        LFUN_CHAR_FORWARD_SELECT : LFUN_CHAR_FORWARD;
                        } else {
-                               cmd.action = cmd.action == LFUN_CHAR_LEFT_SELECT ?
+                               cmd.action_ = cmd.action_ == LFUN_CHAR_LEFT_SELECT ?
                                        LFUN_CHAR_BACKWARD_SELECT : LFUN_CHAR_BACKWARD;
                        }
                        dispatch(cur, cmd);
@@ -680,7 +680,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_CHAR_RIGHT:
        case LFUN_CHAR_RIGHT_SELECT:
                if (lyxrc.visual_cursor) {
-                       needsUpdate |= cur.selHandle(cmd.action == LFUN_CHAR_RIGHT_SELECT);
+                       needsUpdate |= cur.selHandle(cmd.action_ == LFUN_CHAR_RIGHT_SELECT);
                        needsUpdate |= cursorVisRight(cur);
                        if (!needsUpdate && oldTopSlice == cur.top()
                                        && cur.boundary() == oldBoundary) {
@@ -689,10 +689,10 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        }
                } else {
                        if (reverseDirectionNeeded(cur)) {
-                               cmd.action = cmd.action == LFUN_CHAR_RIGHT_SELECT ?
+                               cmd.action_ = cmd.action_ == LFUN_CHAR_RIGHT_SELECT ?
                                        LFUN_CHAR_BACKWARD_SELECT : LFUN_CHAR_BACKWARD;
                        } else {
-                               cmd.action = cmd.action == LFUN_CHAR_RIGHT_SELECT ?
+                               cmd.action_ = cmd.action_ == LFUN_CHAR_RIGHT_SELECT ?
                                        LFUN_CHAR_FORWARD_SELECT : LFUN_CHAR_FORWARD;
                        }
                        dispatch(cur, cmd);
@@ -706,11 +706,11 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_UP:
        case LFUN_DOWN: {
                // stop/start the selection
-               bool select = cmd.action == LFUN_DOWN_SELECT ||
-                       cmd.action == LFUN_UP_SELECT;
+               bool select = cmd.action_ == LFUN_DOWN_SELECT ||
+                       cmd.action_ == LFUN_UP_SELECT;
 
                // move cursor up/down
-               bool up = cmd.action == LFUN_UP_SELECT || cmd.action == LFUN_UP;
+               bool up = cmd.action_ == LFUN_UP_SELECT || cmd.action_ == LFUN_UP;
                bool const atFirstOrLastRow = cur.atFirstOrLastRow(up);
 
                if (!atFirstOrLastRow) {
@@ -732,25 +732,25 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 
        case LFUN_PARAGRAPH_UP:
        case LFUN_PARAGRAPH_UP_SELECT:
-               needsUpdate |= cur.selHandle(cmd.action == LFUN_PARAGRAPH_UP_SELECT);
+               needsUpdate |= cur.selHandle(cmd.action_ == LFUN_PARAGRAPH_UP_SELECT);
                needsUpdate |= cursorUpParagraph(cur);
                break;
 
        case LFUN_PARAGRAPH_DOWN:
        case LFUN_PARAGRAPH_DOWN_SELECT:
-               needsUpdate |= cur.selHandle(cmd.action == LFUN_PARAGRAPH_DOWN_SELECT);
+               needsUpdate |= cur.selHandle(cmd.action_ == LFUN_PARAGRAPH_DOWN_SELECT);
                needsUpdate |= cursorDownParagraph(cur);
                break;
 
        case LFUN_LINE_BEGIN:
        case LFUN_LINE_BEGIN_SELECT:
-               needsUpdate |= cur.selHandle(cmd.action == LFUN_LINE_BEGIN_SELECT);
+               needsUpdate |= cur.selHandle(cmd.action_ == LFUN_LINE_BEGIN_SELECT);
                needsUpdate |= tm->cursorHome(cur);
                break;
 
        case LFUN_LINE_END:
        case LFUN_LINE_END_SELECT:
-               needsUpdate |= cur.selHandle(cmd.action == LFUN_LINE_END_SELECT);
+               needsUpdate |= cur.selHandle(cmd.action_ == LFUN_LINE_END_SELECT);
                needsUpdate |= tm->cursorEnd(cur);
                break;
 
@@ -792,7 +792,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_WORD_RIGHT:
        case LFUN_WORD_RIGHT_SELECT:
                if (lyxrc.visual_cursor) {
-                       needsUpdate |= cur.selHandle(cmd.action == LFUN_WORD_RIGHT_SELECT);
+                       needsUpdate |= cur.selHandle(cmd.action_ == LFUN_WORD_RIGHT_SELECT);
                        needsUpdate |= cursorVisRightOneWord(cur);
                        if (!needsUpdate && oldTopSlice == cur.top()
                                        && cur.boundary() == oldBoundary) {
@@ -801,10 +801,10 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        }
                } else {
                        if (reverseDirectionNeeded(cur)) {
-                               cmd.action = cmd.action == LFUN_WORD_RIGHT_SELECT ?
+                               cmd.action_ = cmd.action_ == LFUN_WORD_RIGHT_SELECT ?
                                                LFUN_WORD_BACKWARD_SELECT : LFUN_WORD_BACKWARD;
                        } else {
-                               cmd.action = cmd.action == LFUN_WORD_RIGHT_SELECT ?
+                               cmd.action_ = cmd.action_ == LFUN_WORD_RIGHT_SELECT ?
                                                LFUN_WORD_FORWARD_SELECT : LFUN_WORD_FORWARD;
                        }
                        dispatch(cur, cmd);
@@ -814,14 +814,14 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 
        case LFUN_WORD_FORWARD:
        case LFUN_WORD_FORWARD_SELECT:
-               needsUpdate |= cur.selHandle(cmd.action == LFUN_WORD_FORWARD_SELECT);
+               needsUpdate |= cur.selHandle(cmd.action_ == LFUN_WORD_FORWARD_SELECT);
                needsUpdate |= cursorForwardOneWord(cur);
                break;
 
        case LFUN_WORD_LEFT:
        case LFUN_WORD_LEFT_SELECT:
                if (lyxrc.visual_cursor) {
-                       needsUpdate |= cur.selHandle(cmd.action == LFUN_WORD_LEFT_SELECT);
+                       needsUpdate |= cur.selHandle(cmd.action_ == LFUN_WORD_LEFT_SELECT);
                        needsUpdate |= cursorVisLeftOneWord(cur);
                        if (!needsUpdate && oldTopSlice == cur.top()
                                        && cur.boundary() == oldBoundary) {
@@ -830,10 +830,10 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        }
                } else {
                        if (reverseDirectionNeeded(cur)) {
-                               cmd.action = cmd.action == LFUN_WORD_LEFT_SELECT ?
+                               cmd.action_ = cmd.action_ == LFUN_WORD_LEFT_SELECT ?
                                                LFUN_WORD_FORWARD_SELECT : LFUN_WORD_FORWARD;
                        } else {
-                               cmd.action = cmd.action == LFUN_WORD_LEFT_SELECT ?
+                               cmd.action_ = cmd.action_ == LFUN_WORD_LEFT_SELECT ?
                                                LFUN_WORD_BACKWARD_SELECT : LFUN_WORD_BACKWARD;
                        }
                        dispatch(cur, cmd);
@@ -843,7 +843,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 
        case LFUN_WORD_BACKWARD:
        case LFUN_WORD_BACKWARD_SELECT:
-               needsUpdate |= cur.selHandle(cmd.action == LFUN_WORD_BACKWARD_SELECT);
+               needsUpdate |= cur.selHandle(cmd.action_ == LFUN_WORD_BACKWARD_SELECT);
                needsUpdate |= cursorBackwardOneWord(cur);
                break;
 
@@ -1409,19 +1409,19 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                CursorSlice old = bvcur.top();
 
                int const wh = bv->workHeight();
-               int const y = max(0, min(wh - 1, cmd.y));
+               int const y = max(0, min(wh - 1, cmd.y_));
 
-               tm->setCursorFromCoordinates(cur, cmd.x, y);
-               cur.setTargetX(cmd.x);
-               if (cmd.y >= wh)
+               tm->setCursorFromCoordinates(cur, cmd.x_, y);
+               cur.setTargetX(cmd.x_);
+               if (cmd.y_ >= wh)
                        lyx::dispatch(FuncRequest(LFUN_DOWN_SELECT));
-               else if (cmd.y < 0)
+               else if (cmd.y_ < 0)
                        lyx::dispatch(FuncRequest(LFUN_UP_SELECT));
                // This is to allow jumping over large insets
                if (cur.top() == old) {
-                       if (cmd.y >= wh)
+                       if (cmd.y_ >= wh)
                                lyx::dispatch(FuncRequest(LFUN_DOWN_SELECT));
-                       else if (cmd.y < 0)
+                       else if (cmd.y_ < 0)
                                lyx::dispatch(FuncRequest(LFUN_UP_SELECT));
                }
                // We continue with our existing selection or start a new one, so don't
@@ -1933,7 +1933,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_ACCENT_HUNGARIAN_UMLAUT:
        case LFUN_ACCENT_CIRCLE:
        case LFUN_ACCENT_OGONEK:
-               theApp()->handleKeyFunc(cmd.action);
+               theApp()->handleKeyFunc(cmd.action_);
                if (!cmd.argument().empty())
                        // FIXME: Are all these characters encoded in one byte in utf8?
                        bv->translateAndInsert(cmd.argument()[0], this, cur);
@@ -2153,7 +2153,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
        bool enable = true;
        InsetCode code = NO_CODE;
 
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_DEPTH_DECREMENT:
                enable = changeDepthAllowed(cur, DEC_DEPTH);
index bdad713932da2346b3b06ae605cc0a019c882712..5e435c65a89b6d9d579c5d3c62f6f7102ae4cb90 100644 (file)
@@ -80,7 +80,7 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
 {
        try {
 
-               switch (cmd.action) {
+               switch (cmd.action_) {
 
                case LFUN_LINE_INSERT:
                        return new InsetLine;
index a5b2797a084648c1fbbf20fe0dd983ed22fbb175..f3bbc045c55765472cc500405c0b4f4dd510e627 100644 (file)
@@ -313,7 +313,7 @@ QString iconName(FuncRequest const & f, bool unknown)
        QString name1;
        QString name2;
        QString path;
-       switch (f.action) {
+       switch (f.action_) {
        case LFUN_MATH_INSERT:
                if (!f.argument().empty()) {
                        path = "math/";
@@ -353,7 +353,7 @@ QString iconName(FuncRequest const & f, bool unknown)
                }
        }
        default:
-               name2 = toqstr(lyxaction.getActionName(f.action));
+               name2 = toqstr(lyxaction.getActionName(f.action_));
                name1 = name2;
 
                if (!f.argument().empty()) {
@@ -390,7 +390,7 @@ QString iconName(FuncRequest const & f, bool unknown)
                           << " or filename "
                           << "\"" << name2 << "\"" 
                           << " for command \""
-                          << lyxaction.getActionName(f.action)
+                          << lyxaction.getActionName(f.action_)
                           << '(' << to_utf8(f.argument()) << ")\"");
 
        if (unknown) {
@@ -856,13 +856,13 @@ FuncStatus GuiApplication::getStatus(FuncRequest const & cmd) const
 {
        FuncStatus flag;
 
-       if (cmd.action == LFUN_NOACTION) {
+       if (cmd.action_ == LFUN_NOACTION) {
                flag.message(from_utf8(N_("Nothing to do")));
                flag.setEnabled(false);
                return flag;
        }
 
-       if (cmd.action == LFUN_UNKNOWN_ACTION) {
+       if (cmd.action_ == LFUN_UNKNOWN_ACTION) {
                flag.unknown(true);
                flag.setEnabled(false);
                flag.message(from_utf8(N_("Unknown action")));
@@ -874,7 +874,7 @@ FuncStatus GuiApplication::getStatus(FuncRequest const & cmd) const
        // -- And I'd rather let an inset decide which LFUNs it is willing
        // to handle (Andre')
        bool enable = true;
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        // This could be used for the no-GUI version. The GUI version is handled in
        // GuiView::getStatus(). See above.
@@ -903,7 +903,7 @@ FuncStatus GuiApplication::getStatus(FuncRequest const & cmd) const
                // argument contains ';'-terminated commands
                string const firstcmd = token(to_utf8(cmd.argument()), ';', 0);
                FuncRequest func(lyxaction.lookupFunc(firstcmd));
-               func.origin = cmd.origin;
+               func.origin_ = cmd.origin_;
                flag = getStatus(func);
                break;
        }
@@ -916,7 +916,7 @@ FuncStatus GuiApplication::getStatus(FuncRequest const & cmd) const
                        string first;
                        arg = split(arg, first, ';');
                        FuncRequest func(lyxaction.lookupFunc(first));
-                       func.origin = cmd.origin;
+                       func.origin_ = cmd.origin_;
                        flag = getStatus(func);
                        // if this one is enabled, the whole thing is
                        if (flag.enabled())
@@ -929,7 +929,7 @@ FuncStatus GuiApplication::getStatus(FuncRequest const & cmd) const
                FuncRequest func;
                string name = to_utf8(cmd.argument());
                if (theTopLevelCmdDef().lock(name, func)) {
-                       func.origin = cmd.origin;
+                       func.origin_ = cmd.origin_;
                        flag = getStatus(func);
                        theTopLevelCmdDef().release(name);
                } else {
@@ -989,7 +989,7 @@ FuncStatus GuiApplication::getStatus(FuncRequest const & cmd) const
                // entries that are buffer or view-related.
                //FIXME: Abdel (09/02/10) This has very bad effect on Linux, don't know why...
                /*
-               if (cmd.origin == FuncRequest::MENU && !current_view_->hasFocus()) {
+               if (cmd.origin_ == FuncRequest::MENU && !current_view_->hasFocus()) {
                        enable = false;
                        break;
                }
@@ -1026,11 +1026,11 @@ FuncStatus GuiApplication::getStatus(FuncRequest const & cmd) const
 static docstring makeDispatchMessage(docstring const & msg,
                                     FuncRequest const & cmd)
 {
-       const bool verbose = (cmd.origin == FuncRequest::MENU
-                             || cmd.origin == FuncRequest::TOOLBAR
-                             || cmd.origin == FuncRequest::COMMANDBUFFER);
+       const bool verbose = (cmd.origin_ == FuncRequest::MENU
+                             || cmd.origin_ == FuncRequest::TOOLBAR
+                             || cmd.origin_ == FuncRequest::COMMANDBUFFER);
 
-       if (cmd.action == LFUN_SELF_INSERT || !verbose) {
+       if (cmd.action_ == LFUN_SELF_INSERT || !verbose) {
                LYXERR(Debug::ACTION, "dispatch msg is " << msg);
                return msg;
        }
@@ -1039,12 +1039,12 @@ static docstring makeDispatchMessage(docstring const & msg,
        if (!dispatch_msg.empty())
                dispatch_msg += ' ';
 
-       docstring comname = from_utf8(lyxaction.getActionName(cmd.action));
+       docstring comname = from_utf8(lyxaction.getActionName(cmd.action_));
 
        bool argsadded = false;
 
        if (!cmd.argument().empty()) {
-               if (cmd.action != LFUN_UNKNOWN_ACTION) {
+               if (cmd.action_ != LFUN_UNKNOWN_ACTION) {
                        comname += ' ' + cmd.argument();
                        argsadded = true;
                }
@@ -1197,7 +1197,7 @@ void GuiApplication::reconfigure(string const & option)
 void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
 {
        string const argument = to_utf8(cmd.argument());
-       FuncCode const action = cmd.action;
+       FuncCode const action = cmd.action_;
 
        LYXERR(Debug::ACTION, "cmd: " << cmd);
 
@@ -1222,7 +1222,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
        // Assumes that the action will be dispatched.
        dr.dispatched(true);
 
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_WINDOW_NEW:
                createView(toqstr(cmd.argument()));
@@ -1459,7 +1459,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                        string first;
                        arg = split(arg, first, ';');
                        FuncRequest func(lyxaction.lookupFunc(first));
-                       func.origin = cmd.origin;
+                       func.origin_ = cmd.origin_;
                        dispatch(func);
                }
                // the buffer may have been closed by one action
@@ -1475,7 +1475,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                        string first;
                        arg = split(arg, first, ';');
                        FuncRequest func(lyxaction.lookupFunc(first));
-                       func.origin = cmd.origin;
+                       func.origin_ = cmd.origin_;
                        FuncStatus stat = getStatus(func);
                        if (stat.enabled()) {
                                dispatch(func);
@@ -1488,11 +1488,11 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
        case LFUN_CALL: {
                FuncRequest func;
                if (theTopLevelCmdDef().lock(argument, func)) {
-                       func.origin = cmd.origin;
+                       func.origin_ = cmd.origin_;
                        dispatch(func);
                        theTopLevelCmdDef().release(argument);
                } else {
-                       if (func.action == LFUN_UNKNOWN_ACTION) {
+                       if (func.action_ == LFUN_UNKNOWN_ACTION) {
                                // unknown command definition
                                lyxerr << "Warning: unknown command definition `"
                                                << argument << "'"
@@ -1606,11 +1606,11 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                // update completion. We do it here and not in
                // processKeySym to avoid another redraw just for a
                // changed inline completion
-               if (cmd.origin == FuncRequest::KEYBOARD) {
-                       if (cmd.action == LFUN_SELF_INSERT
-                                       || (cmd.action == LFUN_ERT_INSERT && bv->cursor().inMathed()))
+               if (cmd.origin_ == FuncRequest::KEYBOARD) {
+                       if (cmd.action_ == LFUN_SELF_INSERT
+                                       || (cmd.action_ == LFUN_ERT_INSERT && bv->cursor().inMathed()))
                                current_view_->updateCompletion(bv->cursor(), true, true);
-                       else if (cmd.action == LFUN_CHAR_DELETE_BACKWARD)
+                       else if (cmd.action_ == LFUN_CHAR_DELETE_BACKWARD)
                                current_view_->updateCompletion(bv->cursor(), false, true);
                        else
                                current_view_->updateCompletion(bv->cursor(), false, false);
@@ -1691,25 +1691,25 @@ void GuiApplication::processKeySym(KeySymbol const & keysym, KeyModifier state)
        d->cancel_meta_seq.reset();
 
        FuncRequest func = d->cancel_meta_seq.addkey(keysym, state);
-       LYXERR(Debug::KEY, "action first set to [" << func.action << ']');
+       LYXERR(Debug::KEY, "action first set to [" << func.action_ << ']');
 
        // When not cancel or meta-fake, do the normal lookup.
        // Note how the meta_fake Mod1 bit is OR-ed in and reset afterwards.
        // Mostly, meta_fake_bit = NoModifier. RVDK_PATCH_5.
-       if ((func.action != LFUN_CANCEL) && (func.action != LFUN_META_PREFIX)) {
+       if ((func.action_ != LFUN_CANCEL) && (func.action_ != LFUN_META_PREFIX)) {
                // remove Caps Lock and Mod2 as a modifiers
                func = d->keyseq.addkey(keysym, (state | d->meta_fake_bit));
-               LYXERR(Debug::KEY, "action now set to [" << func.action << ']');
+               LYXERR(Debug::KEY, "action now set to [" << func.action_ << ']');
        }
 
        // Dont remove this unless you know what you are doing.
        d->meta_fake_bit = NoModifier;
 
        // Can this happen now ?
-       if (func.action == LFUN_NOACTION)
+       if (func.action_ == LFUN_NOACTION)
                func = FuncRequest(LFUN_COMMAND_PREFIX);
 
-       LYXERR(Debug::KEY, " Key [action=" << func.action << "]["
+       LYXERR(Debug::KEY, " Key [action=" << func.action_ << "]["
                << d->keyseq.print(KeySequence::Portable) << ']');
 
        // already here we know if it any point in going further
@@ -1722,13 +1722,13 @@ void GuiApplication::processKeySym(KeySymbol const & keysym, KeyModifier state)
 
        // Maybe user can only reach the key via holding down shift.
        // Let's see. But only if shift is the only modifier
-       if (func.action == LFUN_UNKNOWN_ACTION && state == ShiftModifier) {
+       if (func.action_ == LFUN_UNKNOWN_ACTION && state == ShiftModifier) {
                LYXERR(Debug::KEY, "Trying without shift");
                func = d->keyseq.addkey(keysym, NoModifier);
-               LYXERR(Debug::KEY, "Action now " << func.action);
+               LYXERR(Debug::KEY, "Action now " << func.action_);
        }
 
-       if (func.action == LFUN_UNKNOWN_ACTION) {
+       if (func.action_ == LFUN_UNKNOWN_ACTION) {
                // Hmm, we didn't match any of the keysequences. See
                // if it's normal insertable text not already covered
                // by a binding
@@ -1744,7 +1744,7 @@ void GuiApplication::processKeySym(KeySymbol const & keysym, KeyModifier state)
                }
        }
 
-       if (func.action == LFUN_SELF_INSERT) {
+       if (func.action_ == LFUN_SELF_INSERT) {
                if (encoded_last_key != 0) {
                        docstring const arg(1, encoded_last_key);
                        lyx::dispatch(FuncRequest(LFUN_SELF_INSERT, arg,
index 725747e1b9f41f309d8f7135b956d0de65d9959e..81722f6107d01f9f4767791a38cb530fc9d81c69 100644 (file)
@@ -357,7 +357,7 @@ void GuiCommandBuffer::dispatch(string const & str)
        upPB->setEnabled(history_pos_ != history_.begin());
        downPB->setEnabled(history_pos_ != history_.end());
        FuncRequest func = lyxaction.lookupFunc(str);
-       func.origin = FuncRequest::COMMANDBUFFER;
+       func.origin_ = FuncRequest::COMMANDBUFFER;
        lyx::dispatch(func);
 }
 
index 57047f419d4dafe07c7bb2809acbecbbd20fa2b9..6ec1330a9f1ce00458660fa6f122537dfd484c55 100644 (file)
@@ -2562,7 +2562,7 @@ void PrefShortcuts::setItemType(QTreeWidgetItem * item, KeyMap::ItemType tag)
 QTreeWidgetItem * PrefShortcuts::insertShortcutItem(FuncRequest const & lfun,
                KeySequence const & seq, KeyMap::ItemType tag)
 {
-       FuncCode action = lfun.action;
+       FuncCode action = lfun.action_;
        string const action_name = lyxaction.getActionName(action);
        QString const lfun_name = toqstr(from_utf8(action_name)
                        + ' ' + lfun.argument());
@@ -2776,7 +2776,7 @@ void PrefShortcuts::on_searchLE_textEdited()
 
 docstring makeCmdString(FuncRequest const & f)
 {
-       docstring actionStr = from_ascii(lyxaction.getActionName(f.action));
+       docstring actionStr = from_ascii(lyxaction.getActionName(f.action_));
        if (!f.argument().empty())
                actionStr += " " + f.argument();
        return actionStr;
@@ -2788,7 +2788,7 @@ void PrefShortcuts::shortcutOkPressed()
        QString const new_lfun = shortcut_->lfunLE->text();
        FuncRequest func = lyxaction.lookupFunc(fromqstr(new_lfun));
 
-       if (func.action == LFUN_UNKNOWN_ACTION) {
+       if (func.action_ == LFUN_UNKNOWN_ACTION) {
                Alert::error(_("Failed to create shortcut"),
                        _("Unknown or invalid LyX function"));
                return;
@@ -2803,16 +2803,16 @@ void PrefShortcuts::shortcutOkPressed()
 
        // check to see if there's been any change
        FuncRequest oldBinding = system_bind_.getBinding(k);
-       if (oldBinding.action == LFUN_UNKNOWN_ACTION)
+       if (oldBinding.action_ == LFUN_UNKNOWN_ACTION)
                oldBinding = user_bind_.getBinding(k);
        if (oldBinding == func)
                // nothing has changed
                return;
        
        // make sure this key isn't already bound---and, if so, not unbound
-       FuncCode const unbind = user_unbind_.getBinding(k).action;
+       FuncCode const unbind = user_unbind_.getBinding(k).action_;
        docstring const action_string = makeCmdString(oldBinding);
-       if (oldBinding.action > LFUN_NOACTION && unbind == LFUN_UNKNOWN_ACTION
+       if (oldBinding.action_ > LFUN_NOACTION && unbind == LFUN_UNKNOWN_ACTION
                  && save_lfun_ != toqstr(action_string)) {
                // FIXME Perhaps we should offer to over-write the old shortcut?
                // If so, we'll need to remove it from our list, etc.
index 27f5fff4f7fdc151dea4e60fed1bdf2ee5d14072..44f16bb5d48e75b57fc43754851a2211be3f4bf9 100644 (file)
@@ -1388,7 +1388,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
                ? &(documentBufferView()->buffer()) : 0;
 
        // Check whether we need a buffer
-       if (!lyxaction.funcHasFlag(cmd.action, LyXAction::NoBuffer) && !buf) {
+       if (!lyxaction.funcHasFlag(cmd.action_, LyXAction::NoBuffer) && !buf) {
                // no, exit directly
                flag.message(from_utf8(N_("Command not allowed with"
                                        "out any document open")));
@@ -1396,7 +1396,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
                return true;
        }
 
-       if (cmd.origin == FuncRequest::TOC) {
+       if (cmd.origin_ == FuncRequest::TOC) {
                GuiToc * toc = static_cast<GuiToc*>(findOrBuild("toc", false));
                FuncStatus fs;
                if (toc->getStatus(documentBufferView()->cursor(), cmd, fs))
@@ -1406,7 +1406,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
                return true;
        }
 
-       switch(cmd.action) {
+       switch(cmd.action_) {
        case LFUN_BUFFER_IMPORT:
                break;
 
@@ -2533,7 +2533,7 @@ void GuiView::dispatchVC(FuncRequest const & cmd)
        Buffer * buffer = documentBufferView()
                ? &(documentBufferView()->buffer()) : 0;
 
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_VC_REGISTER:
                if (!buffer || !ensureBufferClean(buffer))
                        break;
@@ -2812,7 +2812,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
        Buffer * doc_buffer = documentBufferView()
                ? &(documentBufferView()->buffer()) : 0;
 
-       if (cmd.origin == FuncRequest::TOC) {
+       if (cmd.origin_ == FuncRequest::TOC) {
                GuiToc * toc = static_cast<GuiToc*>(findOrBuild("toc", false));
                // FIXME: do we need to pass a DispatchResult object here?
                toc->doDispatch(bv->cursor(), cmd);
@@ -2821,7 +2821,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
 
        string const argument = to_utf8(cmd.argument());
 
-       switch(cmd.action) {
+       switch(cmd.action_) {
                case LFUN_BUFFER_CHILD_OPEN:
                        openChildDocument(to_utf8(cmd.argument()));
                        break;
@@ -3186,7 +3186,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                case LFUN_BUFFER_ZOOM_IN:
                case LFUN_BUFFER_ZOOM_OUT:
                        if (cmd.argument().empty()) {
-                               if (cmd.action == LFUN_BUFFER_ZOOM_IN)
+                               if (cmd.action_ == LFUN_BUFFER_ZOOM_IN)
                                        lyxrc.zoom += 20;
                                else
                                        lyxrc.zoom -= 20;
index 9c4d306a65b78a1d7aa63c364cb850e6bfafe7ed..b01f3c81b9d360affda8cbfadec275fcaed6fd98 100644 (file)
@@ -472,7 +472,7 @@ void GuiWorkArea::processKeySym(KeySymbol const & key, KeyModifier mod)
 void GuiWorkArea::dispatch(FuncRequest const & cmd0, KeyModifier mod)
 {
        // Handle drag&drop
-       if (cmd0.action == LFUN_FILE_OPEN) {
+       if (cmd0.action_ == LFUN_FILE_OPEN) {
                DispatchResult dr;
                lyx_view_->dispatch(cmd0, dr);
                return;
@@ -480,7 +480,7 @@ void GuiWorkArea::dispatch(FuncRequest const & cmd0, KeyModifier mod)
 
        FuncRequest cmd;
 
-       if (cmd0.action == LFUN_MOUSE_PRESS) {
+       if (cmd0.action_ == LFUN_MOUSE_PRESS) {
                if (mod == ShiftModifier)
                        cmd = FuncRequest(cmd0, "region-select");
                else if (mod == ControlModifier)
@@ -492,7 +492,7 @@ void GuiWorkArea::dispatch(FuncRequest const & cmd0, KeyModifier mod)
                cmd = cmd0;
 
        bool const notJustMovingTheMouse =
-               cmd.action != LFUN_MOUSE_MOTION || cmd.button() != mouse_button::none;
+               cmd.action_ != LFUN_MOUSE_MOTION || cmd.button() != mouse_button::none;
 
        // In order to avoid bad surprise in the middle of an operation, we better stop
        // the blinking cursor.
@@ -502,7 +502,7 @@ void GuiWorkArea::dispatch(FuncRequest const & cmd0, KeyModifier mod)
        buffer_view_->mouseEventDispatch(cmd);
 
        // Skip these when selecting
-       if (cmd.action != LFUN_MOUSE_MOTION) {
+       if (cmd.action_ != LFUN_MOUSE_MOTION) {
                completer_->updateVisibility(false, false);
                lyx_view_->updateDialogs();
                lyx_view_->updateStatusBar();
@@ -776,9 +776,9 @@ void GuiWorkArea::mouseMoveEvent(QMouseEvent * e)
                // so they come at a steady rate:
                if (e->y() <= 20)
                        // _Force_ a scroll up:
-                       cmd.y = -40;
+                       cmd.y_ = -40;
                else
-                       cmd.y = viewport()->height();
+                       cmd.y_ = viewport()->height();
                // Store the event, to be handled when the timeout expires.
                synthetic_mouse_event_.cmd = cmd;
 
index fe6e5da5d8c9e2e423d05680f34ac1e8aab2fb2d..7cbfbc7e5689dc6c6848a32988b7093d32db21fb 100644 (file)
@@ -187,7 +187,7 @@ public:
                 FuncRequest::Origin origin = FuncRequest::MENU)
                : kind_(kind), label_(label), func_(func), optional_(optional)
        {
-               func_.origin = origin;
+               func_.origin_ = origin;
        }
 
        // boost::shared_ptr<MenuDefinition> needs this apprently...
@@ -233,7 +233,7 @@ public:
                        return toqstr(bindings.begin()->print(KeySequence::ForGui));
 
                LYXERR(Debug::KBMAP, "No binding for "
-                       << lyxaction.getActionName(func_.action)
+                       << lyxaction.getActionName(func_.action_)
                        << '(' << func_.argument() << ')');
                return QString();
        }
index b8de46efef8af74d2371f6c4fd5a9020be37dbb9..13e100a6a929cfa93d07e9bbce389fea309d01dd 100644 (file)
@@ -139,7 +139,7 @@ bool TocWidget::getStatus(Cursor & cur, FuncRequest const & cmd,
        TocItem const & item =
                gui_view_.tocModels().currentItem(current_type_, index);
 
-       switch (cmd.action)
+       switch (cmd.action_)
        {
        case LFUN_CHANGE_ACCEPT:
        case LFUN_CHANGE_REJECT:
@@ -179,7 +179,7 @@ void TocWidget::doDispatch(Cursor & cur, FuncRequest const & cmd)
        // Start an undo group.
        cur.beginUndoGroup();
 
-       switch (cmd.action)
+       switch (cmd.action_)
        {
        case LFUN_CHANGE_ACCEPT:
        case LFUN_CHANGE_REJECT:
@@ -200,7 +200,7 @@ void TocWidget::doDispatch(Cursor & cur, FuncRequest const & cmd)
        case LFUN_OUTLINE_DOWN:
        case LFUN_OUTLINE_IN:
        case LFUN_OUTLINE_OUT:
-               outline(cmd.action);
+               outline(cmd.action_);
                break;
 
        default:
index f395e52a0a65b147859a54b7f698ceb1ad4a34de..05bf6d7a983bb4f1bb1524cf956cbe53da3816a3 100644 (file)
@@ -55,7 +55,7 @@ ToolbarItem::ToolbarItem(Type type, string const & name, docstring const & label
 void ToolbarInfo::add(ToolbarItem const & item)
 {
        items.push_back(item);
-       items.back().func_.origin = FuncRequest::TOOLBAR;
+       items.back().func_.origin_ = FuncRequest::TOOLBAR;
 }
 
 
index 2587df3f68eb238d1f32d0eef0aced32886a764f..6d0d84a7bd116b5964271eb36db323e5a30b2c51 100644 (file)
@@ -322,7 +322,7 @@ bool Inset::showInsetDialog(BufferView * bv) const
 
 void Inset::doDispatch(Cursor & cur, FuncRequest &cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_MOUSE_RELEASE:
                // if the derived inset did not explicitly handle mouse_release,
                // we assume we request the settings dialog
@@ -360,7 +360,7 @@ bool Inset::getStatus(Cursor &, FuncRequest const & cmd,
        // Dialogs::checkStatus() ensures that the dialog is deactivated if
        // LFUN_INSET_APPLY is disabled.
 
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY:
                // Allow modification of our data.
                // This needs to be handled in the doDispatch method of our
index 434bd4c8b748c7721218ec362a2f7c455d40d6ca..4ff1d42cfba126406b9b64b19fc259d12cdd5183 100644 (file)
@@ -113,7 +113,7 @@ ParamInfo const & InsetBibitem::findInfo(string const & /* cmdName */)
 
 void InsetBibitem::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY: {
                InsetCommandParams p(BIBITEM_CODE);
index dff066f12c69a0551ac05ae433005286d8fb5cab..eb4c2eca277bf9e583f9ce7a9283ff40bb8f7aca 100644 (file)
@@ -77,7 +77,7 @@ ParamInfo const & InsetBibtex::findInfo(string const & /* cmdName */)
 
 void InsetBibtex::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_EDIT:
                editDatabases();
@@ -115,7 +115,7 @@ void InsetBibtex::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetBibtex::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_EDIT:
                flag.setEnabled(true);
                return true;
index 3b7dec3e19a9ffe49e03f82a10025d903bf88b3c..74c23b8d147700eb150a2063379f5514eab3caee 100644 (file)
@@ -186,7 +186,7 @@ bool InsetBox::forcePlainLayout(idx_type) const
 
 void InsetBox::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY: {
                //lyxerr << "InsetBox::dispatch MODIFY" << endl;
@@ -208,7 +208,7 @@ void InsetBox::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetBox::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "changetype")
index 5e943a7ff1298e18d6d8b71c2b90ef7095a6b5df..11f0ca780c6bfd017ffdcb8cdda9d701959395e1 100644 (file)
@@ -114,7 +114,7 @@ ColorCode InsetBranch::backgroundColor(PainterInfo const & pi) const
 
 void InsetBranch::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY: {
                InsetBranchParams params;
                InsetBranch::string2params(to_utf8(cmd.argument()), params);
@@ -133,7 +133,7 @@ void InsetBranch::doDispatch(Cursor & cur, FuncRequest & cmd)
                        if (!our_branch)
                                break;
                }
-               our_branch->setSelected(cmd.action == LFUN_BRANCH_ACTIVATE);
+               our_branch->setSelected(cmd.action_ == LFUN_BRANCH_ACTIVATE);
                break;
        }
        case LFUN_INSET_TOGGLE:
@@ -153,7 +153,7 @@ void InsetBranch::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetBranch::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY:
                flag.setEnabled(true);
                break;
index 9046d054e5ee688b8a5b93fccff5d060afab2f03..66ef6683f3d5030ed18db3cd9b26d6876513fa76 100644 (file)
@@ -192,7 +192,7 @@ bool InsetCaption::insetAllowed(InsetCode code) const
 bool InsetCaption::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_BREAK_PARAGRAPH:
                status.setEnabled(false);
index dc9939e5acfe1e63223cdf10574726acca0a79bd..2ca651500f390bf2d57bee8b5061327b596b0534 100644 (file)
@@ -405,7 +405,7 @@ bool InsetCollapsable::descendable(BufferView const & bv) const
 
 bool InsetCollapsable::hitButton(FuncRequest const & cmd) const
 {
-       return button_dim.contains(cmd.x, cmd.y);
+       return button_dim.contains(cmd.x_, cmd.y_);
 }
 
 
@@ -455,7 +455,7 @@ void InsetCollapsable::doDispatch(Cursor & cur, FuncRequest & cmd)
        //lyxerr << "InsetCollapsable::doDispatch (begin): cmd: " << cmd
        //      << " cur: " << cur << " bvcur: " << cur.bv().cursor() << endl;
 
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_MOUSE_PRESS:
                if (hitButton(cmd)) {
                        switch (cmd.button()) {
@@ -548,7 +548,7 @@ void InsetCollapsable::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_TOGGLE:
                if (cmd.argument() == "open")
                        flag.setEnabled(status_ != Open);
index e68df838a52de70bdcc4321d1340f7b1569b6b06..6f9a114fdf5de2b9372657a8371b48f5cf803c64 100644 (file)
@@ -131,7 +131,7 @@ int InsetCommand::docbook(odocstream &, OutputParams const &) const
 
 void InsetCommand::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY: {
                if (cmd.getArg(0) == "changetype") {
                        p_.setCmdName(cmd.getArg(1));
@@ -164,7 +164,7 @@ void InsetCommand::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetCommand::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        // suppress these
        case LFUN_ERT_INSERT:
                status.setEnabled(false);
index 17639299238d3ad9508b0ba139dbf3eb719a00dc..0670a9596516bac96a724ae701cddb52f09ba8ac 100644 (file)
@@ -111,7 +111,7 @@ int InsetERT::docbook(odocstream & os, OutputParams const &) const
 
 void InsetERT::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY: {
                setStatus(cur, string2params(to_utf8(cmd.argument())));
                break;
@@ -126,7 +126,7 @@ void InsetERT::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY:
                status.setEnabled(true);
                return true;
index 058b4be3218c6071e1b16b53ba3aa16ab6af75b1..389056155189076640fc87a0ecef5cd242e23c8e 100644 (file)
@@ -393,7 +393,7 @@ void InsetExternal::statusChanged() const
 
 void InsetExternal::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_EDIT: {
                InsetExternalParams p =  params();
@@ -424,7 +424,7 @@ void InsetExternal::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetExternal::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_EDIT:
        case LFUN_INSET_MODIFY:
index 821e4db6d7f22013134d7eb89e7b89113f769412..2e9e97096fd51a6dca41717ac97af1b671c21f76 100644 (file)
@@ -60,7 +60,7 @@ void InsetFlex::write(ostream & os) const
 bool InsetFlex::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_DISSOLVE:
                if (!cmd.argument().empty()) {
                        InsetLayout const & il = getLayout();
@@ -81,7 +81,7 @@ bool InsetFlex::getStatus(Cursor & cur, FuncRequest const & cmd,
 
 void InsetFlex::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_DISSOLVE:
                if (!cmd.argument().empty()) {
                        InsetLayout const & il = getLayout();
index dfbd208c9f36cd0c3f2a54321a34e04db60859fc..8d2a382e595a3e24ae7c6632c03b854c73fea6ab 100644 (file)
@@ -137,7 +137,7 @@ docstring InsetFloat::toolTip(BufferView const & bv, int x, int y) const
 
 void InsetFloat::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY: {
                InsetFloatParams params;
@@ -172,7 +172,7 @@ void InsetFloat::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetFloat::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY:
        case LFUN_INSET_DIALOG_UPDATE:
index ec085707b4e15de8179e4ac3e24f047c9150f3a0..d194cfff1ffa8ece03664247a31c6dfc69fb8808 100644 (file)
@@ -192,7 +192,7 @@ InsetGraphics::~InsetGraphics()
 
 void InsetGraphics::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_EDIT: {
                InsetGraphicsParams p = params();
                if (!cmd.argument().empty())
@@ -237,7 +237,7 @@ void InsetGraphics::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetGraphics::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_EDIT:
        case LFUN_INSET_MODIFY:
        case LFUN_INSET_DIALOG_UPDATE:
index 777d28e701700c5a503611385b5bbe991c7ee048..b223d713fd936ce3314cb0e2f88318e395090330 100644 (file)
@@ -227,7 +227,7 @@ bool InsetInclude::isCompatibleCommand(string const & s)
 
 void InsetInclude::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_EDIT: {
                editIncluded(to_utf8(params()["filename"]));
@@ -304,7 +304,7 @@ void InsetInclude::editIncluded(string const & file)
 bool InsetInclude::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_EDIT:
                flag.setEnabled(true);
index bf82b2dd310147a961b73b2bd03ba5527ba74006..9811098b1dda471a6335db615f379a3e3f030bb4 100644 (file)
@@ -196,7 +196,7 @@ bool InsetIndex::showInsetDialog(BufferView * bv) const
 
 void InsetIndex::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY: {
                if (cmd.getArg(0) == "changetype") {
@@ -223,7 +223,7 @@ void InsetIndex::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetIndex::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "changetype") {
@@ -462,7 +462,7 @@ bool InsetPrintIndex::isCompatibleCommand(string const & s)
 
 void InsetPrintIndex::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY: {
                if (cmd.argument() == from_ascii("toggle-subindex")) {
@@ -504,7 +504,7 @@ void InsetPrintIndex::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetPrintIndex::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY: {
                if (cmd.argument() == from_ascii("toggle-subindex")) {
index f521d3b46d8cb092dad18639105234027812c9f8..ca4c081e0198daa30561ebb88a5bc6e915dcbe0c 100644 (file)
@@ -162,7 +162,7 @@ bool InsetInfo::validateModifyArgument(docstring const & arg) const
        case MENU_INFO:
        case ICON_INFO: {
                FuncRequest func = lyxaction.lookupFunc(name);
-               return func.action != LFUN_UNKNOWN_ACTION;
+               return func.action_ != LFUN_UNKNOWN_ACTION;
        }
        case LYXRC_INFO: {
                ostringstream oss;
@@ -191,7 +191,7 @@ bool InsetInfo::showInsetDialog(BufferView * bv) const
 bool InsetInfo::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_SETTINGS:
                return InsetCollapsable::getStatus(cur, cmd, flag);
                
@@ -215,7 +215,7 @@ bool InsetInfo::getStatus(Cursor & cur, FuncRequest const & cmd,
 void InsetInfo::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
        // allow selection, copy but not cut, delete etc
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_SETTINGS:
                InsetCollapsable::doDispatch(cur, cmd);
                break;
@@ -266,7 +266,7 @@ void InsetInfo::updateInfo()
        case SHORTCUT_INFO:
        case SHORTCUTS_INFO: {
                FuncRequest func = lyxaction.lookupFunc(name_);
-               if (func.action == LFUN_UNKNOWN_ACTION) {
+               if (func.action_ == LFUN_UNKNOWN_ACTION) {
                        error("Unknown action %1$s");
                        break;
                }
@@ -306,7 +306,7 @@ void InsetInfo::updateInfo()
        case MENU_INFO: {
                docstring_list names;
                FuncRequest func = lyxaction.lookupFunc(name_);
-               if (func.action == LFUN_UNKNOWN_ACTION) {
+               if (func.action_ == LFUN_UNKNOWN_ACTION) {
                        error("Unknown action %1$s");
                        break;
                }
index 7edd1aaca832936bdb61baf4706ff93455bae29b..f0bcd2671b5c2c20772444ada9a3171c6137bf2c 100644 (file)
@@ -177,7 +177,7 @@ bool InsetLabel::getStatus(Cursor & cur, FuncRequest const & cmd,
                           FuncStatus & status) const
 {
        bool enabled;
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_LABEL_INSERT_AS_REF:
        case LFUN_LABEL_COPY_AS_REF:
                enabled = true;
@@ -193,7 +193,7 @@ bool InsetLabel::getStatus(Cursor & cur, FuncRequest const & cmd,
 
 void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY: {
                InsetCommandParams p(LABEL_CODE);
index de0e26ae45c4b04bc3b24dd8fa839eead056c1ee..14ac5a5287ae650eaf78544833821cbd107a0154 100644 (file)
@@ -312,7 +312,7 @@ docstring InsetListings::contextMenu(BufferView const &, int, int) const
 
 void InsetListings::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY: {
                InsetListings::string2params(to_utf8(cmd.argument()), params());
@@ -333,7 +333,7 @@ void InsetListings::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetListings::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
                case LFUN_INSET_MODIFY:
                case LFUN_INSET_DIALOG_UPDATE:
                        status.setEnabled(true);
index c74d16f89a593286272a32c529b9176948c72fa3..71302decab10e80f4facea67f2f9bc9ee52438bc 100644 (file)
@@ -90,7 +90,7 @@ void InsetNewline::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetNewline::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY: {
                InsetNewlineParams params;
@@ -109,7 +109,7 @@ void InsetNewline::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetNewline::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        // we handle these
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "newline") {
index 52e20d69e9e5afa9d8531288c8b1bf4719c4684a..46ad3bdbd5ba8ac634e7b443fe2f90a863c147de 100644 (file)
@@ -137,7 +137,7 @@ void InsetNewpage::draw(PainterInfo & pi, int x, int y) const
 
 void InsetNewpage::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY: {
                InsetNewpageParams params;
@@ -156,7 +156,7 @@ void InsetNewpage::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetNewpage::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        // we handle these
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "newpage") {
index 57f38647d0d845ded7a2b7f25b962dc70abd7054..99e4c5dd6b4d866f948279109f27bec1a4d436e8 100644 (file)
@@ -164,7 +164,7 @@ docstring InsetPrintNomencl::screenLabel() const
 
 void InsetPrintNomencl::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY: {
                InsetCommandParams p(NOMENCL_PRINT_CODE);
@@ -189,7 +189,7 @@ void InsetPrintNomencl::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetPrintNomencl::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_DIALOG_UPDATE:
        case LFUN_INSET_MODIFY:
index de03d61b6b46a4e95e5f94daa78a9e6472ecf043..fac99bc8161408444ea83223bd3b9ecb5f77436a 100644 (file)
@@ -171,7 +171,7 @@ bool InsetNote::showInsetDialog(BufferView * bv) const
 
 void InsetNote::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY:
                string2params(to_utf8(cmd.argument()), params_);
@@ -192,7 +192,7 @@ void InsetNote::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetNote::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY:
                // disallow comment and greyed out in commands
index d21b0b1bf58d09399d68c4cff72d65c20186fb2a..fa59fab62007c1d80d544052fe536386eb08b967 100644 (file)
@@ -256,7 +256,7 @@ bool InsetPhantom::showInsetDialog(BufferView * bv) const
 
 void InsetPhantom::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY:
                string2params(to_utf8(cmd.argument()), params_);
@@ -276,7 +276,7 @@ void InsetPhantom::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetPhantom::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "phantom") {
index 3d9f0abef85d7c114cc519aa30a4e11fc6c92786..8f57a453e92ac0c23f3cd8b562195f9fd0e0235c 100644 (file)
@@ -141,7 +141,7 @@ docstring InsetSpace::toolTip(BufferView const &, int, int) const
 
 void InsetSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY:
                string2params(to_utf8(cmd.argument()), params_);
@@ -161,7 +161,7 @@ void InsetSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        // we handle these
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "space") {
index d398c87f4c40bffe1d332f733c0bf493e1fb4aa5..58a3b9b11623364ef2de257c527b1d012a12d7af 100644 (file)
@@ -3050,7 +3050,7 @@ bool InsetTableCell::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
        bool enabled;
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_LAYOUT:
                enabled = !forcePlainLayout();
                break;
@@ -3505,14 +3505,14 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
        CursorSlice sl = cur.top();
        Cursor & bvcur = cur.bv().cursor();
 
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_MOUSE_PRESS: {
                //lyxerr << "# InsetTabular::MousePress\n" << cur.bv().cursor() << endl;
                // select row
-               if (cmd.x < xo(cur.bv()) + ADD_TO_TABULAR_WIDTH
-                       || cmd.x > xo(cur.bv()) + tabular.width()) {
-                       row_type r = rowFromY(cur, cmd.y);
+               if (cmd.x_ < xo(cur.bv()) + ADD_TO_TABULAR_WIDTH
+                       || cmd.x_ > xo(cur.bv()) + tabular.width()) {
+                       row_type r = rowFromY(cur, cmd.y_);
                        cur.idx() = tabular.getFirstCellInRow(r);
                        cur.pos() = 0;
                        cur.resetAnchor();
@@ -3525,9 +3525,9 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
                }
                // select column
                int const y0 = yo(cur.bv()) - tabular.rowAscent(0);
-               if (cmd.y < y0 + ADD_TO_TABULAR_WIDTH 
-                       || cmd.y > y0 + tabular.height()) {
-                       col_type c = columnFromX(cur, cmd.x);
+               if (cmd.y_ < y0 + ADD_TO_TABULAR_WIDTH 
+                       || cmd.y_ > y0 + tabular.height()) {
+                       col_type c = columnFromX(cur, cmd.x_);
                        cur.idx() = tabular.cellIndex(0, c);
                        cur.pos() = 0;
                        cur.resetAnchor();
@@ -3559,7 +3559,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
                        }
                        // select (additional) row
                        if (rowselect_) {
-                               row_type r = rowFromY(cur, cmd.y);
+                               row_type r = rowFromY(cur, cmd.y_);
                                cur.idx() = tabular.getLastCellInRow(r);
                                // we need to reset the cursor's pit and pos now, as the old ones
                                // may no longer be valid.
@@ -3571,7 +3571,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
                        }
                        // select (additional) column
                        if (colselect_) {
-                               col_type c = columnFromX(cur, cmd.x);
+                               col_type c = columnFromX(cur, cmd.x_);
                                cur.idx() = tabular.cellIndex(tabular.nrows() - 1, c);
                                // we need to reset the cursor's pit and pos now, as the old ones
                                // may no longer be valid.
@@ -3585,7 +3585,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
                        if (bvcur.idx() == cur.idx() &&
                                !(bvcur.anchor_.idx() == cur.idx() && bvcur.pos() != cur.pos()))
                                cur.noUpdate();
-                       setCursorFromCoordinates(cur, cmd.x, cmd.y);
+                       setCursorFromCoordinates(cur, cmd.x_, cmd.y_);
                        bvcur.setCursor(cur);
                        bvcur.setSelection(true);
                        // if this is a multicell selection, we just set the cursor to
@@ -3627,21 +3627,21 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
                EntryDirection entry_from = ENTRY_DIRECTION_IGNORE;
                FuncCode finish_lfun;
 
-               if (cmd.action == LFUN_CHAR_FORWARD 
-                               || cmd.action == LFUN_CHAR_FORWARD_SELECT) {
+               if (cmd.action_ == LFUN_CHAR_FORWARD 
+                               || cmd.action_ == LFUN_CHAR_FORWARD_SELECT) {
                        next_cell = true;
                        finish_lfun = LFUN_FINISHED_FORWARD;
                }
-               else if (cmd.action == LFUN_CHAR_BACKWARD
-                               || cmd.action == LFUN_CHAR_BACKWARD_SELECT) {
+               else if (cmd.action_ == LFUN_CHAR_BACKWARD
+                               || cmd.action_ == LFUN_CHAR_BACKWARD_SELECT) {
                        next_cell = false;
                        finish_lfun = LFUN_FINISHED_BACKWARD;
                }
                // LEFT or RIGHT commands --- the interpretation will depend on the 
                // table's direction.
                else {
-                       bool const right = cmd.action == LFUN_CHAR_RIGHT
-                               || cmd.action == LFUN_CHAR_RIGHT_SELECT;
+                       bool const right = cmd.action_ == LFUN_CHAR_RIGHT
+                               || cmd.action_ == LFUN_CHAR_RIGHT_SELECT;
                        next_cell = isRightToLeft(cur) != right;
                        
                        if (lyxrc.visual_cursor)
@@ -3650,10 +3650,10 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
                        finish_lfun = right ? LFUN_FINISHED_RIGHT : LFUN_FINISHED_LEFT;
                }
 
-               bool const select = cmd.action == LFUN_CHAR_FORWARD_SELECT ||
-                   cmd.action == LFUN_CHAR_BACKWARD_SELECT ||
-                   cmd.action == LFUN_CHAR_RIGHT_SELECT ||
-                   cmd.action == LFUN_CHAR_LEFT_SELECT;
+               bool const select = cmd.action_ == LFUN_CHAR_FORWARD_SELECT ||
+                   cmd.action_ == LFUN_CHAR_BACKWARD_SELECT ||
+                   cmd.action_ == LFUN_CHAR_RIGHT_SELECT ||
+                   cmd.action_ == LFUN_CHAR_LEFT_SELECT;
 
                // If we have a multicell selection or we're 
                // not doing some LFUN_*_SELECT thing anyway...
@@ -3715,7 +3715,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
                        // if our Text didn't do anything to the cursor
                        // then we try to put the cursor into the cell below
                        // setting also the right targetX.
-                       cur.selHandle(cmd.action == LFUN_DOWN_SELECT);
+                       cur.selHandle(cmd.action_ == LFUN_DOWN_SELECT);
                        if (tabular.cellRow(cur.idx()) != tabular.nrows() - 1) {
                                cur.idx() = tabular.cellBelow(cur.idx());
                                cur.pit() = 0;
@@ -3748,7 +3748,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
                        // if our Text didn't do anything to the cursor
                        // then we try to put the cursor into the cell above
                        // setting also the right targetX.
-                       cur.selHandle(cmd.action == LFUN_UP_SELECT);
+                       cur.selHandle(cmd.action_ == LFUN_UP_SELECT);
                        if (tabular.cellRow(cur.idx()) != 0) {
                                cur.idx() = tabular.cellAbove(cur.idx());
                                cur.pit() = cur.lastpit();
@@ -3876,7 +3876,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
 
        case LFUN_CLIPBOARD_PASTE:
        case LFUN_PRIMARY_SELECTION_PASTE: {
-               docstring const clip = (cmd.action == LFUN_CLIPBOARD_PASTE) ?
+               docstring const clip = (cmd.action_ == LFUN_CLIPBOARD_PASTE) ?
                        theClipboard().getAsText() :
                        theSelection().get();
                if (clip.empty())
@@ -3977,7 +3977,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY: {
                if (&cur.inset() != this || cmd.getArg(0) != "tabular") 
                        break;
index e5b3e1308bec44d83b34b9808769d2f9fff148fa..c29742cb0e2e34c87ceeb31c3069b291c1022dc1 100644 (file)
@@ -241,7 +241,7 @@ Inset * InsetText::editXY(Cursor & cur, int x, int y)
 void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
        LYXERR(Debug::ACTION, "InsetText::doDispatch()"
-               << " [ cmd.action = " << cmd.action << ']');
+               << " [ cmd.action_ = " << cmd.action_ << ']');
 
        if (getLayout().isPassThru()) {
                // Force any new text to latex_language FIXME: This
@@ -254,7 +254,7 @@ void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd)
                cur.real_current_font.setLanguage(latex_language);
        }
 
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_PASTE:
        case LFUN_CLIPBOARD_PASTE:
        case LFUN_SELECTION_PASTE:
@@ -297,7 +297,7 @@ void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_DISSOLVE: {
                bool const main_inset = &buffer().inset() == this;
                bool const target_inset = cmd.argument().empty() 
index bcbe0decc9370107a4673467f73566fc5cefc8e3..0649f9c91af28b9649d6b1c312a30c9a8d6e86b3 100644 (file)
@@ -55,7 +55,7 @@ InsetVSpace::InsetVSpace(VSpace const & space)
 
 void InsetVSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_INSET_MODIFY: {
                InsetVSpace::string2params(to_utf8(cmd.argument()), space_);
@@ -72,7 +72,7 @@ void InsetVSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetVSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        // we handle these
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "vspace") {
index 97fed142ec0a017fbbab2fae57d688f82544029e..5b03dfb8512ec0a29bd22c73d29afa6bf07a6f96 100644 (file)
@@ -77,7 +77,7 @@ docstring InsetWrap::toolTip(BufferView const & bv, int x, int y) const
 
 void InsetWrap::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY: {
                InsetWrapParams params;
                InsetWrap::string2params(to_utf8(cmd.argument()), params);
@@ -102,7 +102,7 @@ void InsetWrap::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetWrap::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY:
        case LFUN_INSET_DIALOG_UPDATE:
                flag.setEnabled(true);
index 987166411b0cd79fc9a18890f8b81857162d9866..a556a491732852fdd07a41f32d32359147b2660a 100644 (file)
@@ -285,7 +285,7 @@ docstring const replace2string(docstring const & replace,
 
 bool find(BufferView * bv, FuncRequest const & ev)
 {
-       if (!bv || ev.action != LFUN_WORD_FIND)
+       if (!bv || ev.action_ != LFUN_WORD_FIND)
                return false;
 
        //lyxerr << "find called, cmd: " << ev << endl;
@@ -306,7 +306,7 @@ bool find(BufferView * bv, FuncRequest const & ev)
 
 void replace(BufferView * bv, FuncRequest const & ev, bool has_deleted)
 {
-       if (!bv || ev.action != LFUN_WORD_REPLACE)
+       if (!bv || ev.action_ != LFUN_WORD_REPLACE)
                return;
 
        // data is of the form
index d2921c6f536a67f024fcfcd0a564fe3fd04ef317..2d251f9f1e56bc795418b76be6f6c44ec9c2ce46 100644 (file)
@@ -106,7 +106,7 @@ void InsetMathAMSArray::draw(PainterInfo & pi, int x, int y) const
 bool InsetMathAMSArray::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY: {
                istringstream is(to_utf8(cmd.argument()));
                string s;
index 26ab7b2d96c55739cf582c3aee18c1d5cd5c6ab2..29eb2907de7326b0e60c1a838999272c46554d7b 100644 (file)
@@ -70,7 +70,7 @@ void InsetMathCases::draw(PainterInfo & pi, int x, int y) const
 void InsetMathCases::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
        //lyxerr << "*** InsetMathCases: request: " << cmd << endl;
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY: {
                istringstream is(to_utf8(cmd.argument()));
                string s;
@@ -96,7 +96,7 @@ void InsetMathCases::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetMathCases::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY: {
                istringstream is(to_utf8(cmd.argument()));
                string s;
index 036aea410bb68ce950d2f9635fbed9a2bd45e286..e83997b731883882d8a4ff2c12c1c8e0d1050592 100644 (file)
@@ -1126,7 +1126,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
 
        Parse::flags parseflg = Parse::QUIET | Parse::USETEXT;
 
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        // insert file functions
        case LFUN_LINE_DELETE:
@@ -1379,9 +1379,9 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_WORD_BACKWARD:
        case LFUN_WORD_LEFT_SELECT:
        case LFUN_WORD_LEFT:
-               cur.selHandle(cmd.action == LFUN_WORD_BACKWARD_SELECT ||
-                               cmd.action == LFUN_WORD_LEFT_SELECT ||
-                               cmd.action == LFUN_LINE_BEGIN_SELECT);
+               cur.selHandle(cmd.action_ == LFUN_WORD_BACKWARD_SELECT ||
+                               cmd.action_ == LFUN_WORD_LEFT_SELECT ||
+                               cmd.action_ == LFUN_LINE_BEGIN_SELECT);
                cur.macroModeClose();
                if (cur.pos() != 0) {
                        cur.pos() = 0;
@@ -1403,9 +1403,9 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_WORD_RIGHT:
        case LFUN_LINE_END_SELECT:
        case LFUN_LINE_END:
-               cur.selHandle(cmd.action == LFUN_WORD_FORWARD_SELECT ||
-                               cmd.action == LFUN_WORD_RIGHT_SELECT ||
-                               cmd.action == LFUN_LINE_END_SELECT);
+               cur.selHandle(cmd.action_ == LFUN_WORD_FORWARD_SELECT ||
+                               cmd.action_ == LFUN_WORD_RIGHT_SELECT ||
+                               cmd.action_ == LFUN_LINE_END_SELECT);
                cur.macroModeClose();
                cur.clearTargetX();
                if (cur.pos() != cur.lastpos()) {
@@ -1431,7 +1431,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetMathGrid::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY: {
                istringstream is(to_utf8(cmd.argument()));
                string s;
index 5450bba7f8874fb43eebbdc7d0102a20c6a26f9f..2cf781ca667a572bbf788452e9e2c145b960f430 100644 (file)
@@ -1230,14 +1230,14 @@ void InsetMathHull::doExtern(Cursor & cur, FuncRequest & func)
 
 void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       //lyxerr << "action: " << cmd.action << endl;
-       switch (cmd.action) {
+       //lyxerr << "action: " << cmd.action_ << endl;
+       switch (cmd.action_) {
 
        case LFUN_FINISHED_BACKWARD:
        case LFUN_FINISHED_FORWARD:
        case LFUN_FINISHED_RIGHT:
        case LFUN_FINISHED_LEFT:
-               //lyxerr << "action: " << cmd.action << endl;
+               //lyxerr << "action: " << cmd.action_ << endl;
                InsetMathGrid::doDispatch(cur, cmd);
                cur.undispatched();
                break;
@@ -1425,7 +1425,7 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_FINISHED_BACKWARD:
        case LFUN_FINISHED_FORWARD:
        case LFUN_FINISHED_RIGHT:
index 5060c8bc9c0be63b75c807fe3fcdc6f046cf1cce..670ebc7354255aaf3ae5fc8f923dd1f8f44b3943 100644 (file)
@@ -542,7 +542,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
 
        Parse::flags parseflg = Parse::QUIET | Parse::USETEXT;
 
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_CLIPBOARD_PASTE:
                parseflg |= Parse::VERBATIM;
@@ -619,10 +619,10 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_CHAR_BACKWARD_SELECT:
        case LFUN_CHAR_FORWARD_SELECT: {
                // are we in a selection?
-               bool select = (cmd.action == LFUN_CHAR_RIGHT_SELECT
-                                          || cmd.action == LFUN_CHAR_LEFT_SELECT
-                                          || cmd.action == LFUN_CHAR_BACKWARD_SELECT
-                                          || cmd.action == LFUN_CHAR_FORWARD_SELECT);
+               bool select = (cmd.action_ == LFUN_CHAR_RIGHT_SELECT
+                                          || cmd.action_ == LFUN_CHAR_LEFT_SELECT
+                                          || cmd.action_ == LFUN_CHAR_BACKWARD_SELECT
+                                          || cmd.action_ == LFUN_CHAR_FORWARD_SELECT);
                // are we moving forward or backwards?
                // If the command was RIGHT or LEFT, then whether we're moving forward
                // or backwards depends on the cursor movement mode (logical or visual):
@@ -634,19 +634,19 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                bool forward;
                FuncCode finish_lfun;
 
-               if (cmd.action == LFUN_CHAR_FORWARD
-                               || cmd.action == LFUN_CHAR_FORWARD_SELECT) {
+               if (cmd.action_ == LFUN_CHAR_FORWARD
+                               || cmd.action_ == LFUN_CHAR_FORWARD_SELECT) {
                        forward = true;
                        finish_lfun = LFUN_FINISHED_FORWARD;
                }
-               else if (cmd.action == LFUN_CHAR_BACKWARD
-                               || cmd.action == LFUN_CHAR_BACKWARD_SELECT) {
+               else if (cmd.action_ == LFUN_CHAR_BACKWARD
+                               || cmd.action_ == LFUN_CHAR_BACKWARD_SELECT) {
                        forward = false;
                        finish_lfun = LFUN_FINISHED_BACKWARD;
                }
                else {
-                       bool right = (cmd.action == LFUN_CHAR_RIGHT_SELECT
-                                                 || cmd.action == LFUN_CHAR_RIGHT);
+                       bool right = (cmd.action_ == LFUN_CHAR_RIGHT_SELECT
+                                                 || cmd.action_ == LFUN_CHAR_RIGHT);
                        if (lyxrc.visual_cursor || !reverseDirectionNeeded(cur))
                                forward = right;
                        else
@@ -683,12 +683,12 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                }
 
                // stop/start the selection
-               bool select = cmd.action == LFUN_DOWN_SELECT ||
-                       cmd.action == LFUN_UP_SELECT;
+               bool select = cmd.action_ == LFUN_DOWN_SELECT ||
+                       cmd.action_ == LFUN_UP_SELECT;
                cur.selHandle(select);
 
                // go up/down
-               bool up = cmd.action == LFUN_UP || cmd.action == LFUN_UP_SELECT;
+               bool up = cmd.action_ == LFUN_UP || cmd.action_ == LFUN_UP_SELECT;
                bool successful = cur.upDownInMath(up);
                if (successful)
                        break;
@@ -728,9 +728,9 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_LINE_BEGIN_SELECT:
        case LFUN_WORD_BACKWARD_SELECT:
        case LFUN_WORD_LEFT_SELECT:
-               cur.selHandle(cmd.action == LFUN_WORD_BACKWARD_SELECT ||
-                               cmd.action == LFUN_WORD_LEFT_SELECT ||
-                               cmd.action == LFUN_LINE_BEGIN_SELECT);
+               cur.selHandle(cmd.action_ == LFUN_WORD_BACKWARD_SELECT ||
+                               cmd.action_ == LFUN_WORD_LEFT_SELECT ||
+                               cmd.action_ == LFUN_LINE_BEGIN_SELECT);
                cur.macroModeClose();
                if (cur.pos() != 0) {
                        cur.pos() = 0;
@@ -753,9 +753,9 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_WORD_FORWARD_SELECT:
        case LFUN_WORD_RIGHT_SELECT:
        case LFUN_LINE_END_SELECT:
-               cur.selHandle(cmd.action == LFUN_WORD_FORWARD_SELECT ||
-                               cmd.action == LFUN_WORD_RIGHT_SELECT ||
-                               cmd.action == LFUN_LINE_END_SELECT);
+               cur.selHandle(cmd.action_ == LFUN_WORD_FORWARD_SELECT ||
+                               cmd.action_ == LFUN_WORD_RIGHT_SELECT ||
+                               cmd.action_ == LFUN_LINE_END_SELECT);
                cur.macroModeClose();
                cur.clearTargetX();
                if (cur.pos() != cur.lastpos()) {
@@ -1146,7 +1146,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_MATH_MACRO_FOLD:
        case LFUN_MATH_MACRO_UNFOLD: {
                Cursor it = cur;
-               bool fold = cmd.action == LFUN_MATH_MACRO_FOLD;
+               bool fold = cmd.action_ == LFUN_MATH_MACRO_FOLD;
                bool found = findMacroToFoldUnfold(it, fold);
                if (found) {
                        MathMacro * macro = it.nextInset()->asInsetMath()->asMacro();
@@ -1264,7 +1264,7 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd,
        //string tc = "mathnormal";
        bool ret = true;
        string const arg = to_utf8(cmd.argument());
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY:
                flag.setEnabled(false);
                break;
@@ -1353,7 +1353,7 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_MATH_MACRO_FOLD:
        case LFUN_MATH_MACRO_UNFOLD: {
                Cursor it = cur;
-               bool found = findMacroToFoldUnfold(it, cmd.action == LFUN_MATH_MACRO_FOLD);
+               bool found = findMacroToFoldUnfold(it, cmd.action_ == LFUN_MATH_MACRO_FOLD);
                flag.setEnabled(found);
                break;
        }
index 859845faaa2cccc4d4266c5278a2255096b9ba90..206a40040e0e4c88d8529d29a50b1c418d4c8bb8 100644 (file)
@@ -61,7 +61,7 @@ void InsetMathRef::infoize(odocstream & os) const
 
 void InsetMathRef::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "ref") {
                        MathData ar;
@@ -110,7 +110,7 @@ void InsetMathRef::doDispatch(Cursor & cur, FuncRequest & cmd)
 bool InsetMathRef::getStatus(Cursor & cur, FuncRequest const & cmd,
                         FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        // we handle these
        case LFUN_INSET_MODIFY:
        case LFUN_INSET_DIALOG_UPDATE:
index 37a6857552da4adc9674dd035e168dfac944044a..2339a7a568028a760688372f472516c721bd9f72 100644 (file)
@@ -753,7 +753,7 @@ void InsetMathScript::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
        //LYXERR("InsetMathScript: request: " << cmd);
 
-       if (cmd.action == LFUN_MATH_LIMITS) {
+       if (cmd.action_ == LFUN_MATH_LIMITS) {
                if (!cmd.argument().empty()) {
                        if (cmd.argument() == "limits")
                                limits_ = 1;
index 985e93f12784adc0040e311960fdf3df19da5a10..271ff9bce3f79ef883a5c5bf87a123ab32178b1b 100644 (file)
@@ -277,7 +277,7 @@ docstring InsetMathSpace::contextMenu(BufferView const &, int, int) const
 bool InsetMathSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
                                FuncStatus & status) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        // we handle these
        case LFUN_INSET_MODIFY:
        case LFUN_INSET_DIALOG_UPDATE:
@@ -295,7 +295,7 @@ bool InsetMathSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
 
 void InsetMathSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "mathspace") {
                        MathData ar;
index fb97bee592731146d83563408ed03b365676b0bd..7cbd297111704f19019feaf41104816d16a50a51 100644 (file)
@@ -69,7 +69,7 @@ void InsetMathSplit::draw(PainterInfo & pi, int x, int y) const
 bool InsetMathSplit::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY: {
                istringstream is(to_utf8(cmd.argument()));
                string s;
index 5f7e9f644b5adf841281843abde648c4eacc631f..6abb883fc932f3d3f46f3cc761dc2242b3384ded 100644 (file)
@@ -62,7 +62,7 @@ void InsetMathSubstack::draw(PainterInfo & pi, int x, int y) const
 bool InsetMathSubstack::getStatus(Cursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
-       switch (cmd.action) {
+       switch (cmd.action_) {
        case LFUN_INSET_MODIFY: {
                istringstream is(to_utf8(cmd.argument()));
                string s;
index ec5c8a72907be703b438b69f57e3037455b8959d..8390efb0d48414c099e106232c05197c547ff2a9 100644 (file)
@@ -974,7 +974,7 @@ void MathMacroTemplate::makeNonOptional(Cursor & cur,
 void MathMacroTemplate::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
        string const arg = to_utf8(cmd.argument());
-       switch (cmd.action) {
+       switch (cmd.action_) {
 
        case LFUN_MATH_MACRO_ADD_PARAM:
                if (numargs_ < 9) {
@@ -1064,7 +1064,7 @@ bool MathMacroTemplate::getStatus(Cursor & /*cur*/, FuncRequest const & cmd,
 {
        bool ret = true;
        string const arg = to_utf8(cmd.argument());
-       switch (cmd.action) {
+       switch (cmd.action_) {
                case LFUN_MATH_MACRO_ADD_PARAM: {
                        int num = numargs_ + 1;
                        if (arg.size() != 0)