mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-02 08:10:39 +00:00
* stdmenus.inc:
* src/insets/InsetCollapsable.inc: - specific context menu for conglomerate insets git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23940 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e7e67bb9e9
commit
4b1cfb9852
@ -578,6 +578,12 @@ Menuset
|
||||
OptItem "Settings...|S" "inset-settings"
|
||||
End
|
||||
|
||||
Menu "context-conglomerate"
|
||||
Item "Toggle Label|L" "next-inset-toggle"
|
||||
Separator
|
||||
OptItem "Settings...|S" "inset-settings"
|
||||
End
|
||||
|
||||
#
|
||||
# InsetBox context menu
|
||||
#
|
||||
|
@ -45,6 +45,8 @@ namespace lyx {
|
||||
|
||||
InsetCollapsable::CollapseStatus InsetCollapsable::status() const
|
||||
{
|
||||
if (decoration() == InsetLayout::Conglomerate)
|
||||
return status_;
|
||||
return autoOpen_ ? Open : status_;
|
||||
}
|
||||
|
||||
@ -749,9 +751,9 @@ bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
|
||||
case LFUN_INSET_TOGGLE:
|
||||
if ((cmd.argument() == "open" && status_ != Open)
|
||||
|| (cmd.argument() == "close" && status_ == Open)
|
||||
|| cmd.argument() == "toggle" || cmd.argument().empty())
|
||||
flag.enabled(true);
|
||||
|| (cmd.argument() == "close" && status_ == Open)
|
||||
|| cmd.argument() == "toggle" || cmd.argument().empty())
|
||||
flag.enabled(true);
|
||||
else
|
||||
flag.enabled(false);
|
||||
return true;
|
||||
@ -882,6 +884,9 @@ bool InsetCollapsable::undefined() const
|
||||
docstring InsetCollapsable::contextMenu(BufferView const & bv, int x,
|
||||
int y) const
|
||||
{
|
||||
if (decoration() == InsetLayout::Conglomerate)
|
||||
return from_ascii("context-conglomerate");
|
||||
|
||||
if (geometry() == NoButton)
|
||||
return from_ascii("context-collapsable");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user