Pavel Sanda <[EMAIL PROTECTED]> writes:

>> 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.

>
>> I am not sure what the current one exactly is.
>
> 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.


>> 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?

> do i see correctly this does not change anything wrt functionality?

The important part is the setOnOff.

>
>>      Menu "context-conglomerate"
>> -            Item "Toggle Label|L" "next-inset-toggle"
>> +            Item "Show Name|N" "inset-toggle"
>>              Item "Dissolve Inset|D" "inset-dissolve charstyle"
>>              Separator
>>              OptItem "Settings...|S" "inset-settings"
>
> btw what kind of inset is now set conglomerate ?

Character styles (aka some Flex insets).

JMarc

Reply via email to