> >> The following patch fixes the context menus for conglomerate-like > >> insets. > > > > can you be more specific what exactly are you trying to fix? > > currently i know about more bugs about the context menu of > > insets toggling. > > The 'show label' entry of conglomerate-style insets (charstyles) is > not working.
aha. well just the few others i remember now: all insets: dissolve is disabled when clicking on the top label, checkboxes are not visible (eg note inset) uncollapsed ERT: Open is visible and works as close. foot: edit context menu instead of inset context ERT: context menu obsoletes settings dialog lisings: has not open/close items > > i tried to document the current situation in lfun doxies. > > Good point. Let's see > > * \var lyx::FuncCode lyx::LFUN_NEXT_INSET_TOGGLE > * \li Action: Toggles the inset at cursor position. For collapsables, this > means it will > be (un-)collapsed, in case of other insets, the editing widget > (dialog) will > be entered. Also cf. #LFUN_INSET_SETTINGS. > > It is a bit more complicated than that. The algorithm is more like: > > - if there is an inset at cursor position, call inset-toggle on it > > - otherwise, call inset-toggle on our enclosing inset > > - if it did not work (undispatch), continue until we are at the > top-level inset. > > * \var lyx::FuncCode lyx::LFUN_INSET_TOGGLE > * \li Action: Toggles the collapsable inset we are currently in. > * \li Syntax: inset-toggle [<ARG>] > > Yes, but 'in' is not 'in' in the normal sense. On only need to > push_back the inset to the slice, even if the top inset is not highly > editable. This is weird, but remember that this function was an > anonymous one, not designed to be exposed to the outer world. i see. can you please change the doxies so they are correct? > >> Normally, I believe that all calls to next-inset-xxx should be > >> inset-xxx instead in stdcontext.inc. > > > > you won't be able to call 'open' on some insets then. > > Which ones? for example collapsed ERT context menu lacks 'Open inset' with your patch. pavel