Merge lp:~aacid/libdbusmenu/prefer_pixmap_over_unknown_icon_name into lp:libdbusmenu/13.04

Proposed by Albert Astals Cid
Status: Merged
Approved by: Charles Kerr
Approved revision: 431
Merged at revision: 431
Proposed branch: lp:~aacid/libdbusmenu/prefer_pixmap_over_unknown_icon_name
Merge into: lp:libdbusmenu/13.04
Diff against target: 15 lines (+5/-1)
1 file modified
libdbusmenu-gtk/client.c (+5/-1)
To merge this branch: bzr merge lp:~aacid/libdbusmenu/prefer_pixmap_over_unknown_icon_name
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+130312@code.launchpad.net

Commit message

Only prefer name over pixmap if the theme has the icon for the name

Description of the change

Only prefer name over pixmap if the theme has the icon for the name

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libdbusmenu-gtk/client.c'
2--- libdbusmenu-gtk/client.c 2012-03-27 21:23:09 +0000
3+++ libdbusmenu-gtk/client.c 2012-10-18 10:11:23 +0000
4@@ -1180,7 +1180,11 @@
5 /* If we have an image already built from a name that is
6 way better than a pixbuf. Keep it. */
7 if (gtkimage != NULL && (gtk_image_get_storage_type(GTK_IMAGE(gtkimage)) == GTK_IMAGE_ICON_NAME || gtk_image_get_storage_type(GTK_IMAGE(gtkimage)) == GTK_IMAGE_EMPTY)) {
8- return;
9+ const gchar *icon_name = NULL;
10+ gtk_image_get_icon_name (GTK_IMAGE(gtkimage), &icon_name, NULL);
11+ if (gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), icon_name)) {
12+ return;
13+ }
14 }
15 }
16

Subscribers

People subscribed via source and target branches