ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #01587
[Merge] lp:~dbarth/indicator-appmenu/conform-to-specs-defaults into lp:indicator-appmenu
David Barth has proposed merging lp:~dbarth/indicator-appmenu/conform-to-specs-defaults into lp:indicator-appmenu.
Requested reviews:
Indicator Applet Developers (indicator-applet-developers)
Check that properties are explicitly set before setting the visibility and sensitivity of a menu. This fixes bugs where KDE apps menus were not displayed initially and were all disabled by default
--
https://code.launchpad.net/~dbarth/indicator-appmenu/conform-to-specs-defaults/+merge/27608
Your team ayatana-commits is subscribed to branch lp:indicator-appmenu.
=== modified file 'src/window-menus.c'
--- src/window-menus.c 2010-06-12 02:26:49 +0000
+++ src/window-menus.c 2010-06-15 09:59:22 +0000
@@ -399,10 +399,14 @@
g_signal_connect(G_OBJECT(newentry), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menu_prop_changed), entry);
- if (dbusmenu_menuitem_property_get_bool(newentry, DBUSMENU_MENUITEM_PROP_VISIBLE)) {
+ if (dbusmenu_menuitem_property_get_value(newentry, DBUSMENU_MENUITEM_PROP_VISIBLE) != NULL) {
+ if (dbusmenu_menuitem_property_get_bool(newentry, DBUSMENU_MENUITEM_PROP_VISIBLE) == FALSE)
+ gtk_widget_show(GTK_WIDGET(entry->label));
+ } else
gtk_widget_show(GTK_WIDGET(entry->label));
- }
- gtk_widget_set_sensitive(GTK_WIDGET(entry->label), dbusmenu_menuitem_property_get_bool(newentry, DBUSMENU_MENUITEM_PROP_ENABLED));
+
+ if (dbusmenu_menuitem_property_get_value (newentry, DBUSMENU_MENUITEM_PROP_ENABLED) != NULL)
+ gtk_widget_set_sensitive(GTK_WIDGET(entry->label), dbusmenu_menuitem_property_get_bool(newentry, DBUSMENU_MENUITEM_PROP_ENABLED));
g_array_append_val(priv->entries, entry);
Follow ups