aboutsummaryrefslogtreecommitdiff
path: root/src/libappindicator
diff options
context:
space:
mode:
authorJan Arne Petersen <jpetersen@openismus.com>2010-02-19 09:20:34 -0600
committerTed Gould <ted@gould.cx>2010-02-19 09:20:34 -0600
commit9012c49ff3299dc4c1b965fc49c3d0638a927846 (patch)
treef6c4630455a05da80eee8da615ae3d4a68237d9a /src/libappindicator
parent42e1e5795073eb170f5bea58079375b69c8d8fe6 (diff)
downloadlibayatana-appindicator-9012c49ff3299dc4c1b965fc49c3d0638a927846.tar.gz
libayatana-appindicator-9012c49ff3299dc4c1b965fc49c3d0638a927846.tar.bz2
libayatana-appindicator-9012c49ff3299dc4c1b965fc49c3d0638a927846.zip
Fix to unregister the object
Diffstat (limited to 'src/libappindicator')
-rw-r--r--src/libappindicator/app-indicator.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c
index 7fb7996..c0ccaec 100644
--- a/src/libappindicator/app-indicator.c
+++ b/src/libappindicator/app-indicator.c
@@ -598,6 +598,9 @@ check_connect (AppIndicator *self)
if (priv->id == NULL) return;
gchar * path = g_strdup_printf(DEFAULT_ITEM_PATH "/%s", priv->clean_id);
+
+ g_warning ("%s. %s", __FUNCTION__, path);
+
dbus_g_connection_register_g_object(priv->connection,
path,
G_OBJECT(self));
@@ -612,6 +615,8 @@ check_connect (AppIndicator *self)
/* 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 +637,8 @@ watcher_proxy_destroyed (GObject * object, gpointer data)
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 +656,8 @@ register_service_cb (DBusGProxy * proxy, GError * error, gpointer data)
/* 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);