From 8996be12086037ecb5caec2879dde83b1d9281d3 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Fri, 15 May 2009 21:05:19 +0000 Subject: [PATCH] Restore Object.Event order for: - 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 | 4 ++-- src/FuncCode.h | 4 ++-- src/LyXAction.cpp | 8 ++++---- src/insets/InsetLabel.cpp | 8 ++++---- src/mathed/InsetMathHull.cpp | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 44fa44ea62..1ebd991101 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -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()) diff --git a/src/FuncCode.h b/src/FuncCode.h index 56a51b1662..18b32c23cc 100644 --- a/src/FuncCode.h +++ b/src/FuncCode.h @@ -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 diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index 0902851717..064fe1dc4c 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -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 diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp index 33772da8e8..3d25aff102 100644 --- a/src/insets/InsetLabel.cpp +++ b/src/insets/InsetLabel.cpp @@ -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); diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index bd75d59962..b41fd82dd4 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -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; -- 2.39.2