diff options
author | Albert Astals <albert.astals@canonical.com> | 2012-10-18 12:02:32 +0200 |
---|---|---|
committer | Albert Astals <albert.astals@canonical.com> | 2012-10-18 12:02:32 +0200 |
commit | 320cc9e5c4c8702151cf76b9a82679ca8eb467cd (patch) | |
tree | be6cad76e1fd2a2835bd7728a5f5a1101aaf3469 | |
parent | 3019e05fc39f667a14affe5ec6a65aded93d0512 (diff) | |
download | libdbusmenu-320cc9e5c4c8702151cf76b9a82679ca8eb467cd.tar.gz libdbusmenu-320cc9e5c4c8702151cf76b9a82679ca8eb467cd.tar.bz2 libdbusmenu-320cc9e5c4c8702151cf76b9a82679ca8eb467cd.zip |
Only prefer name over pixmap if the theme has the icon for the name
-rw-r--r-- | libdbusmenu-gtk/client.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 60af93f..ad70295 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; + } } } |