mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Make the insets accept LFUN_INSET_SETTINGS. For these insets, LFUN_INSET_SETTINGS was already used to show the settings dialog (in contrast to the insets in the next commit).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29175 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
07c4880fea
commit
9b111ea5a6
@ -239,6 +239,7 @@ bool InsetBox::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
return true;
|
||||
|
||||
case LFUN_INSET_DIALOG_UPDATE:
|
||||
case LFUN_INSET_SETTINGS:
|
||||
flag.setEnabled(true);
|
||||
return true;
|
||||
|
||||
|
@ -171,6 +171,7 @@ bool InsetBranch::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
switch (cmd.action) {
|
||||
case LFUN_INSET_MODIFY:
|
||||
case LFUN_INSET_DIALOG_UPDATE:
|
||||
case LFUN_INSET_SETTINGS:
|
||||
flag.setEnabled(true);
|
||||
break;
|
||||
|
||||
|
@ -158,6 +158,7 @@ bool InsetCommand::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
case LFUN_ERT_INSERT:
|
||||
status.setEnabled(false);
|
||||
return true;
|
||||
|
||||
// we handle these
|
||||
case LFUN_INSET_MODIFY:
|
||||
if (cmd.getArg(0) == "changetype") {
|
||||
@ -167,9 +168,12 @@ bool InsetCommand::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
}
|
||||
status.setEnabled(true);
|
||||
return true;
|
||||
|
||||
case LFUN_INSET_SETTINGS:
|
||||
case LFUN_INSET_DIALOG_UPDATE:
|
||||
status.setEnabled(true);
|
||||
return true;
|
||||
|
||||
default:
|
||||
return Inset::getStatus(cur, cmd, status);
|
||||
}
|
||||
|
@ -137,6 +137,7 @@ bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
case LFUN_PASTE:
|
||||
case LFUN_PRIMARY_SELECTION_PASTE:
|
||||
case LFUN_QUOTE_INSERT:
|
||||
case LFUN_INSET_SETTINGS:
|
||||
status.setEnabled(true);
|
||||
return true;
|
||||
|
||||
|
@ -183,6 +183,7 @@ bool InsetFloat::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
|
||||
case LFUN_INSET_MODIFY:
|
||||
case LFUN_INSET_DIALOG_UPDATE:
|
||||
case LFUN_INSET_SETTINGS:
|
||||
flag.setEnabled(true);
|
||||
return true;
|
||||
|
||||
|
@ -381,6 +381,7 @@ bool InsetListings::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
switch (cmd.action) {
|
||||
case LFUN_INSET_MODIFY:
|
||||
case LFUN_INSET_DIALOG_UPDATE:
|
||||
case LFUN_INSET_SETTINGS:
|
||||
status.setEnabled(true);
|
||||
return true;
|
||||
case LFUN_CAPTION_INSERT:
|
||||
|
@ -211,6 +211,7 @@ bool InsetNote::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
}
|
||||
return true;
|
||||
|
||||
case LFUN_INSET_SETTINGS:
|
||||
case LFUN_INSET_DIALOG_UPDATE:
|
||||
flag.setEnabled(true);
|
||||
return true;
|
||||
|
@ -285,6 +285,7 @@ bool InsetPhantom::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
switch (cmd.action) {
|
||||
|
||||
case LFUN_INSET_MODIFY:
|
||||
case LFUN_INSET_SETTINGS:
|
||||
flag.setEnabled(true);
|
||||
return true;
|
||||
|
||||
|
@ -3742,6 +3742,12 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
cell(cur.idx())->dispatch(cur, cmd);
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_INSET_SETTINGS:
|
||||
// relay this lfun to Inset, not to the cell.
|
||||
Inset::doDispatch(cur, cmd);
|
||||
break;
|
||||
|
||||
default:
|
||||
// we try to handle this event in the insets dispatch function.
|
||||
cell(cur.idx())->dispatch(cur, cmd);
|
||||
@ -4068,6 +4074,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
}
|
||||
return cell(cur.idx())->getStatus(cur, cmd, status);
|
||||
|
||||
case LFUN_INSET_SETTINGS:
|
||||
case LFUN_INSET_MODIFY:
|
||||
if (insetCode(cmd.getArg(0)) == TABULAR_CODE) {
|
||||
status.setEnabled(true);
|
||||
|
@ -107,6 +107,7 @@ bool InsetWrap::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
switch (cmd.action) {
|
||||
case LFUN_INSET_MODIFY:
|
||||
case LFUN_INSET_DIALOG_UPDATE:
|
||||
case LFUN_INSET_SETTINGS:
|
||||
flag.setEnabled(true);
|
||||
return true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user