From: Jürgen Spitzmüller Date: Tue, 25 Mar 2008 06:17:18 +0000 (+0000) Subject: * stdmenus.inc: X-Git-Tag: 1.6.10~5448 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=4b1cfb98526d8cd26852fd668928c970ff78e89a;p=features.git * 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 --- diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc index 97ac8aa2b6..caba4d1184 100644 --- a/lib/ui/stdmenus.inc +++ b/lib/ui/stdmenus.inc @@ -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 # diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index 37d9b0a7d4..a5461e868e 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -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");