Merge lp:~mterry/libdbusmenu/handle-icons-better into lp:libdbusmenu/0.5
Proposed by
Michael Terry
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 211 | ||||
Proposed branch: | lp:~mterry/libdbusmenu/handle-icons-better | ||||
Merge into: | lp:libdbusmenu/0.5 | ||||
Diff against target: |
358 lines (+155/-93) 1 file modified
libdbusmenu-gtk/parser.c (+155/-93) |
||||
To merge this branch: | bzr merge lp:~mterry/libdbusmenu/handle-icons-better | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ted Gould (community) | Approve | ||
Review via email: mp+49321@code.launchpad.net |
Description of the change
This branch does several things:
* Consolidates the various update_*_icon methods into one giant update_icon method that handles any type of icon. This makes it easier to handle when images switch icon types and just generally keeps similar logic in one place.
* Handles GIcon images
* Watches always-show-image status of the GtkMenuItem
* Watches lots of properties of the embedded GtkImage in a GtkMenuItem for changes
This was spurred on by bug 715864 and in particular, the menus of nautilus. They should now show up excellently.
To post a comment you must log in.
On Thu, 2011-02-10 at 23:32 +0000, Michael Terry wrote: menuitem_ property_ set (menuitem, MENUITEM_ PROP_ICON_ NAME, menuitem_ property_ set_image (menuitem, MENUITEM_ PROP_ICON_ DATA, menuitem_ property_ remove (menuitem, MENUITEM_ PROP_ICON_ NAME); menuitem_ property_ remove (menuitem, MENUITEM_ PROP_ICON_ DATA);
> + if (icon_name != NULL) {
> dbusmenu_
> DBUSMENU_
> icon_name);
> - } else {
> + }
> + else if (pixbuf != NULL) {
> + dbusmenu_
> + DBUSMENU_
> + pixbuf);
> + }
> + else {
> dbusmenu_
> DBUSMENU_
> + dbusmenu_
> + DBUSMENU_
> + }
I think in this statement it should remove the opposite property so that
we know only one is set in the end.
review needsfixing