aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-10 08:43:35 -0600
committerTed Gould <ted@gould.cx>2010-02-10 08:43:35 -0600
commit370c87f0cfa8364d3efd66e229772e2db94b13dc (patch)
treecc49c412126eb00ffec4cdf209117caf3f76c278 /src
parent07cba3340daeb169dc1e2ef28c01bafa7fb60448 (diff)
downloadlibayatana-appindicator-370c87f0cfa8364d3efd66e229772e2db94b13dc.tar.gz
libayatana-appindicator-370c87f0cfa8364d3efd66e229772e2db94b13dc.tar.bz2
libayatana-appindicator-370c87f0cfa8364d3efd66e229772e2db94b13dc.zip
Moving the registration of the object to when we want to connect everything, and making the path include the item ID to ensure it's unique.
Diffstat (limited to 'src')
-rw-r--r--src/libappindicator/app-indicator.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c
index 540620c..fb6e7dc 100644
--- a/src/libappindicator/app-indicator.c
+++ b/src/libappindicator/app-indicator.c
@@ -332,11 +332,7 @@ app_indicator_init (AppIndicator *self)
}
dbus_g_connection_ref(priv->connection);
- dbus_g_connection_register_g_object(priv->connection,
- DEFAULT_ITEM_PATH,
- G_OBJECT(self));
-
- self->priv = priv;
+ self->priv = priv;
return;
}
@@ -584,6 +580,12 @@ check_connect (AppIndicator *self)
if (priv->icon_name == NULL) return;
if (priv->id == NULL) return;
+ gchar * path = g_strdup_printf(DEFAULT_ITEM_PATH "/%s", priv->id);
+ dbus_g_connection_register_g_object(priv->connection,
+ path,
+ G_OBJECT(self));
+ g_free(path);
+
GError * error = NULL;
priv->watcher_proxy = dbus_g_proxy_new_for_name_owner(priv->connection,
NOTIFICATION_WATCHER_DBUS_ADDR,