Merge lp:~charlesk/libdbusmenu/propchange into lp:libdbusmenu/0.6

Proposed by Charles Kerr
Status: Merged
Merged at revision: 392
Proposed branch: lp:~charlesk/libdbusmenu/propchange
Merge into: lp:libdbusmenu/0.6
Diff against target: 34 lines (+4/-14)
1 file modified
libdbusmenu-gtk/client.c (+4/-14)
To merge this branch: bzr merge lp:~charlesk/libdbusmenu/propchange
Reviewer Review Type Date Requested Status
Lars Karlitski (community) Approve
Ted Gould Pending
Review via email: mp+99627@code.launchpad.net

Description of the change

Minor code cleanup to dbusmenu-gtk's client code as discussed in #systems: due to some previous code refactoring, client.c has two PROPERTY_CHANGED signal handlers. This patch merges them together.

To post a comment you must log in.
Revision history for this message
Lars Karlitski (larsu) wrote :

Looks great!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libdbusmenu-gtk/client.c'
2--- libdbusmenu-gtk/client.c 2012-03-21 03:53:52 +0000
3+++ libdbusmenu-gtk/client.c 2012-03-27 21:27:19 +0000
4@@ -787,19 +787,10 @@
5 process_disposition(mi, gmi, variant, gtkclient);
6 } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_ACCESSIBLE_DESC)) {
7 process_a11y_desc(mi, gmi, variant, gtkclient);
8- }
9-
10- return;
11-}
12-
13-/* Special handler for the shortcut changing as we need to have the
14- client for that one to get the accel group. */
15-static void
16-menu_shortcut_change_cb (DbusmenuMenuitem * mi, gchar * prop, GVariant * value, DbusmenuGtkClient * client)
17-{
18- if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_SHORTCUT)) {
19- refresh_shortcut(client, mi);
20- }
21+ } else if (!g_strcmp0(prop, DBUSMENU_MENUITEM_PROP_SHORTCUT)) {
22+ refresh_shortcut(gtkclient, mi);
23+ }
24+
25 return;
26 }
27
28@@ -918,7 +909,6 @@
29
30 /* DbusmenuMenuitem signals */
31 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menu_prop_change_cb), client);
32- g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menu_shortcut_change_cb), client);
33 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(delete_child), client);
34 g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED, G_CALLBACK(move_child), client);
35

Subscribers

People subscribed via source and target branches

to all changes: