From 507e21f84e4b4f98815b56e72c84dd33b4d977b0 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 15 Oct 2024 17:30:54 +0200 Subject: [PATCH] Rename word-togglecase to word-invertcase. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As suggested by Jürgen. --- lib/RELEASE-NOTES | 6 +++--- lib/bind/de/menus.bind | 2 +- lib/bind/menus.bind | 2 +- lib/ui/stdmenus.inc | 2 +- src/FuncCode.h | 2 +- src/LyXAction.cpp | 6 +++--- src/Paragraph.cpp | 2 +- src/Paragraph.h | 2 +- src/Text.cpp | 6 +++--- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES index 3a6ee92d9d..03364a06fb 100644 --- a/lib/RELEASE-NOTES +++ b/lib/RELEASE-NOTES @@ -13,13 +13,13 @@ !!!The following new LyX functions have been introduced in 2.5: -- The new function word-togglecase is a companion of word-upcase and - word-lowcase: it toggles each character between lowcase and upcase, +- The new function word-invertcase is a companion of word-upcase and + word-lowcase: it inverts each character between lowcase and upcase, which is useful when one FORGOT THE cAPS lOCK KEY. !!!The following LyX functions have been changed in 2.5: -- The funcion window-new does not take an optional +- The function window-new does not take an optional parameter anymore. This only worked in windows and existed for internal reasons. diff --git a/lib/bind/de/menus.bind b/lib/bind/de/menus.bind index 3f0b166790..a194b64f24 100644 --- a/lib/bind/de/menus.bind +++ b/lib/bind/de/menus.bind @@ -154,7 +154,7 @@ Format 5 \bind "M-z Down" "word-lowcase" \bind "M-z Up" "word-upcase" -\bind "M-z Left" "word-togglecase" +\bind "M-z Left" "word-invertcase" \bind "M-z Right" "word-capitalize" \bind "M-z space" "font-default" diff --git a/lib/bind/menus.bind b/lib/bind/menus.bind index 4fdda8bbfc..ced3cd9df0 100644 --- a/lib/bind/menus.bind +++ b/lib/bind/menus.bind @@ -155,7 +155,7 @@ Format 5 \bind "M-c Down" "word-lowcase" \bind "M-c Up" "word-upcase" -\bind "M-c Left" "word-togglecase" +\bind "M-c Left" "word-invertcase" \bind "M-c Right" "word-capitalize" \bind "M-c space" "font-default" diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc index 01a4def3ff..fd38567844 100644 --- a/lib/ui/stdmenus.inc +++ b/lib/ui/stdmenus.inc @@ -190,7 +190,7 @@ Menuset Item "Capitalize|p" "word-capitalize" Item "Uppercase|U" "word-upcase" Item "Lowercase|L" "word-lowcase" - Item "Toggle Case|T" "word-togglecase" + Item "Invert Case|I" "word-invertcase" End Menu "edit_textstyles" diff --git a/src/FuncCode.h b/src/FuncCode.h index 691305274d..f0a377879e 100644 --- a/src/FuncCode.h +++ b/src/FuncCode.h @@ -512,7 +512,7 @@ enum FuncCode LFUN_REFERENCE_INSERT, // spitz, 20240728 // 400 LFUN_REFERENCE_TO_PARAGRAPH, // spitz, 20240728 - LFUN_WORD_TOGGLECASE, // lasgouttes 20241014 + LFUN_WORD_INVERTCASE, // lasgouttes 20241015 LFUN_LASTACTION // end of the table }; diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index 6049745a3e..8d6982993f 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -4655,17 +4655,17 @@ void LyXAction::init() { LFUN_WORD_SELECT, "word-select", ReadOnly, Edit }, /*! - * \var lyx::FuncCode lyx::LFUN_WORD_TOGGLECASE + * \var lyx::FuncCode lyx::LFUN_WORD_INVERTCASE * \li Action: Invert the case of the words in the selection or word at cursor position. This is useful when one FORGOT THE cAPS lOCK KEY. - * \li Syntax: word-togglecase [] + * \li Syntax: word-invertcase [] * \li Params: : if this is equal to "partial", then the * default word starts at cursor position (emacs-style). * Otherwise, the whole word is considered. * \li Origin: lasgouttes, 14 Oct 2024 * \endvar */ - { LFUN_WORD_TOGGLECASE, "word-togglecase", Noop, Edit }, + { LFUN_WORD_INVERTCASE, "word-invertcase", Noop, Edit }, /*! * \var lyx::FuncCode lyx::LFUN_WORD_UPCASE diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 33faa59254..23ba81fa86 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -4801,7 +4801,7 @@ void Paragraph::changeCase(BufferParams const & bparams, pos_type pos, case text_uppercase: newChar = uppercase(oldChar); break; - case text_togglecase: + case text_invertcase: if (isUpperCase(oldChar)) newChar = lowercase(oldChar); else if (isLowerCase(oldChar)) diff --git a/src/Paragraph.h b/src/Paragraph.h index 91bc40eba2..8bd9a6ee5f 100644 --- a/src/Paragraph.h +++ b/src/Paragraph.h @@ -116,7 +116,7 @@ enum TextCase { /// text_uppercase, /// - text_togglecase + text_invertcase }; diff --git a/src/Text.cpp b/src/Text.cpp index 4c7a445fc5..c26a5da35e 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -4946,8 +4946,8 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) changeCase(cur, text_capitalization, cmd.getArg(0) == "partial"); break; - case LFUN_WORD_TOGGLECASE: - changeCase(cur, text_togglecase, cmd.getArg(0) == "partial"); + case LFUN_WORD_INVERTCASE: + changeCase(cur, text_invertcase, cmd.getArg(0) == "partial"); break; case LFUN_CHARS_TRANSPOSE: @@ -7163,7 +7163,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, case LFUN_WORD_UPCASE: case LFUN_WORD_LOWCASE: case LFUN_WORD_CAPITALIZE: - case LFUN_WORD_TOGGLECASE: + case LFUN_WORD_INVERTCASE: case LFUN_CHARS_TRANSPOSE: case LFUN_SERVER_GET_XY: case LFUN_SERVER_SET_XY: