aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorAlbert Astals Cid (aacid) <Unknown>2012-10-24 16:50:13 +0200
committerCharles Kerr <charles.kerr@canonical.com>2012-10-24 16:50:13 +0200
commitb914be2afa8fa8d12a83841991701298c558f142 (patch)
tree05cb71899c54748141716c592308bc42f5581e7e /libdbusmenu-gtk
parent0a9995765d2e5c807aea7c316cca471cda64a2a6 (diff)
parent320cc9e5c4c8702151cf76b9a82679ca8eb467cd (diff)
downloadlibdbusmenu-b914be2afa8fa8d12a83841991701298c558f142.tar.gz
libdbusmenu-b914be2afa8fa8d12a83841991701298c558f142.tar.bz2
libdbusmenu-b914be2afa8fa8d12a83841991701298c558f142.zip
Only prefer name over pixmap if the theme has the icon for the name
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r--libdbusmenu-gtk/client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index d16209a..c33aaf3 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -1180,7 +1180,11 @@ image_property_handle (DbusmenuMenuitem * item, const gchar * property, GVariant
/* If we have an image already built from a name that is
way better than a pixbuf. Keep it. */
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)) {
- return;
+ const gchar *icon_name = NULL;
+ gtk_image_get_icon_name (GTK_IMAGE(gtkimage), &icon_name, NULL);
+ if (gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), icon_name)) {
+ return;
+ }
}
}