mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
Proper lfun handling naming for listing tabs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26659 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
31b1ad0407
commit
7d86961eed
@ -408,6 +408,8 @@ enum FuncCode
|
|||||||
LFUN_COMPLETION_ACCEPT,
|
LFUN_COMPLETION_ACCEPT,
|
||||||
LFUN_COMMAND_ALTERNATIVES,
|
LFUN_COMMAND_ALTERNATIVES,
|
||||||
// 315
|
// 315
|
||||||
|
LFUN_TAB_INSERT,
|
||||||
|
LFUN_TAB_DELETE,
|
||||||
LFUN_LASTACTION // end of the table
|
LFUN_LASTACTION // end of the table
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -365,6 +365,23 @@ void LyXAction::init()
|
|||||||
* \endvar
|
* \endvar
|
||||||
*/
|
*/
|
||||||
{ LFUN_LISTING_INSERT, "listing-insert", Noop, Edit },
|
{ LFUN_LISTING_INSERT, "listing-insert", Noop, Edit },
|
||||||
|
/*!
|
||||||
|
* \var lyx::FuncCode lyx::LFUN_TAB_INSERT
|
||||||
|
* \li Action: Insert a tab into a listings inset.
|
||||||
|
* \li Syntax: tab-insert
|
||||||
|
* \li Origin: vfvanravesteijn, Sep 30 2008
|
||||||
|
* \endvar
|
||||||
|
*/
|
||||||
|
{ LFUN_TAB_INSERT, "tab-insert", SingleParUpdate, Edit },
|
||||||
|
/*!
|
||||||
|
* \var lyx::FuncCode lyx::LFUN_TAB_DELETE
|
||||||
|
* \li Action: Delete a tab or upto an equivalent amount of spaces from
|
||||||
|
a listings inset.
|
||||||
|
* \li Syntax: tab-delete
|
||||||
|
* \li Origin: vfvanravesteijn, Sep 30 2008
|
||||||
|
* \endvar
|
||||||
|
*/
|
||||||
|
{ LFUN_TAB_DELETE, "tab-delete", SingleParUpdate, Edit },
|
||||||
/*!
|
/*!
|
||||||
* \var lyx::FuncCode lyx::LFUN_QUOTE_INSERT
|
* \var lyx::FuncCode lyx::LFUN_QUOTE_INSERT
|
||||||
* \li Action: Inserts quotes according to the type and quote-language preference.
|
* \li Action: Inserts quotes according to the type and quote-language preference.
|
||||||
|
@ -290,7 +290,7 @@ void InsetListings::doDispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
case LFUN_INSET_DIALOG_UPDATE:
|
case LFUN_INSET_DIALOG_UPDATE:
|
||||||
cur.bv().updateDialog("listings", params2string(params()));
|
cur.bv().updateDialog("listings", params2string(params()));
|
||||||
break;
|
break;
|
||||||
case LFUN_CELL_FORWARD:
|
case LFUN_TAB_INSERT:
|
||||||
if (cur.selection()) {
|
if (cur.selection()) {
|
||||||
// If there is a selection, a tab is inserted at the
|
// If there is a selection, a tab is inserted at the
|
||||||
// beginning of each paragraph.
|
// beginning of each paragraph.
|
||||||
@ -316,7 +316,7 @@ void InsetListings::doDispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
cur.finishUndo();
|
cur.finishUndo();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LFUN_CELL_BACKWARD:
|
case LFUN_TAB_DELETE:
|
||||||
if (cur.selection()) {
|
if (cur.selection()) {
|
||||||
// If there is a selection, a tab (if present) is removed from
|
// If there is a selection, a tab (if present) is removed from
|
||||||
// the beginning of each paragraph.
|
// the beginning of each paragraph.
|
||||||
@ -389,8 +389,8 @@ bool InsetListings::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
case LFUN_CAPTION_INSERT:
|
case LFUN_CAPTION_INSERT:
|
||||||
status.setEnabled(!params().isInline());
|
status.setEnabled(!params().isInline());
|
||||||
return true;
|
return true;
|
||||||
case LFUN_CELL_BACKWARD:
|
case LFUN_TAB_INSERT:
|
||||||
case LFUN_CELL_FORWARD:
|
case LFUN_TAB_DELETE:
|
||||||
status.setEnabled(true);
|
status.setEnabled(true);
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user