The attached patch renames the math numbering functions correctly. This fixes bug http://bugzilla.lyx.org/show_bug.cgi?id=2608 .

regards Uwe
Index: lib/ui/stdmenus.inc
===================================================================
--- lib/ui/stdmenus.inc	(revision 22480)
+++ lib/ui/stdmenus.inc	(working copy)
@@ -183,8 +183,8 @@
 	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
Index: RELEASE-NOTES
===================================================================
--- RELEASE-NOTES	(revision 22480)
+++ RELEASE-NOTES	(working copy)
@@ -33,7 +33,13 @@
 - 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:
 
 - LFUN_SPECIALCHAR_INSERT, "specialchar-insert" (see above).
Index: src/lfuns.h
===================================================================
--- src/lfuns.h	(revision 22480)
+++ src/lfuns.h	(working copy)
@@ -273,21 +273,21 @@
 	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
Index: src/LyXAction.cpp
===================================================================
--- src/LyXAction.cpp	(revision 22480)
+++ src/LyXAction.cpp	(working copy)
@@ -228,8 +228,8 @@
 		{ 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 },
Index: src/mathed/InsetMathHull.cpp
===================================================================
--- src/mathed/InsetMathHull.cpp	(revision 22480)
+++ src/mathed/InsetMathHull.cpp	(working copy)
@@ -1050,7 +1050,7 @@
 		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 @@
 		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 @@
 		// 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());

Reply via email to