]> git.lyx.org Git - features.git/commitdiff
Restore Object.Event order for:
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 15 May 2009 21:05:19 +0000 (21:05 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 15 May 2009 21:05:19 +0000 (21:05 +0000)
- LFUN_LABEL_COPY_AS_REF,
- LFUN_LABEL_INSERT_AS_REF.

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

src/BufferView.cpp
src/FuncCode.h
src/LyXAction.cpp
src/insets/InsetLabel.cpp
src/mathed/InsetMathHull.cpp

index 44fa44ea624dc7b50ed91b93cc424f36a4bba9e0..1ebd9911015e05327738fd4134daa8e36503b6a5 100644 (file)
@@ -943,7 +943,7 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
                flag.setEnabled(! this->cursor().inRegexped());
                break;
 
-       case LFUN_COPY_LABEL_AS_REF: {
+       case LFUN_LABEL_COPY_AS_REF: {
                // if there is an inset at cursor, see whether it
                // handles the lfun
                Inset * inset = cur.nextInset();
@@ -1358,7 +1358,7 @@ bool BufferView::dispatch(FuncRequest const & cmd)
                buffer_.params().compressed = !buffer_.params().compressed;
                break;
 
-       case LFUN_COPY_LABEL_AS_REF: {
+       case LFUN_LABEL_COPY_AS_REF: {
                // if there is an inset at cursor, try to copy it
                Inset * inset = &cur.inset();
                if (!inset || !inset->asInsetMath())
index 56a51b16626968660878e0798bdc34b2348389e3..18b32c23cc115c862195fa3725eb21bd0ef0859b 100644 (file)
@@ -414,8 +414,8 @@ enum FuncCode
        LFUN_REGEXP_MODE,               // Tommaso, 20081003
        LFUN_VC_COMMAND,
        // 320
-       LFUN_COPY_LABEL_AS_REF,         // sts, 20081116
-       LFUN_INSERT_LABEL_AS_REF,               // vfr, 20090407
+       LFUN_LABEL_COPY_AS_REF,         // sts, 20081116
+       LFUN_LABEL_INSERT_AS_REF,               // vfr, 20090407
        LFUN_PHANTOM_INSERT,            // uwestoehr, 20090130
        LFUN_INSET_BEGIN,               // JMarc, 20090316
        LFUN_INSET_END,                 // JMarc, 20090316
index 09028517177b08fa9894946ff15c9bf9c11a8ed5..064fe1dc4cfe0b30f99cce77233101497ac2319b 100644 (file)
@@ -3259,22 +3259,22 @@ void LyXAction::init()
                { LFUN_BRANCH_DEACTIVATE, "branch-deactivate", AtPoint, Buffer },
 
 /*!
- * \var lyx::FuncCode lyx::LFUN_COPY_LABEL_AS_REF
+ * \var lyx::FuncCode lyx::LFUN_LABEL_COPY_AS_REF
  * \li Action: Copies the label at the cursor as a cross-reference to be pasted elsewhere.
  * \li Syntax: copy-label-as-reference
  * \li Origin: sts, 16 Nov 2008
  * \endvar
  */
-               { LFUN_COPY_LABEL_AS_REF, "copy-label-as-reference", ReadOnly | NoUpdate, Edit },
+               { LFUN_LABEL_COPY_AS_REF, "copy-label-as-reference", ReadOnly | NoUpdate, Edit },
 
 /*!
- * \var lyx::FuncCode lyx::LFUN_INSERT_LABEL_AS_REF
+ * \var lyx::FuncCode lyx::LFUN_LABEL_INSERT_AS_REF
  * \li Action: Inserts the label as a cross-reference at the position of the cursor.
  * \li Syntax: insert-label-as-reference
  * \li Origin: vfr, 7 Apr 2009
  * \endvar
  */
-               { LFUN_INSERT_LABEL_AS_REF, "insert-label-as-reference", Noop, Edit},
+               { LFUN_LABEL_INSERT_AS_REF, "insert-label-as-reference", Noop, Edit},
 
 /*!
  * \var lyx::FuncCode lyx::LFUN_BUFFER_ZOOM_IN
index 33772da8e8ee121810d2fb06d43397757a6fed67..3d25aff1020faf4af704d0bda7f47e77df2fef98 100644 (file)
@@ -141,8 +141,8 @@ bool InsetLabel::getStatus(Cursor & cur, FuncRequest const & cmd,
 {
        bool enabled;
        switch (cmd.action) {
-       case LFUN_INSERT_LABEL_AS_REF:
-       case LFUN_COPY_LABEL_AS_REF:
+       case LFUN_LABEL_INSERT_AS_REF:
+       case LFUN_LABEL_COPY_AS_REF:
                enabled = true;
                break;
        default:
@@ -171,7 +171,7 @@ void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
                break;
        }
 
-       case LFUN_COPY_LABEL_AS_REF: {
+       case LFUN_LABEL_COPY_AS_REF: {
                InsetCommandParams p(REF_CODE, "ref");
                p["reference"] = getParam("name");
                cap::clearSelection();
@@ -179,7 +179,7 @@ void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
                break;
        }
 
-       case LFUN_INSERT_LABEL_AS_REF: {
+       case LFUN_LABEL_INSERT_AS_REF: {
                InsetCommandParams p(REF_CODE, "ref");
                p["reference"] = getParam("name");
                string const data = InsetCommand::params2string("ref", p);
index bd75d5996285346106650429c3a1b9dd1fbf01e2..b41fd82dd429637f9465444594ba6905ee7434e2 100644 (file)
@@ -1228,7 +1228,7 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd)
                break;
        }
 
-       case LFUN_COPY_LABEL_AS_REF: {
+       case LFUN_LABEL_COPY_AS_REF: {
                row_type const row = (type_ == hullMultline) ? nrows() - 1 : cur.row();
                InsetCommandParams p(REF_CODE, "ref");
                p["reference"] = label(row);
@@ -1369,7 +1369,7 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
                status.setEnabled(type_ != hullSimple);
                return true;
 
-       case LFUN_COPY_LABEL_AS_REF: {
+       case LFUN_LABEL_COPY_AS_REF: {
                row_type const row = (type_ == hullMultline) ? nrows() - 1 : cur.row();
                status.setEnabled(numberedType() && label_[row] && !nonum_[row]);
                return true;