[openbox] client list with submenus
Alexey Korop
akorop at gmail.com
Sun Dec 19 15:27:06 EST 2010
Alexey Korop wrote on 29.11.2010 22:52:
> Now I'm trying to change client items of the
> client-combined-menu to the submenus with the default item "Switch to".
I'm ready. This innovation also applies to the client-list-menu.
The following text contains mostly technical details. User-level
text with screenshots see here: http://fit.kharkiv.org/openbox/
This feature is based on the menus with default choice. I sent
Bugzilla patch that implements it
(http://bugzilla.icculus.org/show_bug.cgi?id=4795), but this patch was
not commited, so I include it in modified form in a new patch attached
to this letter. Attached patch should be applied not after, but instead
of the patch of bug 4795.
Now I made the following.
1. Submenus with default are reimplemented.
1.1. Now default item is marked in a expanded submenu by the same
symbol as a menu item mark, but placed at the right of the bar.
1.2. Now the default item may be marked in the menu.xml by new
item property "default", f.e. <item default="true" label="my-label">.
1.3. Default item temporary may be marked by '*' as firsr
character of a label. This '*' is not displayed. This possibility can be
removed after Obmenu will support the menu with default.
1.3. New menu property "has_default" added. It may be used for
pipe-menus, f.e. <menu has_default="true" execute="my_script"
id="my_script" label="my pipe menu"/>. If the menu has this property,
then its row in the parent menu will be marked with the symbol of a menu
with default.
2. Submenu row in a parent menu now may have an icon. This
involved changing the definition of ObMenuEntry. The fields related to
the icon are moved from data.normal to a common part.
3. The client-list-menu and the client-list-combined-menu now have
90% of the same user-level functions, so the splitting of its code to
the two files lost all meaning. I remove the files
"client-list-combined-menu.*" and move his functions to the
"client-list-menu.*".
I've used as a base the last snapshot of the Dana's "work" branch
(15 Dec 2010).
The proposed patch is quite big, but it brings a little new code.
For the most part, it reorganizes the old code. The number of source
lines is almost no difference.
I can not attach a patch in an unpackaged form, as this exceeds
the maximum message size (40k).
I don't send this patch to the Bugzilla because I don't understand
what I need to do with internationalization. There are two new
internationalizable strings ("_Activate" and "_Kill") and several
strings have changed their location. The patch attached contains the
differences for some language files, but I doubt that it is done
correctly. Four language files are patched: "po/openbox.pot",
"po/POTFILES.in", "po/ru.po" and "po/uk.po". The essential is to correct
only the file "POTFILES.in" of which removed the reference to a file
"openbox/client_list_combined_menu.c" that no longer exists.
Merry Christmas!
Yours truly Alexey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openbox-cl-list-menu.patch.gz
Type: application/gzip
Size: 12031 bytes
Desc: not available
URL: <http://icculus.org/pipermail/openbox/attachments/20101219/07e459f6/attachment.bin>
More information about the openbox
mailing list