aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-17 22:34:25 -0600
committerTed Gould <ted@gould.cx>2010-02-17 22:34:25 -0600
commit42e1e5795073eb170f5bea58079375b69c8d8fe6 (patch)
treef18deec01a91406285e2ff3f0ca114c6a2a17cf0
parentde406e516344899c4006ce989e5915d7e39a1267 (diff)
parent715d75230d1164601639043303bc869289e7e9ae (diff)
downloadayatana-indicator-application-42e1e5795073eb170f5bea58079375b69c8d8fe6.tar.gz
ayatana-indicator-application-42e1e5795073eb170f5bea58079375b69c8d8fe6.tar.bz2
ayatana-indicator-application-42e1e5795073eb170f5bea58079375b69c8d8fe6.zip
Disconnect signal handlers when unreffing the menu.
-rw-r--r--src/libappindicator/app-indicator.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c
index 88f6bb6..7fb7996 100644
--- a/src/libappindicator/app-indicator.c
+++ b/src/libappindicator/app-indicator.c
@@ -141,6 +141,7 @@ static void status_icon_changes (AppIndicator * self, gpointer data);
static void status_icon_activate (GtkStatusIcon * icon, gpointer data);
static void unfallback (AppIndicator * self, GtkStatusIcon * status_icon);
static void watcher_proxy_destroyed (GObject * object, gpointer data);
+static void client_menu_changed (GtkWidget *widget, GtkWidget *child, AppIndicator *indicator);
/* GObject type */
G_DEFINE_TYPE (AppIndicator, app_indicator, G_TYPE_OBJECT);
@@ -364,7 +365,10 @@ app_indicator_dispose (GObject *object)
}
if (priv->menu != NULL) {
- g_object_unref(G_OBJECT(priv->menu));
+ g_signal_handlers_disconnect_by_func (G_OBJECT (priv->menu),
+ client_menu_changed,
+ self);
+ g_object_unref(G_OBJECT(priv->menu));
priv->menu = NULL;
}