aboutsummaryrefslogtreecommitdiff
path: root/libindicate
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-01-15 20:10:38 -0600
committerTed Gould <ted@canonical.com>2009-01-15 20:10:38 -0600
commitfb5b3301a2b7dcb9239c1c19a6134e2999e04007 (patch)
tree51750c8b7bc907c89d98cdc99229ad7d1cc48b30 /libindicate
parente50f228a7e4116c902a992a12ce9332c4481bf4c (diff)
downloadlibayatana-indicator-fb5b3301a2b7dcb9239c1c19a6134e2999e04007.tar.gz
libayatana-indicator-fb5b3301a2b7dcb9239c1c19a6134e2999e04007.tar.bz2
libayatana-indicator-fb5b3301a2b7dcb9239c1c19a6134e2999e04007.zip
Now correctly calling the get indicators function to get the indicators on already created objects.
Diffstat (limited to 'libindicate')
-rw-r--r--libindicate/listener.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libindicate/listener.c b/libindicate/listener.c
index a26ddcc..1087945 100644
--- a/libindicate/listener.c
+++ b/libindicate/listener.c
@@ -42,6 +42,7 @@ static void build_todo_list_cb (DBusGProxy * proxy, char ** names, GError * erro
static void todo_list_add (const gchar * name, DBusGProxy * proxy, IndicateListener * listener);
static gboolean todo_idle (gpointer data);
static void proxy_indicator_added (DBusGProxy * proxy, guint id, const gchar * type, proxy_t * proxyt);
+static void proxy_get_indicator_list (DBusGProxy * proxy, GArray * indicators, GError * error, gpointer data);
/* Code */
static void
@@ -296,10 +297,28 @@ todo_idle (gpointer data)
dbus_g_proxy_connect_signal(proxyt->proxy, "IndicatorAdded",
G_CALLBACK(proxy_indicator_added), proxyt, NULL);
+ org_freedesktop_indicator_get_indicator_list_async(proxyt->proxy, proxy_get_indicator_list, proxyt);
return TRUE;
}
static void
+proxy_get_indicator_list (DBusGProxy * proxy, GArray * indicators, GError * error, gpointer data)
+{
+ if (error != NULL) {
+ return;
+ }
+
+ proxy_t * proxyt = (proxy_t *)data;
+
+ int i;
+ for (i = 0; i < indicators->len; i++) {
+ g_debug("Interface %s has an indicator %d", proxyt->name, g_array_index(indicators, guint, i));
+ }
+
+ return;
+}
+
+static void
proxy_indicator_added (DBusGProxy * proxy, guint id, const gchar * type, proxy_t * proxyt)
{
g_debug("Interface %s has an indicator %d", proxyt->name, id);