From c60ab35eae0b3a41f78f95da84e21c604bc98d57 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 13 Oct 2011 17:03:01 -0500 Subject: Don't try to get objects from boolean values. Handle the 'always show image' property by getting the image from the object and using that --- libdbusmenu-gtk/parser.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libdbusmenu-gtk/parser.c') diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index e988c62..92932c5 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -1059,8 +1059,13 @@ widget_notify_cb (GtkWidget *widget, DBUSMENU_MENUITEM_PROP_VISIBLE, g_value_get_boolean (&prop_value)); } - else if (pspec->name == g_intern_static_string ("image") || - pspec->name == g_intern_static_string ("always-show-image")) + else if (pspec->name == g_intern_static_string ("always-show-image")) + { + GtkWidget *image = NULL; + g_object_get(widget, "image", &image, NULL); + update_icon (child, GTK_IMAGE(image)); + } + else if (pspec->name == g_intern_static_string ("image")) { GtkWidget *image; image = GTK_WIDGET (g_value_get_object (&prop_value)); -- cgit v1.2.3