diff options
author | Luke Yelavich <luke.yelavich@canonical.com> | 2012-02-01 09:51:00 +1100 |
---|---|---|
committer | Luke Yelavich <luke.yelavich@canonical.com> | 2012-02-01 09:51:00 +1100 |
commit | 03819d755f5c8380b48bca51599981e205c066f4 (patch) | |
tree | 1229fac65d7c87bf867664f02c1fe2a3cbcf5d09 | |
parent | 1edc78050399e0e88f4ef8b59f66c649e4862b89 (diff) | |
download | libdbusmenu-03819d755f5c8380b48bca51599981e205c066f4.tar.gz libdbusmenu-03819d755f5c8380b48bca51599981e205c066f4.tar.bz2 libdbusmenu-03819d755f5c8380b48bca51599981e205c066f4.zip |
Fix up monitoring of the atk object, didn't understand that notification was the same as the GTK widgets as well.
-rw-r--r-- | libdbusmenu-gtk/parser.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index 65a6b57..06eabba 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -607,7 +607,7 @@ construct_dbusmenu_for_widget (GtkWidget * widget) // so we had better watch out for it. pdata->accessible = accessible; g_signal_connect (G_OBJECT (accessible), - "accessible-name", + "notify", G_CALLBACK (a11y_name_notify_cb), mi); g_object_add_weak_pointer(G_OBJECT (accessible), (gpointer*)&pdata->accessible); @@ -994,10 +994,13 @@ a11y_name_notify_cb (AtkObject *accessible, * string as the text of the menu item label, in which case, we want to clear * the accessible description property of the dbusmenu item. */ - if (!g_strcmp0 (name, label_text)) - dbusmenu_menuitem_property_set (item, "accessible-desc", NULL); - else - dbusmenu_menuitem_property_set (item, "accessible-desc", name); + if (pspec->name == g_intern_static_string ("accessible-name")) + { + if (!g_strcmp0 (name, label_text)) + dbusmenu_menuitem_property_set (item, "accessible-desc", NULL); + else + dbusmenu_menuitem_property_set (item, "accessible-desc", name); + } } static void |