mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
get rid of next-inset-modify ; inset-modify does the same now
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32965 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0553351d71
commit
a00fbcd871
@ -75,6 +75,8 @@ The following LyX functions have been removed:
|
||||
|
||||
- LFUN_NEXT_INSET_TOGGLE ("next-inset-toggle"): use "inset-toggle" instead.
|
||||
|
||||
- LFUN_NEXT_INSET_MODIFY ("next-inset-modify"): use "inset-modify" instead.
|
||||
|
||||
- LFUN_PARAGRAPH_SPACING ("paragraph-spacing"): use "paragraph-params" instead.
|
||||
|
||||
|
||||
|
@ -85,12 +85,12 @@ Menuset
|
||||
Item "Next Cross-Reference|N" "reference-next"
|
||||
Item "Go to Label|G" "label-goto"
|
||||
Separator
|
||||
Item "<Reference>|R" "next-inset-modify changetype ref"
|
||||
Item "(<Reference>)|e" "next-inset-modify changetype eqref"
|
||||
Item "<Page>|P" "next-inset-modify changetype pageref"
|
||||
Item "On Page <Page>|O" "next-inset-modify changetype vpageref"
|
||||
Item "<Reference> on Page <Page>|f" "next-inset-modify changetype vref"
|
||||
Item "Formatted Reference|t" "next-inset-modify changetype prettyref"
|
||||
Item "<Reference>|R" "inset-modify changetype ref"
|
||||
Item "(<Reference>)|e" "inset-modify changetype eqref"
|
||||
Item "<Page>|P" "inset-modify changetype pageref"
|
||||
Item "On Page <Page>|O" "inset-modify changetype vpageref"
|
||||
Item "<Reference> on Page <Page>|f" "inset-modify changetype vref"
|
||||
Item "Formatted Reference|t" "inset-modify changetype prettyref"
|
||||
Separator
|
||||
Item "Settings...|S" "inset-settings"
|
||||
End
|
||||
@ -151,14 +151,14 @@ Menuset
|
||||
#
|
||||
|
||||
Menu "context-box"
|
||||
Item "Frameless|l" "next-inset-modify changetype Frameless"
|
||||
Item "Simple Frame|F" "next-inset-modify changetype Boxed"
|
||||
Item "Simple Frame, Page Breaks|P" "next-inset-modify changetype Framed"
|
||||
Item "Oval, Thin|a" "next-inset-modify changetype ovalbox"
|
||||
Item "Oval, Thick|v" "next-inset-modify changetype Ovalbox"
|
||||
Item "Drop Shadow|w" "next-inset-modify changetype Shadowbox"
|
||||
Item "Shaded Background|B" "next-inset-modify changetype Shaded"
|
||||
Item "Double Frame|u" "next-inset-modify changetype Doublebox"
|
||||
Item "Frameless|l" "inset-modify changetype Frameless"
|
||||
Item "Simple Frame|F" "inset-modify changetype Boxed"
|
||||
Item "Simple Frame, Page Breaks|P" "inset-modify changetype Framed"
|
||||
Item "Oval, Thin|a" "inset-modify changetype ovalbox"
|
||||
Item "Oval, Thick|v" "inset-modify changetype Ovalbox"
|
||||
Item "Drop Shadow|w" "inset-modify changetype Shadowbox"
|
||||
Item "Shaded Background|B" "inset-modify changetype Shaded"
|
||||
Item "Double Frame|u" "inset-modify changetype Doublebox"
|
||||
Separator
|
||||
OptItem "Open Inset|O" "inset-toggle open"
|
||||
OptItem "Close Inset|C" "inset-toggle close"
|
||||
@ -172,9 +172,9 @@ Menuset
|
||||
#
|
||||
|
||||
Menu "context-note"
|
||||
Item "LyX Note|N" "next-inset-modify note Note Note"
|
||||
Item "Comment|m" "next-inset-modify note Note Comment"
|
||||
Item "Greyed Out|G" "next-inset-modify note Note Greyedout"
|
||||
Item "LyX Note|N" "inset-modify note Note Note"
|
||||
Item "Comment|m" "inset-modify note Note Comment"
|
||||
Item "Greyed Out|G" "inset-modify note Note Greyedout"
|
||||
Separator
|
||||
OptItem "Open Inset|O" "inset-toggle open"
|
||||
OptItem "Close Inset|C" "inset-toggle close"
|
||||
@ -190,9 +190,9 @@ Menuset
|
||||
#
|
||||
|
||||
Menu "context-phantom"
|
||||
Item "Phantom" "next-inset-modify phantom Phantom Phantom"
|
||||
Item "Horiz. Phantom" "next-inset-modify phantom Phantom HPhantom"
|
||||
Item "Vert. Phantom" "next-inset-modify phantom Phantom VPhantom"
|
||||
Item "Phantom" "inset-modify phantom Phantom Phantom"
|
||||
Item "Horiz. Phantom" "inset-modify phantom Phantom HPhantom"
|
||||
Item "Vert. Phantom" "inset-modify phantom Phantom VPhantom"
|
||||
Separator
|
||||
Item "Dissolve Inset|D" "inset-dissolve"
|
||||
End
|
||||
@ -201,23 +201,23 @@ Menuset
|
||||
# InsetSpace context menu
|
||||
#
|
||||
Menu "context-space"
|
||||
Item "Interword Space|w" "next-inset-modify space \space{}"
|
||||
Item "Protected Space|o" "next-inset-modify space ~"
|
||||
Item "Thin Space|T" "next-inset-modify space \thinspace{}"
|
||||
Item "Negative Thin Space|N" "next-inset-modify space \negthinspace{}"
|
||||
Item "Half Quad Space (Enskip)|k" "next-inset-modify space \enskip{}"
|
||||
Item "Protected Half Quad Space (Enspace)|E" "next-inset-modify space \enspace{}"
|
||||
Item "Quad Space|Q" "next-inset-modify space \quad{}"
|
||||
Item "Double Quad Space|u" "next-inset-modify space \qquad{}"
|
||||
Item "Horizontal Fill|F" "next-inset-modify space \hfill{}"
|
||||
Item "Protected Horizontal Fill|i" "next-inset-modify space \hspace*{\fill}"
|
||||
Item "Horizontal Fill (Dots)|D" "next-inset-modify space \dotfill{}"
|
||||
Item "Horizontal Fill (Rule)|R" "next-inset-modify space \hrulefill{}"
|
||||
Item "Horizontal Fill (Left Arrow)|L" "next-inset-modify space \leftarrowfill{}"
|
||||
Item "Horizontal Fill (Right Arrow)|g" "next-inset-modify space \rightarrowfill{}"
|
||||
Item "Horizontal Fill (Up Brace)|p" "next-inset-modify space \upbracefill{}"
|
||||
Item "Horizontal Fill (Down Brace)|B" "next-inset-modify space \downbracefill{}"
|
||||
Item "Custom Length|C" "command-sequence next-inset-modify space \hspace{} \length 1in; inset-settings"
|
||||
Item "Interword Space|w" "inset-modify space \space{}"
|
||||
Item "Protected Space|o" "inset-modify space ~"
|
||||
Item "Thin Space|T" "inset-modify space \thinspace{}"
|
||||
Item "Negative Thin Space|N" "inset-modify space \negthinspace{}"
|
||||
Item "Half Quad Space (Enskip)|k" "inset-modify space \enskip{}"
|
||||
Item "Protected Half Quad Space (Enspace)|E" "inset-modify space \enspace{}"
|
||||
Item "Quad Space|Q" "inset-modify space \quad{}"
|
||||
Item "Double Quad Space|u" "inset-modify space \qquad{}"
|
||||
Item "Horizontal Fill|F" "inset-modify space \hfill{}"
|
||||
Item "Protected Horizontal Fill|i" "inset-modify space \hspace*{\fill}"
|
||||
Item "Horizontal Fill (Dots)|D" "inset-modify space \dotfill{}"
|
||||
Item "Horizontal Fill (Rule)|R" "inset-modify space \hrulefill{}"
|
||||
Item "Horizontal Fill (Left Arrow)|L" "inset-modify space \leftarrowfill{}"
|
||||
Item "Horizontal Fill (Right Arrow)|g" "inset-modify space \rightarrowfill{}"
|
||||
Item "Horizontal Fill (Up Brace)|p" "inset-modify space \upbracefill{}"
|
||||
Item "Horizontal Fill (Down Brace)|B" "inset-modify space \downbracefill{}"
|
||||
Item "Custom Length|C" "command-sequence inset-modify space \hspace{} \length 1in; inset-settings"
|
||||
Separator
|
||||
Item "Settings...|S" "inset-settings"
|
||||
End
|
||||
@ -226,16 +226,16 @@ Menuset
|
||||
# InsetMathSpace context menu
|
||||
#
|
||||
Menu "context-mathspace"
|
||||
Item "Thin Space|T" "next-inset-modify mathspace \thinspace{}"
|
||||
Item "Medium Space|M" "next-inset-modify mathspace \medspace{}"
|
||||
Item "Thick Space|h" "next-inset-modify mathspace \thickspace{}"
|
||||
Item "Negative Thin Space|N" "next-inset-modify mathspace \negthinspace{}"
|
||||
Item "Negative Medium Space|u" "next-inset-modify mathspace \negmedspace{}"
|
||||
Item "Negative Thick Space|i" "next-inset-modify mathspace \negthickspace{}"
|
||||
Item "Half Quad Space (Enskip)|k" "next-inset-modify mathspace \enskip{}"
|
||||
Item "Quad Space|Q" "next-inset-modify mathspace \quad{}"
|
||||
Item "Double Quad Space|u" "next-inset-modify mathspace \qquad{}"
|
||||
Item "Custom Length|C" "command-sequence next-inset-modify mathspace \hspace{} \length 1in; inset-settings"
|
||||
Item "Thin Space|T" "inset-modify mathspace \thinspace{}"
|
||||
Item "Medium Space|M" "inset-modify mathspace \medspace{}"
|
||||
Item "Thick Space|h" "inset-modify mathspace \thickspace{}"
|
||||
Item "Negative Thin Space|N" "inset-modify mathspace \negthinspace{}"
|
||||
Item "Negative Medium Space|u" "inset-modify mathspace \negmedspace{}"
|
||||
Item "Negative Thick Space|i" "inset-modify mathspace \negthickspace{}"
|
||||
Item "Half Quad Space (Enskip)|k" "inset-modify mathspace \enskip{}"
|
||||
Item "Quad Space|Q" "inset-modify mathspace \quad{}"
|
||||
Item "Double Quad Space|u" "inset-modify mathspace \qquad{}"
|
||||
Item "Custom Length|C" "command-sequence inset-modify mathspace \hspace{} \length 1in; inset-settings"
|
||||
Separator
|
||||
Item "Settings...|S" "inset-settings"
|
||||
End
|
||||
@ -244,12 +244,12 @@ Menuset
|
||||
# InsetVSpace context menu
|
||||
#
|
||||
Menu "context-vspace"
|
||||
Item "DefSkip|D" "next-inset-modify vspace defskip"
|
||||
Item "SmallSkip|S" "next-inset-modify vspace smallskip"
|
||||
Item "MedSkip|M" "next-inset-modify vspace medskip"
|
||||
Item "BigSkip|B" "next-inset-modify vspace bigskip"
|
||||
Item "VFill|F" "next-inset-modify vspace vfill"
|
||||
Item "Custom|C" "command-sequence next-inset-modify vspace 1in; inset-settings"
|
||||
Item "DefSkip|D" "inset-modify vspace defskip"
|
||||
Item "SmallSkip|S" "inset-modify vspace smallskip"
|
||||
Item "MedSkip|M" "inset-modify vspace medskip"
|
||||
Item "BigSkip|B" "inset-modify vspace bigskip"
|
||||
Item "VFill|F" "inset-modify vspace vfill"
|
||||
Item "Custom|C" "command-sequence inset-modify vspace 1in; inset-settings"
|
||||
Separator
|
||||
Item "Settings...|e" "inset-settings"
|
||||
End
|
||||
@ -258,11 +258,11 @@ Menuset
|
||||
# InsetInclude context menu
|
||||
#
|
||||
Menu "context-include"
|
||||
Item "Include|c" "next-inset-modify changetype include"
|
||||
Item "Input|p" "next-inset-modify changetype input"
|
||||
Item "Verbatim|V" "next-inset-modify changetype verbatiminput"
|
||||
Item "Verbatim (marked blanks)|b" "next-inset-modify changetype verbatiminput*"
|
||||
Item "Listing|L" "next-inset-modify changetype lstinputlisting"
|
||||
Item "Include|c" "inset-modify changetype include"
|
||||
Item "Input|p" "inset-modify changetype input"
|
||||
Item "Verbatim|V" "inset-modify changetype verbatiminput"
|
||||
Item "Verbatim (marked blanks)|b" "inset-modify changetype verbatiminput*"
|
||||
Item "Listing|L" "inset-modify changetype lstinputlisting"
|
||||
Separator
|
||||
Item "Settings...|S" "inset-settings"
|
||||
Separator
|
||||
@ -273,18 +273,18 @@ Menuset
|
||||
# InsetNewpage context menu
|
||||
#
|
||||
Menu "context-newpage"
|
||||
Item "New Page|N" "next-inset-modify newpage newpage"
|
||||
Item "Page Break|a" "next-inset-modify newpage pagebreak"
|
||||
Item "Clear Page|C" "next-inset-modify newpage clearpage"
|
||||
Item "Clear Double Page|D" "next-inset-modify newpage cleardoublepage"
|
||||
Item "New Page|N" "inset-modify newpage newpage"
|
||||
Item "Page Break|a" "inset-modify newpage pagebreak"
|
||||
Item "Clear Page|C" "inset-modify newpage clearpage"
|
||||
Item "Clear Double Page|D" "inset-modify newpage cleardoublepage"
|
||||
End
|
||||
|
||||
#
|
||||
# InsetNewline context menu
|
||||
#
|
||||
Menu "context-newline"
|
||||
Item "Ragged Line Break|R" "next-inset-modify newline newline"
|
||||
Item "Justified Line Break|J" "next-inset-modify newline linebreak"
|
||||
Item "Ragged Line Break|R" "inset-modify newline newline"
|
||||
Item "Justified Line Break|J" "inset-modify newline linebreak"
|
||||
End
|
||||
|
||||
#
|
||||
@ -541,10 +541,10 @@ Menuset
|
||||
#
|
||||
|
||||
Menu "context-indexprint"
|
||||
Item "All Indexes|A" "next-inset-modify check-printindex*"
|
||||
Item "All Indexes|A" "inset-modify check-printindex*"
|
||||
IndicesListsContext
|
||||
Separator
|
||||
Item "Subindex|b" "next-inset-modify toggle-subindex"
|
||||
Item "Subindex|b" "inset-modify toggle-subindex"
|
||||
Separator
|
||||
OptItem "Settings...|S" "inset-settings"
|
||||
End
|
||||
|
@ -1039,18 +1039,6 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_NEXT_INSET_MODIFY: {
|
||||
// this is the real function we want to invoke
|
||||
FuncRequest tmpcmd = cmd;
|
||||
tmpcmd.action = LFUN_INSET_MODIFY;
|
||||
// if there is an inset at cursor, see whether it
|
||||
// handles the lfun, other start from scratch
|
||||
Inset * inset = cur.nextInset();
|
||||
if (!inset || !inset->getStatus(cur, tmpcmd, flag))
|
||||
flag = lyx::getStatus(tmpcmd);
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_LABEL_GOTO: {
|
||||
flag.setEnabled(!cmd.argument().empty()
|
||||
|| getInsetByCode<InsetRef>(cur, REF_CODE));
|
||||
@ -1630,31 +1618,6 @@ bool BufferView::dispatch(FuncRequest const & cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_NEXT_INSET_MODIFY: {
|
||||
// create the the real function we want to invoke
|
||||
FuncRequest tmpcmd = cmd;
|
||||
tmpcmd.action = LFUN_INSET_MODIFY;
|
||||
// if there is an inset at cursor, see whether it
|
||||
// can be modified.
|
||||
Inset * inset = cur.nextInset();
|
||||
if (inset) {
|
||||
cur.recordUndo();
|
||||
inset->dispatch(cur, tmpcmd);
|
||||
}
|
||||
// if it did not work, try the underlying inset.
|
||||
if (!inset || !cur.result().dispatched()) {
|
||||
cur.recordUndo();
|
||||
cur.dispatch(tmpcmd);
|
||||
}
|
||||
|
||||
if (!cur.result().dispatched())
|
||||
// It did not work too; no action needed.
|
||||
break;
|
||||
cur.clearSelection();
|
||||
processUpdateFlags(Update::Force | Update::FitCursor);
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_SCREEN_UP:
|
||||
case LFUN_SCREEN_DOWN: {
|
||||
Point p = getPos(cur, cur.boundary());
|
||||
|
@ -205,7 +205,7 @@ enum FuncCode
|
||||
LFUN_PARAGRAPH_DOWN, // Asger 1996-10-01
|
||||
// 145
|
||||
LFUN_PARAGRAPH_DOWN_SELECT, // Asger 1996-10-01
|
||||
LFUN_NEXT_INSET_MODIFY, // JSpitzm 20080323
|
||||
LFUN_INSET_FORALL, // lasgouttes, 20091127
|
||||
LFUN_BUFFER_NEW_TEMPLATE, // Asger 1997-02-02
|
||||
LFUN_BUFFER_RELOAD, // Asger 1997-02-02
|
||||
LFUN_RECONFIGURE,
|
||||
@ -445,7 +445,6 @@ enum FuncCode
|
||||
LFUN_CURSOR_FOLLOWS_SCROLLBAR_TOGGLE, // ARRae 971202
|
||||
// 345
|
||||
LFUN_DEBUG_LEVEL_SET,
|
||||
LFUN_INSET_FORALL, // lasgouttes, 20091127
|
||||
|
||||
LFUN_LASTACTION // end of the table
|
||||
};
|
||||
|
@ -2316,28 +2316,17 @@ void LyXAction::init()
|
||||
{ LFUN_INSET_INSERT, "inset-insert", Noop, Edit },
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_INSET_MODIFY
|
||||
* \li Action: Modify existing inset.
|
||||
* \li Action: Modify some properties of an inset.
|
||||
* \li Notion: Used for bibitem, bibtex, box, branch, command, ert, external,
|
||||
floats, graphics, include, label, listings, note,
|
||||
phantom, ref, space, tabular, vspace, wrap insets.
|
||||
floats, graphics, include, index, info, label,
|
||||
listings, newline, newpage, nomencl, note, phantom,
|
||||
ref, space, tabular, vspace, wrap insets.
|
||||
* \li Syntax: inset-modify <INSET> <ARGS>
|
||||
* \li Syntax: inset-modify changetype <TYPE>
|
||||
* \li Params: See #LFUN_INSET_INSERT for further details.
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_INSET_MODIFY, "", Noop, Hidden },
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_NEXT_INSET_MODIFY
|
||||
* \li Action: Modify the inset at cursor position, if there is one.
|
||||
* \li Notion: Used for bibitem, bibtex, box, branch, command, ert, external,
|
||||
floats, graphics, include, label, listings, note,
|
||||
phantom, ref, space, tabular, vspace, wrap insets.
|
||||
* \li Syntax: next-inset-modify <INSET> <ARGS>
|
||||
* \li Syntax: next-inset-modify changetype <TYPE>
|
||||
* \li Params: See #LFUN_INSET_INSERT for further details.
|
||||
* \li Origin: JSpitzm, 23 Mar 2008
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_NEXT_INSET_MODIFY, "next-inset-modify", Noop, Edit },
|
||||
{ LFUN_INSET_MODIFY, "inset-modify", AtPoint, Edit },
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_INSET_DIALOG_UPDATE
|
||||
* \li Action: Updates the values inside the dialog from the inset.
|
||||
|
@ -96,7 +96,7 @@ void GuiInfo::applyView()
|
||||
if (!ii->validate(argument))
|
||||
return;
|
||||
|
||||
dispatch(FuncRequest(LFUN_NEXT_INSET_MODIFY, argument));
|
||||
dispatch(FuncRequest(LFUN_INSET_MODIFY, argument));
|
||||
// FIXME: update the inset contents
|
||||
bufferview()->buffer().updateLabels();
|
||||
BufferView * bv = const_cast<BufferView *>(bufferview());
|
||||
|
@ -1271,12 +1271,12 @@ void MenuDefinition::expandIndicesContext(Buffer const * buf, bool listof)
|
||||
p["type"] = cit->shortcut();
|
||||
string const data = InsetCommand::params2string("index_print", p);
|
||||
addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(cit->index()),
|
||||
FuncRequest(LFUN_NEXT_INSET_MODIFY, data)));
|
||||
FuncRequest(LFUN_INSET_MODIFY, data)));
|
||||
} else {
|
||||
docstring label = _("Index Entry");
|
||||
label += " (" + cit->index() + ")";
|
||||
addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(label),
|
||||
FuncRequest(LFUN_NEXT_INSET_MODIFY,
|
||||
FuncRequest(LFUN_INSET_MODIFY,
|
||||
from_ascii("changetype ") + cit->shortcut())));
|
||||
}
|
||||
}
|
||||
@ -1317,7 +1317,7 @@ void MenuDefinition::expandCiteStyles(BufferView const * bv)
|
||||
CiteStyle cst = citeStyleList[ii - 1];
|
||||
cs.style = cst;
|
||||
addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(label),
|
||||
FuncRequest(LFUN_NEXT_INSET_MODIFY,
|
||||
FuncRequest(LFUN_INSET_MODIFY,
|
||||
"changetype " + from_utf8(citationStyleToString(cs)))));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user