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
This commit is contained in:
Uwe Stöhr 2008-01-11 22:45:19 +00:00
parent 4b799833e7
commit 33c95fc07b
6 changed files with 24 additions and 18 deletions

View File

@ -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:

View File

@ -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"

View File

@ -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

View File

@ -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 },

View File

@ -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

View File

@ -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());