mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-04 16:42:57 +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"
|
OptItem "Settings...|S" "inset-settings"
|
||||||
End
|
End
|
||||||
|
|
||||||
|
Menu "context-conglomerate"
|
||||||
|
Item "Toggle Label|L" "next-inset-toggle"
|
||||||
|
Separator
|
||||||
|
OptItem "Settings...|S" "inset-settings"
|
||||||
|
End
|
||||||
|
|
||||||
#
|
#
|
||||||
# InsetBox context menu
|
# InsetBox context menu
|
||||||
#
|
#
|
||||||
|
@ -45,6 +45,8 @@ namespace lyx {
|
|||||||
|
|
||||||
InsetCollapsable::CollapseStatus InsetCollapsable::status() const
|
InsetCollapsable::CollapseStatus InsetCollapsable::status() const
|
||||||
{
|
{
|
||||||
|
if (decoration() == InsetLayout::Conglomerate)
|
||||||
|
return status_;
|
||||||
return autoOpen_ ? Open : status_;
|
return autoOpen_ ? Open : status_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -749,9 +751,9 @@ bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
|
|
||||||
case LFUN_INSET_TOGGLE:
|
case LFUN_INSET_TOGGLE:
|
||||||
if ((cmd.argument() == "open" && status_ != Open)
|
if ((cmd.argument() == "open" && status_ != Open)
|
||||||
|| (cmd.argument() == "close" && status_ == Open)
|
|| (cmd.argument() == "close" && status_ == Open)
|
||||||
|| cmd.argument() == "toggle" || cmd.argument().empty())
|
|| cmd.argument() == "toggle" || cmd.argument().empty())
|
||||||
flag.enabled(true);
|
flag.enabled(true);
|
||||||
else
|
else
|
||||||
flag.enabled(false);
|
flag.enabled(false);
|
||||||
return true;
|
return true;
|
||||||
@ -882,6 +884,9 @@ bool InsetCollapsable::undefined() const
|
|||||||
docstring InsetCollapsable::contextMenu(BufferView const & bv, int x,
|
docstring InsetCollapsable::contextMenu(BufferView const & bv, int x,
|
||||||
int y) const
|
int y) const
|
||||||
{
|
{
|
||||||
|
if (decoration() == InsetLayout::Conglomerate)
|
||||||
|
return from_ascii("context-conglomerate");
|
||||||
|
|
||||||
if (geometry() == NoButton)
|
if (geometry() == NoButton)
|
||||||
return from_ascii("context-collapsable");
|
return from_ascii("context-collapsable");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user