[openbox] Submenus with default choice improved

Dana Jansens dana at orodu.net
Mon Nov 29 13:10:33 EST 2010


On Mon, Nov 29, 2010 at 1:08 PM, Dana Jansens <dana at orodu.net> wrote:

> Hello,
>
> Thanks for the patch.  There's a couple issues that I have with it however.
>
> 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.
>
> 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.
>
> 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 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().
>

Oh, and one last thing.  Please don't gzip patches sent to the list.  If you
can use git send-email or git format-patch, that'd be very helpful.


>
> Cheers,
> Dana
>
> 2010/11/9 Alexey Korop <akorop at gmail.com>
>
>>  Hi, All
>>
>>    This letter is a copy of the ticket
>> http://bugzilla.icculus.org/show_bug.cgi?id=4795 .
>>
>>    Proposed patch improve the new behavior of the Openbox menus.
>>    One of the items of a submenu may be marked as default item by placing
>> the "*" character as a first character of a item label.
>>    If a marked item present in a submenu, then corresponding line of the
>> parent menu is marked in the special manner - the triangle inside of the
>> square, as in the OS/2. Left button click or the "Enter" key pressing
>> executes the default item of the submenu immediately, without the additional
>> keyboard or mouse actions with the submenu. The right button and the "Right"
>> key hold their old behavior (expand and select the submenu). Left button
>> click inside the square expand a submenu also.
>>    Image of the mark of a submenu whith default item is
>> theme-configurable, filename is "bullet_def.xbm" (this is a new theme file).
>>    This patch based on the Dana's work branch,
>> http://git.icculus.org/?p=dana/openbox.git;a=commit;h=51f4ec2c1d7e19ab4a9a701a2aa35b1c5b96cf27
>> .
>>
>> Yours truly Alexey
>>
>> _______________________________________________
>> openbox mailing list
>> openbox at icculus.org
>> http://icculus.org/mailman/listinfo/openbox
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20101129/06e41a47/attachment.htm>


More information about the openbox mailing list