[openbox] Submenus with default choice improved

Alexey Korop akorop at gmail.com
Mon Nov 29 15:52:43 EST 2010


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

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


More information about the openbox mailing list