From 33c95fc07b6eff0390f12b26378298fb843613e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Fri, 11 Jan 2008 22:45:19 +0000 Subject: [PATCH] rename LFUNs math-nonumber and math-number to what they really do, fixes bug 2608 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22496 a592a061-630c-0410-9148-cb99ea01b6c8 --- RELEASE-NOTES | 6 ++++++ lib/bind/math.bind | 4 ++-- lib/ui/stdmenus.inc | 4 ++-- src/LyXAction.cpp | 4 ++-- src/lfuns.h | 16 ++++++++-------- src/mathed/InsetMathHull.cpp | 8 ++++---- 6 files changed, 24 insertions(+), 18 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 82e8a4b9a5..6932682ed3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -33,6 +33,12 @@ Some of the LyX functions have changed names: - The function LFUN_WORDS_COUNT, "words-count", has been replaced by LFUN_STATISTICS, "statistics", which counts more than words. +- The function LFUN_MATH_NUMBER, "math-number", has been renamed to + LFUN_MATH_NUMBER_TOGGLE. + +- The function LFUN_MATH_NONUMBER, "math-nonumber", has been renamed to + LFUN_MATH_NUMBER_LINE_TOGGLE. + The following new LyX functions have been introduced: diff --git a/lib/bind/math.bind b/lib/bind/math.bind index a4f55e7406..f9b269fefd 100644 --- a/lib/bind/math.bind +++ b/lib/bind/math.bind @@ -51,8 +51,8 @@ \bind "M-m S-L space" "math-limits empty" -\bind "M-m n" "math-number" -\bind "M-m S-N" "math-nonumber" +\bind "M-m n" "math-number-toggle" +\bind "M-m S-N" "math-number-line-toggle" \bind "M-m 8" "math-insert \infty" \bind "M-m o 1" "self-insert \#1" diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc index 1ed7123e89..d53acd653c 100644 --- a/lib/ui/stdmenus.inc +++ b/lib/ui/stdmenus.inc @@ -183,8 +183,8 @@ Menuset End Menu "edit_math" - Item "Number whole Formula|N" "math-number" - Item "Number this Line|u" "math-nonumber" + Item "Number whole Formula|N" "math-number-toggle" + Item "Number this Line|u" "math-number-line-toggle" Submenu "Change Limits Type|L" "edit_math_limits" Submenu "Macro Definition" "edit_math_macro_definition" Separator diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index 221564e61a..2a440d5712 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -263,8 +263,8 @@ void LyXAction::init() { LFUN_MATH_IMPORT_SELECTION, "math-import-selection", Noop, Math }, { LFUN_MATH_MATRIX, "math-matrix", Noop, Math }, { LFUN_MATH_MODE, "math-mode", Noop, Math }, - { LFUN_MATH_NONUMBER, "math-nonumber", Noop, Math }, - { LFUN_MATH_NUMBER, "math-number", Noop, Math }, + { LFUN_MATH_NUMBER_LINE_TOGGLE, "math-number-line-toggle", Noop, Math }, + { LFUN_MATH_NUMBER_TOGGLE, "math-number-toggle", Noop, Math }, { LFUN_MATH_EXTERN, "math-extern", Noop, Math }, { LFUN_MATH_SIZE, "math-size", Noop, Math }, { LFUN_MATH_MACRO_UNFOLD, "math-macro-unfold", ReadOnly | SingleParUpdate, Math }, diff --git a/src/lfuns.h b/src/lfuns.h index 45ba19b174..fdf5f2219b 100644 --- a/src/lfuns.h +++ b/src/lfuns.h @@ -273,21 +273,21 @@ enum kb_action { LFUN_MATH_DISPLAY, // Alejandro 180696 LFUN_MATH_MODE, // Alejandro 040696 /** - * LFUN_MATH_NUMBER - * \li Action: Enable numbering of the current formula. + * LFUN_MATH_NUMBER_TOGGLE + * \li Action: Toggles numbering of the current formula. * \li Notion: Must be in display formula mode. - * \li Syntax: math-number + * \li Syntax: math-number-toggle * \li Origin: Alejandro 4 Jun 1996 */ - LFUN_MATH_NUMBER, + LFUN_MATH_NUMBER_TOGGLE, /** - * LFUN_MATH_NONUMBER - * \li Action: Disable numbering of the current formula. + * LFUN_MATH_NUMBER_LINE_TOGGLE + * \li Action: Toggles numbering of the current formula line. * \li Notion: Must be in display formula mode. - * \li Syntax: math-nonumber + * \li Syntax: math-number-line-toggle * \li Origin: Alejandro 18 Jun 1996 */ - LFUN_MATH_NONUMBER, + LFUN_MATH_NUMBER_LINE_TOGGLE, LFUN_MATH_SIZE, // Alejandro 150896 // 110 LFUN_MATH_MACRO, // ale970510 diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 3560d5a2ed..c1b99349de 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -1050,7 +1050,7 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd) InsetMathGrid::doDispatch(cur, cmd); break; - case LFUN_MATH_NUMBER: { + case LFUN_MATH_NUMBER_TOGGLE: { //lyxerr << "toggling all numbers" << endl; cur.recordUndoInset(); bool old = numberedType(); @@ -1064,7 +1064,7 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd) break; } - case LFUN_MATH_NONUMBER: { + case LFUN_MATH_NUMBER_LINE_TOGGLE: { cur.recordUndoInset(); row_type r = (type_ == hullMultline) ? nrows() - 1 : cur.row(); bool old = numbered(r); @@ -1171,13 +1171,13 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd, // we handle these status.enabled(true); return true; - case LFUN_MATH_NUMBER: + case LFUN_MATH_NUMBER_TOGGLE: // FIXME: what is the right test, this or the one of // LABEL_INSERT? status.enabled(display()); status.setOnOff(numberedType()); return true; - case LFUN_MATH_NONUMBER: { + case LFUN_MATH_NUMBER_LINE_TOGGLE: { // FIXME: what is the right test, this or the one of // LABEL_INSERT? status.enabled(display()); -- 2.39.5