aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-03-28 06:55:28 -0700
committerCharles Kerr <charles.kerr@canonical.com>2012-03-28 06:55:28 -0700
commita1e57b9cd9f82c14f2e0aaacbb58fd8c33cd65b3 (patch)
treef2a3458bdf31fee29f569035ba0cba6e76eff80b
parentbb56c3bea31c39f87dae1977ac589cc8313d7f1a (diff)
parent1dedf32ffdfd3ac56fb2ed46ddfc1e7be44eaf80 (diff)
downloadlibdbusmenu-a1e57b9cd9f82c14f2e0aaacbb58fd8c33cd65b3.tar.gz
libdbusmenu-a1e57b9cd9f82c14f2e0aaacbb58fd8c33cd65b3.tar.bz2
libdbusmenu-a1e57b9cd9f82c14f2e0aaacbb58fd8c33cd65b3.zip
fold together client.c's two PROPERTY_CHANGED signal handlers
-rw-r--r--libdbusmenu-gtk/client.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index f507a56..60af93f 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -787,22 +787,13 @@ menu_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant * variant, Db
process_disposition(mi, gmi, variant, gtkclient);
} else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC)) {
process_a11y_desc(mi, gmi, variant, gtkclient);
+ } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_SHORTCUT)) {
+ refresh_shortcut(gtkclient, mi);
}
return;
}
-/* Special handler for the shortcut changing as we need to have the
- client for that one to get the accel group. */
-static void
-menu_shortcut_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant * value, DbusmenuGtkClient * client)
-{
- if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_SHORTCUT)) {
- refresh_shortcut(client, mi);
- }
- return;
-}
-
/* The new menuitem signal only happens if we don't have a type handler
for the type of the item. This should be an error condition and we're
printing out a message. */
@@ -918,7 +909,6 @@ dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem *
/* DbusmenuMenuitem signals */
g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menu_prop_change_cb), client);
- g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menu_shortcut_change_cb), client);
g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(delete_child), client);
g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED, G_CALLBACK(move_child), client);