mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Rename some LFUN names to match their text name
Also, rename copy-label-as-reference to label-copy-as-reference and update LFUNs.lyx accordingly.
This commit is contained in:
parent
4ec02b46b5
commit
e7a1cce551
@ -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:
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
]],
|
||||
]
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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,9 +192,9 @@ 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;
|
||||
|
@ -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);
|
||||
|
@ -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:
|
||||
|
@ -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();
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user