diff options
author | Ted Gould <ted@gould.cx> | 2010-03-24 11:05:34 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-03-24 11:05:34 -0500 |
commit | f43fd84cd34b07a2966f858ca9c68985670fbe82 (patch) | |
tree | 9d34dd341d2ad5db6d864219f9aceafbed27c300 /libdbusmenu-gtk | |
parent | 9855cec4e4cbc745fdafb6270975be7f3e4f99fc (diff) | |
download | libdbusmenu-f43fd84cd34b07a2966f858ca9c68985670fbe82.tar.gz libdbusmenu-f43fd84cd34b07a2966f858ca9c68985670fbe82.tar.bz2 libdbusmenu-f43fd84cd34b07a2966f858ca9c68985670fbe82.zip |
Checking for blank icon when we get a pixmap paramater.
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r-- | libdbusmenu-gtk/client.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index dfa2fe2..ba01800 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -513,7 +513,7 @@ image_property_handle (DbusmenuMenuitem * item, const gchar * property, const GV if (!g_strcmp0(property, DBUSMENU_MENUITEM_PROP_ICON_DATA)) { /* 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) { + 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; } } @@ -533,32 +533,7 @@ image_property_handle (DbusmenuMenuitem * item, const gchar * property, const GV gint width, height; gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height); -#if 0 - /* Not work */ - GError * error = NULL; - GdkPixbuf * pixbuf = gdk_pixbuf_new_from_file("/usr/share/icons/hicolor/16x16/apps/wine.png", &error); - if (error != NULL) { g_warning("Blank error: %s", error->message); } - gtkimage = gtk_image_new_from_pixbuf(pixbuf); -#endif -#if 1 - /* Work */ - gtkimage = gtk_image_new_from_icon_name("stock_person", GTK_ICON_SIZE_MENU); -#endif -#if 0 - /* Not Work */ gtkimage = gtk_image_new(); -#endif -#if 0 - /* Not work */ - gtkimage = gtk_image_new_from_icon_name("stock_person", GTK_ICON_SIZE_MENU); - gtk_image_clear(GTK_IMAGE(gtkimage)); -#endif -#if 0 - /* Not work */ - gtkimage = gtk_image_new(); - gtk_widget_show(gtkimage); -#endif - gtk_widget_set_size_request(GTK_WIDGET(gtkimage), width, height); } else { /* Look to see if we want to have an icon with the 'ltr' or |