mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Use the command-alternatives sequence as defined in menus.bind
Otherwise, the shortcut is not displayed in the menu.
This commit is contained in:
parent
da57a6135e
commit
7d2764fb9e
@ -1904,8 +1904,11 @@ void MenuDefinition::expandEnvironmentSeparators(BufferView const * bv,
|
|||||||
translateIfPossible(curlayout)):
|
translateIfPossible(curlayout)):
|
||||||
bformat(_("Separated %1$s Below"),
|
bformat(_("Separated %1$s Below"),
|
||||||
translateIfPossible(curlayout));
|
translateIfPossible(curlayout));
|
||||||
|
// We use command-alternatives here since this is how the binding is defined
|
||||||
|
// (otherwise, the binding is not displayed in the menu)
|
||||||
add(MenuItem(MenuItem::Command, toqstr(label),
|
add(MenuItem(MenuItem::Command, toqstr(label),
|
||||||
FuncRequest(LFUN_ENVIRONMENT_SPLIT)));
|
FuncRequest(LFUN_COMMAND_ALTERNATIVES,
|
||||||
|
from_ascii("environment-split ; environment-split previous"))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!prevlayout.empty()) {
|
else if (!prevlayout.empty()) {
|
||||||
@ -1914,9 +1917,11 @@ void MenuDefinition::expandEnvironmentSeparators(BufferView const * bv,
|
|||||||
translateIfPossible(prevlayout)) :
|
translateIfPossible(prevlayout)) :
|
||||||
bformat(_("Separated %1$s Below"),
|
bformat(_("Separated %1$s Below"),
|
||||||
translateIfPossible(prevlayout));
|
translateIfPossible(prevlayout));
|
||||||
|
// We use command-alternatives here since this is how the binding is defined
|
||||||
|
// (otherwise, the binding is not displayed in the menu)
|
||||||
add(MenuItem(MenuItem::Command, toqstr(label),
|
add(MenuItem(MenuItem::Command, toqstr(label),
|
||||||
FuncRequest(LFUN_ENVIRONMENT_SPLIT,
|
FuncRequest(LFUN_COMMAND_ALTERNATIVES,
|
||||||
from_ascii("previous"))));
|
from_ascii("environment-split ; environment-split previous"))));
|
||||||
}
|
}
|
||||||
if (!outerlayout.empty()) {
|
if (!outerlayout.empty()) {
|
||||||
docstring label;
|
docstring label;
|
||||||
|
Loading…
Reference in New Issue
Block a user