Merge lp:~ted/libappindicator/dont-do-dbusmenu-work into lp:libappindicator

Proposed by Ted Gould
Status: Merged
Merged at revision: 199
Proposed branch: lp:~ted/libappindicator/dont-do-dbusmenu-work
Merge into: lp:libappindicator
Diff against target: 54 lines (+2/-21)
1 file modified
src/app-indicator.c (+2/-21)
To merge this branch: bzr merge lp:~ted/libappindicator/dont-do-dbusmenu-work
Reviewer Review Type Date Requested Status
Conor Curran (community) Approve
Review via email: mp+52618@code.launchpad.net

Description of the change

Removes reparsing the menu which causes general confusion. Dbusmenu handles this for us, let's not do it twice and screw things up.

To post a comment you must log in.
Revision history for this message
Conor Curran (cjcurran) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app-indicator.c'
2--- src/app-indicator.c 2011-02-25 19:16:24 +0000
3+++ src/app-indicator.c 2011-03-08 22:05:00 +0000
4@@ -184,7 +184,6 @@
5 static void unfallback (AppIndicator * self, GtkStatusIcon * status_icon);
6 static gchar * append_panel_icon_suffix (const gchar * icon_name);
7 static void watcher_owner_changed (GObject * obj, GParamSpec * pspec, gpointer user_data);
8-static void client_menu_changed (GtkWidget *widget, GtkWidget *child, AppIndicator *indicator);
9 static void theme_changed_cb (GtkIconTheme * theme, gpointer user_data);
10 static GVariant * bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar * path, const gchar * interface, const gchar * property, GError ** error, gpointer user_data);
11 static void bus_method_call (GDBusConnection * connection, const gchar * sender, const gchar * path, const gchar * interface, const gchar * method, GVariant * params, GDBusMethodInvocation * invocation, gpointer user_data);
12@@ -637,10 +636,7 @@
13 }
14
15 if (priv->menu != NULL) {
16- g_signal_handlers_disconnect_by_func (G_OBJECT (priv->menu),
17- client_menu_changed,
18- self);
19- g_object_unref(G_OBJECT(priv->menu));
20+ g_object_unref(G_OBJECT(priv->menu));
21 priv->menu = NULL;
22 }
23
24@@ -1925,14 +1921,6 @@
25 return;
26 }
27
28-static void
29-client_menu_changed (GtkWidget *widget,
30- GtkWidget *child,
31- AppIndicator *indicator)
32-{
33- setup_dbusmenu (indicator);
34-}
35-
36 /**
37 app_indicator_set_menu:
38 @self: The #AppIndicator
39@@ -1967,14 +1955,7 @@
40
41 check_connect (self);
42
43- g_signal_connect (menu,
44- "child-added",
45- G_CALLBACK (client_menu_changed),
46- self);
47- g_signal_connect (menu,
48- "child-removed",
49- G_CALLBACK (client_menu_changed),
50- self);
51+ return;
52 }
53
54 /**

Subscribers

People subscribed via source and target branches