aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/unregister.patch
blob: 87b2bb278721bf8fb18229b5579bba6222c1a2f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
=== modified file 'src/libappindicator/app-indicator.c'
--- src/libappindicator/app-indicator.c	2010-02-17 22:04:09 +0000
+++ src/libappindicator/app-indicator.c	2010-02-19 15:21:19 +0000
@@ -598,6 +598,7 @@
 	if (priv->id == NULL) return;
 
 	gchar * path = g_strdup_printf(DEFAULT_ITEM_PATH "/%s", priv->clean_id);
+
 	dbus_g_connection_register_g_object(priv->connection,
 	                                    path,
 	                                    G_OBJECT(self));
@@ -612,6 +613,8 @@
 		/* Unable to get proxy, but we're handling that now so
 		   it's not a warning anymore. */
 		g_error_free(error);
+		dbus_g_connection_unregister_g_object(priv->connection,
+						      G_OBJECT(self));
 		start_fallback_timer(self, FALSE);
 		g_free(path);
 		return;
@@ -632,6 +635,8 @@
 	AppIndicator * self = APP_INDICATOR(data);
 	g_return_if_fail(self != NULL);
 
+	dbus_g_connection_unregister_g_object(self->priv->connection,
+					      G_OBJECT(self));
 	self->priv->watcher_proxy = NULL;
 	start_fallback_timer(self, FALSE);
 	return;
@@ -649,6 +654,8 @@
 		/* They didn't respond, ewww.  Not sure what they could
 		   be doing */
 		g_warning("Unable to connect to the Notification Watcher: %s", error->message);
+		dbus_g_connection_unregister_g_object(priv->connection,
+						      G_OBJECT(data));
 		g_object_unref(G_OBJECT(priv->watcher_proxy));
 		priv->watcher_proxy = NULL;
 		start_fallback_timer(APP_INDICATOR(data), TRUE);