[openbox] Submenus with default choice improved

Dana Jansens dana at orodu.net
Mon Nov 29 17:45:42 EST 2010


On Mon, Nov 29, 2010 at 3:52 PM, Alexey Korop <akorop at gmail.com> wrote:
> Dana Jansens wrote on 29.11.2010 20:10:
>>
>> The default entry should not be specified with some special character
>> in the label.  We use XML as the menu definition, and it provides
>> attributes for purposes such as this.  Instead there should be a
>> default="true" attribute, or something similar, given to a menu
>> item.
>
>   Yes, that's right, but who is going to change the "obmenu"?

You can send a patch to the maintainer, no?

>> Pipe menus are not loaded until they are shown.  As Mikael has
>> pointed out to me, it doesn't seem that the changes will load a pipe
>> menu before trying to run its default entry.
>
>   Alas, in the pipe-menu it is impossible to have default entry at the first
> level.

It should not be impossible.  You run the pipe menu when you ask to
run the default command.  This gives you back what the default command
would be and you can execute it.  And if there is none, you can have
the same behaviour as in the non-pipe menu case.

>>
>> I don't want to change the behavior of a left click on a menu item.
>> However, we could use a modifier to run the default entry instead.
>> Control runs an entry without closing the menu.  How about using
>> Shift-Click to run a default entry?
>
>   The meaning of default entry in the fact that they could easily cause,
> without any additional keyboard or mouse actions.
>   Submenu with default should not be treated as a menu, but as a normal
> item, which, however, can be changed.
>   Example. Now I'm trying to change client items of the client-combined-menu
> to the submenus with the default item "Switch to". If the user left click
> the client item, he will get the same result as now. But if he wants, he can
> perform additional actions (the right click, click on the square, wait to
> the autoexpanding) and access submenu with additional actions as "Close",
> "Move to" submenu with default "Here", etc.
>   Submenu with default becomes meaningless if the execution of default item
> requires any actions that differ of actions to execute normal item.

I see, lemme think about this a bit.  Mikael, you have any thoughts also?

>> The x_in_bullet() function probly wouldn't be needed if using a
>> modifer-click to run default entries, but it breaks the convention of
>> naming public functions after the file which they are located in,
>> i.e. menuframe.c/h has public functions named menu_frame_foo().
>
>   I am opposed against any modifiers.
>
>> 2010/11/9 Alexey Korop <akorop at gmail.com <mailto:akorop at gmail.com>>
>> This letter is a copy of the ticket
>> http://bugzilla.icculus.org/show_bug.cgi?id=4795 .


- Dana


More information about the openbox mailing list