aboutsummaryrefslogtreecommitdiff
path: root/tests/test-approver.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-09 20:58:38 -0500
committerTed Gould <ted@gould.cx>2010-07-09 20:58:38 -0500
commited8163b9de3adf9883b2cf0c47c35bad2fe221ff (patch)
treee42a3b9b38fe0d8cce1a8b8b4b38c0c6ba5dd5bf /tests/test-approver.c
parent5b41b1e87608bab6bacb62ea95dd1c0964ba8706 (diff)
downloadlibayatana-appindicator-ed8163b9de3adf9883b2cf0c47c35bad2fe221ff.tar.gz
libayatana-appindicator-ed8163b9de3adf9883b2cf0c47c35bad2fe221ff.tar.bz2
libayatana-appindicator-ed8163b9de3adf9883b2cf0c47c35bad2fe221ff.zip
Making the registration async to clean things up, and async is better anyway.
Diffstat (limited to 'tests/test-approver.c')
-rw-r--r--tests/test-approver.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/tests/test-approver.c b/tests/test-approver.c
index df06df2..fd90bf7 100644
--- a/tests/test-approver.c
+++ b/tests/test-approver.c
@@ -66,6 +66,21 @@ _notification_approver_server_approve_item (void)
return;
}
+static void
+register_cb (DBusGProxy * proxy, GError * error, gpointer user_data)
+{
+ if (error != NULL) {
+ g_warning("Unable to register approver: %s", error->message);
+ g_error_free(error);
+ g_main_loop_quit(main_loop);
+ return;
+ }
+
+ g_debug("Building App Indicator");
+
+ return;
+}
+
gint owner_count = 0;
gboolean
check_for_service (gpointer user_data)
@@ -91,14 +106,7 @@ check_for_service (gpointer user_data)
NOTIFICATION_WATCHER_DBUS_IFACE);
g_debug("Registering Approver");
- GError * error = NULL;
- org_kde_StatusNotifierWatcher_register_notification_approver (proxy, APPROVER_PATH, &cats, &error);
-
- if (error != NULL) {
- g_warning("Unable to register approver: %s", error->message);
- g_error_free(error);
- g_main_loop_quit(main_loop);
- }
+ org_kde_StatusNotifierWatcher_register_notification_approver_async (proxy, APPROVER_PATH, &cats, register_cb, NULL);
return FALSE;
}