]> git.lyx.org Git - lyx.git/commitdiff
Rename some LFUN names to match their text name
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 11 Feb 2014 10:00:20 +0000 (11:00 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 13 Feb 2014 12:50:33 +0000 (13:50 +0100)
Also, rename copy-label-as-reference to label-copy-as-reference and update LFUNs.lyx accordingly.

12 files changed:
RELEASE-NOTES
lib/doc/LFUNs.lyx
lib/scripts/prefs2prefs_lfuns.py
src/FuncCode.h
src/LyXAction.cpp
src/Text3.cpp
src/frontends/qt4/GuiView.cpp
src/frontends/qt4/TocWidget.cpp
src/insets/InsetLabel.cpp
src/insets/InsetTabular.cpp
src/mathed/InsetMathGrid.cpp
src/mathed/InsetMathHull.cpp

index 087285ec6526f55cebb3bcee4064ea6350fc8aa1..48c3f97aa8d7d5b1b2e18561266236d74924f64b 100644 (file)
@@ -170,6 +170,9 @@ The following LyX functions have been changed:
 - LFUN_BREAK_PARAGRAPH ("break-paragraph") was renamed to
   LFUN_PARAGRAPH_BREAK ("paragraph-break").
 
+- LFUN_COPY_LABEL_AS_REF ("copy-label-as-reference") has been renamed to
+  LFUN_LABEL_COPY_AS_REF ("label-copy-as-reference").
+
 
 The following LyX key bindings have been changed:
 
index fd361ab0b8f0d4cce0e337e12f97c6820f166d01..dfccd1f97ba4df6d4a8ce520310744151481a46b 100644 (file)
@@ -1337,22 +1337,6 @@ Action Copies the current selection to the clipboard.
 Syntax copy
 \end_layout
 
-\begin_layout Subsection*
-copy-label-as-reference
-\end_layout
-\begin_layout Description
-Action Copies the label at the cursor as a cross-reference to be pasted elsewhere.
-\end_layout
-\begin_layout Description
-Syntax copy-label-as-reference <LABEL>
-\end_layout
-\begin_layout Description
-Params <LABEL>: The label to copy (for multi-line math)
-\end_layout
-\begin_layout Description
-Origin sts, 16 Nov 2008
-\end_layout
-
 \begin_layout Subsection*
 cut
 \end_layout
@@ -2323,6 +2307,22 @@ Syntax keymap-toggle
 Origin leeming, 30 Mar 2004
 \end_layout
 
+\begin_layout Subsection*
+label-copy-as-reference
+\end_layout
+\begin_layout Description
+Action Copies the label at the cursor as a cross-reference to be pasted elsewhere.
+\end_layout
+\begin_layout Description
+Syntax copy-label-as-reference <LABEL>
+\end_layout
+\begin_layout Description
+Params <LABEL>: The label to copy (for multi-line math)
+\end_layout
+\begin_layout Description
+Origin sts, 16 Nov 2008
+\end_layout
+
 \begin_layout Subsection*
 label-goto
 \end_layout
index 398478b96c93489bdc994b7b16ecd63c3a1f43b6..e06af7ce202cbdb50d04107c8d559be4ce3f6a4c 100644 (file)
@@ -154,6 +154,9 @@ def tab_group_close(line):
 def view_split(line):
        return simple_renaming(line, "split-view", "view-split")
 
+def label_copy_as_reference(line):
+       return simple_renaming(line, "copy-label-as-reference", "label-copy-as-reference")
+
 #
 #
 ###########################################################
@@ -177,7 +180,8 @@ conversions = [
        [  2, [ # list of conversions to format 2, LyX 2.1
                paragraph_break,
                tab_group_close,
-               view_split
+               view_split,
+               label_copy_as_reference
        ]],
 ]
 
index 33ebf41d2ee8c83475c615e9883b338d29396b21..9f3476c0d0c28996b5210acc144b54fe78c8ad5d 100644 (file)
@@ -168,7 +168,7 @@ enum FuncCode
        LFUN_WORD_DELETE_FORWARD,
        LFUN_WORD_DELETE_BACKWARD,
        // 115
-       LFUN_LINE_DELETE,
+       LFUN_LINE_DELETE_FORWARD,
        LFUN_DEBUG_LEVEL_SET,
        LFUN_MARK_OFF,
        LFUN_MARK_ON,
@@ -230,7 +230,7 @@ enum FuncCode
        // 165
        LFUN_VC_REPO_UPDATE,
        LFUN_VC_COMPARE,
-       LFUN_HYPERLINK_INSERT,          // CFO-G 971121
+       LFUN_HREF_INSERT,          // CFO-G 971121
        LFUN_WORD_FIND_FORWARD,         // Etienne 980216
        LFUN_WORD_FIND_BACKWARD,        // Etienne 980220
        // 170
@@ -402,7 +402,7 @@ enum FuncCode
        LFUN_COMPLETION_POPUP,
        LFUN_COMPLETION_INLINE,
        // 310
-       LFUN_COMPLETION_COMPLETE,
+       LFUN_COMPLETE,
        LFUN_SET_GRAPHICS_GROUP,
        LFUN_COMPLETION_CANCEL,
        LFUN_COMPLETION_ACCEPT,
@@ -414,8 +414,8 @@ enum FuncCode
        LFUN_REGEXP_MODE,               // Tommaso, 20081003
        LFUN_LABEL_GOTO,                // Ale 970806
        // 320
-       LFUN_LABEL_COPY_AS_REF,         // sts, 20081116
-       LFUN_LABEL_INSERT_AS_REF,       // vfr, 20090407
+       LFUN_LABEL_COPY_AS_REFERENCE,         // sts, 20081116
+       LFUN_LABEL_INSERT_AS_REFERENCE,       // vfr, 20090407
        LFUN_PHANTOM_INSERT,            // uwestoehr, 20090130
        LFUN_INSET_BEGIN,               // JMarc, 20090316
        LFUN_INSET_END,                 // JMarc, 20090316
@@ -430,9 +430,9 @@ enum FuncCode
        LFUN_SECTION_SELECT,            // vfr, 20090503
        LFUN_FONT_UNDERLINE,
        LFUN_FONT_STRIKEOUT,
-       LFUN_FONT_UULINE,
+       LFUN_FONT_UNDERUNDERLINE,
        // 335
-       LFUN_FONT_UWAVE,
+       LFUN_FONT_UNDERWAVE,
        LFUN_BUFFER_EXPORT,             // Lgb 97-07-29
        LFUN_BUFFER_TOGGLE_COMPRESSION, // bpeng 20060427
        LFUN_BRANCH_ADD,                // spitz 20090707
index d100905f6852c8679628e58ad063520eb7b4c03e..6c2142901cfbf1e13e52492f2a85523beceb50b0 100644 (file)
@@ -486,14 +486,14 @@ void LyXAction::init()
  */
                { LFUN_SPACE_INSERT, "space-insert", Noop, Edit },
 /*!
- * \var lyx::FuncCode lyx::LFUN_HYPERLINK_INSERT
+ * \var lyx::FuncCode lyx::LFUN_HREF_INSERT
  * \li Action: Inserts hyperlinks into the document (clickable in pdf output).
  * \li Notion: Hyperlink target can be set via selection + hyperlink-insert function.
  * \li Syntax: href-insert [<TARGET>]
  * \li Origin: CFO-G, 21 Nov 1997
  * \endvar
  */
-               { LFUN_HYPERLINK_INSERT, "href-insert", Noop, Edit },
+               { LFUN_HREF_INSERT, "href-insert", Noop, Edit },
 /*!
  * \var lyx::FuncCode lyx::LFUN_SPECIALCHAR_INSERT
  * \li Action: Inserts various characters into the document.
@@ -1190,13 +1190,13 @@ void LyXAction::init()
  */
                { LFUN_LINE_END_SELECT, "line-end-select", ReadOnly | SingleParUpdate, Edit },
 /*!
- * \var lyx::FuncCode lyx::LFUN_LINE_DELETE
+ * \var lyx::FuncCode lyx::LFUN_LINE_DELETE_FORWARD
  * \li Action: Deletes the letters to the end of the (screen) line or
                deletes the selection.
  * \li Syntax: line-delete-forward
  * \endvar
  */
-               { LFUN_LINE_DELETE, "line-delete-forward", Noop, Edit }, // there is no line-delete-backward
+               { LFUN_LINE_DELETE_FORWARD, "line-delete-forward", Noop, Edit }, // there is no line-delete-backward
 /*!
  * \var lyx::FuncCode lyx::LFUN_COPY
  * \li Action: Copies the current selection to the clipboard.
@@ -1345,21 +1345,21 @@ void LyXAction::init()
  */
                { LFUN_FONT_UNDERLINE, "font-underline", Noop, Layout },
 /*!
- * \var lyx::FuncCode lyx::LFUN_FONT_UULINE
+ * \var lyx::FuncCode lyx::LFUN_FONT_UNDERUNDERLINE
  * \li Action: Toggles double underline in the font (selection-wise).
  * \li Syntax: font-underunderline
  * \li Origin: sanda, 5 May 2009
  * \endvar
  */
-               { LFUN_FONT_UULINE, "font-underunderline", Noop, Layout },
+               { LFUN_FONT_UNDERUNDERLINE, "font-underunderline", Noop, Layout },
 /*!
- * \var lyx::FuncCode lyx::LFUN_FONT_UWAVE
+ * \var lyx::FuncCode lyx::LFUN_FONT_UNDERWAVE
  * \li Action: Toggles wavy underline in the font (selection-wise).
  * \li Syntax: font-underwave
  * \li Origin: sanda, 5 May 2009
  * \endvar
  */
-               { LFUN_FONT_UWAVE, "font-underwave", Noop, Layout },
+               { LFUN_FONT_UNDERWAVE, "font-underwave", Noop, Layout },
 /*!
  * \var lyx::FuncCode lyx::LFUN_FONT_STRIKEOUT
  * \li Action: Toggles strikeout (strike-through) in the font (selection-wise).
@@ -3533,13 +3533,13 @@ void LyXAction::init()
  */
                { LFUN_COMPLETION_POPUP, "completion-popup", ReadOnly | NoUpdate, Edit },
 /*!
- * \var lyx::FuncCode lyx::LFUN_COMPLETION_COMPLETE
+ * \var lyx::FuncCode lyx::LFUN_COMPLETE
  * \li Action: Try to complete the word or command at the cursor position.
  * \li Syntax: complete
  * \li Origin: sts, Feb 19 2008
  * \endvar
  */
-               { LFUN_COMPLETION_COMPLETE, "complete", SingleParUpdate, Edit },
+               { LFUN_COMPLETE, "complete", SingleParUpdate, Edit },
 
 /*!
  * \var lyx::FuncCode lyx::LFUN_COMPLETION_CANCEL
@@ -3643,17 +3643,17 @@ void LyXAction::init()
  * \li Origin: sts, 16 Nov 2008
  * \endvar
  */
-               { LFUN_LABEL_COPY_AS_REF, "copy-label-as-reference",
+               { LFUN_LABEL_COPY_AS_REFERENCE, "label-copy-as-reference",
                        ReadOnly | NoUpdate | AtPoint, Edit },
 
 /*!
- * \var lyx::FuncCode lyx::LFUN_LABEL_INSERT_AS_REF
+ * \var lyx::FuncCode lyx::LFUN_LABEL_INSERT_AS_REFERENCE
  * \li Action: Inserts the label (in ToC pane) as a cross-reference at the position of the cursor.
  * \li Syntax: label-insert-as-reference
  * \li Origin: vfr, 7 Apr 2009
  * \endvar
  */
-               { LFUN_LABEL_INSERT_AS_REF, "label-insert-as-reference", Noop, Edit},
+               { LFUN_LABEL_INSERT_AS_REFERENCE, "label-insert-as-reference", Noop, Edit},
 
 /*!
  * \var lyx::FuncCode lyx::LFUN_BUFFER_ZOOM_IN
index e46270c9031a602f192f3e38628bb7e0ee8f1d5a..1dead38685eacf92e009e88d1cd8f4fcc6a9cf0b 100644 (file)
@@ -567,7 +567,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                finishChange(cur, false);
                break;
 
-       case LFUN_LINE_DELETE:
+       case LFUN_LINE_DELETE_FORWARD:
                if (cur.selection())
                        cutSelection(cur, true, false);
                else
@@ -1667,7 +1667,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                break;
        }
 
-       case LFUN_HYPERLINK_INSERT: {
+       case LFUN_HREF_INSERT: {
                InsetCommandParams p(HYPERLINK_CODE);
                docstring content;
                if (cur.selection()) {
@@ -2003,14 +2003,14 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                break;
        }
 
-       case LFUN_FONT_UULINE: {
+       case LFUN_FONT_UNDERUNDERLINE: {
                Font font(ignore_font, ignore_language);
                font.fontInfo().setUuline(FONT_TOGGLE);
                toggleAndShow(cur, this, font);
                break;
        }
 
-       case LFUN_FONT_UWAVE: {
+       case LFUN_FONT_UNDERWAVE: {
                Font font(ignore_font, ignore_language);
                font.fontInfo().setUwave(FONT_TOGGLE);
                toggleAndShow(cur, this, font);
@@ -2667,7 +2667,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                // not allowed in description items
                enable = !inDescriptionItem(cur);
                break;
-       case LFUN_HYPERLINK_INSERT:
+       case LFUN_HREF_INSERT:
                if (cur.selIsMultiCell() || cur.selIsMultiLine()) {
                        enable = false;
                        break;
@@ -2973,8 +2973,8 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_FONT_STATE:
        case LFUN_FONT_UNDERLINE:
        case LFUN_FONT_STRIKEOUT:
-       case LFUN_FONT_UULINE:
-       case LFUN_FONT_UWAVE:
+       case LFUN_FONT_UNDERUNDERLINE:
+       case LFUN_FONT_UNDERWAVE:
        case LFUN_TEXTSTYLE_APPLY:
        case LFUN_TEXTSTYLE_UPDATE:
                enable = !cur.paragraph().isPassThru();
@@ -2982,7 +2982,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
 
        case LFUN_WORD_DELETE_FORWARD:
        case LFUN_WORD_DELETE_BACKWARD:
-       case LFUN_LINE_DELETE:
+       case LFUN_LINE_DELETE_FORWARD:
        case LFUN_WORD_FORWARD:
        case LFUN_WORD_BACKWARD:
        case LFUN_WORD_RIGHT:
index 644f14317624dcdc9a72c70e35b1a4c826f01328..d76c3c87aaea9e1428b6aa955063b720fb6f5bea 100644 (file)
@@ -1778,7 +1778,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
                        enable = false;
                break;
 
-       case LFUN_COMPLETION_COMPLETE:
+       case LFUN_COMPLETE:
                if (!d.current_work_area_
                        || !d.current_work_area_->completer().inlinePossible(
                        currentBufferView()->cursor()))
@@ -3693,7 +3693,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
                        break;
 
 
-               case LFUN_COMPLETION_COMPLETE:
+               case LFUN_COMPLETE:
                        if (d.current_work_area_)
                                d.current_work_area_->completer().tab();
                        break;
index 8ed961b08acda7ca0abcf83f01a3a7698f20681a..3619e6c3b49ffaacdaee976ba6cbd51e7eb57510 100644 (file)
@@ -155,9 +155,9 @@ bool TocWidget::getStatus(Cursor & cur, FuncRequest const & cmd,
                status.setEnabled(item.dit() != 0);
                return true;
 
-       case LFUN_LABEL_COPY_AS_REF: {
+       case LFUN_LABEL_COPY_AS_REFERENCE: {
                // For labels in math, we need to supply the label as a string
-               FuncRequest label_copy(LFUN_LABEL_COPY_AS_REF, item.asString());
+               FuncRequest label_copy(LFUN_LABEL_COPY_AS_REFERENCE, item.asString());
                if (inset)
                        return inset->getStatus(cur, label_copy, status);
        }
@@ -192,14 +192,14 @@ void TocWidget::doDispatch(Cursor & cur, FuncRequest const & cmd)
                cur.dispatch(tmpcmd);
                break;
 
-       case LFUN_LABEL_COPY_AS_REF: {
+       case LFUN_LABEL_COPY_AS_REFERENCE: {
                // For labels in math, we need to supply the label as a string
-               FuncRequest label_copy(LFUN_LABEL_COPY_AS_REF, item.asString());
+               FuncRequest label_copy(LFUN_LABEL_COPY_AS_REFERENCE, item.asString());
                if (inset)
                        inset->dispatch(cur, label_copy);
                break;
        }
-       
+
        case LFUN_OUTLINE_UP:
        case LFUN_OUTLINE_DOWN:
        case LFUN_OUTLINE_IN:
index 4dfbc96448a628fb8e34c1bea7a9fd1cd4fd1d47..a6498bc611b270e724a019d48a79e9b1f2200ca8 100644 (file)
@@ -200,8 +200,8 @@ bool InsetLabel::getStatus(Cursor & cur, FuncRequest const & cmd,
 {
        bool enabled;
        switch (cmd.action()) {
-       case LFUN_LABEL_INSERT_AS_REF:
-       case LFUN_LABEL_COPY_AS_REF:
+       case LFUN_LABEL_INSERT_AS_REFERENCE:
+       case LFUN_LABEL_COPY_AS_REFERENCE:
                enabled = true;
                break;
        default:
@@ -233,7 +233,7 @@ void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
                break;
        }
 
-       case LFUN_LABEL_COPY_AS_REF: {
+       case LFUN_LABEL_COPY_AS_REFERENCE: {
                InsetCommandParams p(REF_CODE, "ref");
                p["reference"] = getParam("name");
                cap::clearSelection();
@@ -241,7 +241,7 @@ void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
                break;
        }
 
-       case LFUN_LABEL_INSERT_AS_REF: {
+       case LFUN_LABEL_INSERT_AS_REFERENCE: {
                InsetCommandParams p(REF_CODE, "ref");
                p["reference"] = getParam("name");
                string const data = InsetCommand::params2string(p);
index 932b994fec3913d482a5e8c20574b2e23fb23dea..e52b7621902ebca23637b40284d3c3014158389b 100644 (file)
@@ -4384,8 +4384,8 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
        case LFUN_FONT_SIZE:
        case LFUN_FONT_UNDERLINE:
        case LFUN_FONT_STRIKEOUT:
-       case LFUN_FONT_UULINE:
-       case LFUN_FONT_UWAVE:
+       case LFUN_FONT_UNDERUNDERLINE:
+       case LFUN_FONT_UNDERWAVE:
        case LFUN_LANGUAGE:
        case LFUN_PARAGRAPH_PARAMS_APPLY:
        case LFUN_PARAGRAPH_PARAMS:
index 47bb7f7161bc71603248d868416334894a0b6342..16e519c11f42544fbdae3e64b479221c9fb3af9b 100644 (file)
@@ -1142,7 +1142,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
        switch (act) {
 
        // insert file functions
-       case LFUN_LINE_DELETE:
+       case LFUN_LINE_DELETE_FORWARD:
                cur.recordUndoInset();
                //autocorrect_ = false;
                //macroModeClose();
index f0fc1b41e10338dd0cf9d53e0f4b802e3f390ebe..956b6b9bca220271066bf090aff0e89a32191827 100644 (file)
@@ -1434,7 +1434,7 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd)
                break;
        }
 
-       case LFUN_LABEL_COPY_AS_REF: {
+       case LFUN_LABEL_COPY_AS_REFERENCE: {
                row_type row;
                if (cmd.argument().empty() && &cur.inset() == this)
                        // if there is no argument and we're inside math, we retrieve
@@ -1630,7 +1630,7 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
                status.setEnabled(type_ != hullSimple);
                return true;
 
-       case LFUN_LABEL_COPY_AS_REF: {
+       case LFUN_LABEL_COPY_AS_REFERENCE: {
                bool enabled = false;
                row_type row;
                if (cmd.argument().empty() && &cur.inset() == this) {