aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-21 22:33:00 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-25 22:13:39 +0800
commita24db41f217eea1cbf929cc3e623c50ca626db4b (patch)
tree040d3acff08bdb54b0e2b0bfe48999611ccce41c /tests
parentfcfdcc4011d7131d852d19474eb09eaa4a6e43d7 (diff)
downloadgsoc2013-empathy-a24db41f217eea1cbf929cc3e623c50ca626db4b.tar
gsoc2013-empathy-a24db41f217eea1cbf929cc3e623c50ca626db4b.tar.gz
gsoc2013-empathy-a24db41f217eea1cbf929cc3e623c50ca626db4b.tar.bz2
gsoc2013-empathy-a24db41f217eea1cbf929cc3e623c50ca626db4b.tar.lz
gsoc2013-empathy-a24db41f217eea1cbf929cc3e623c50ca626db4b.tar.xz
gsoc2013-empathy-a24db41f217eea1cbf929cc3e623c50ca626db4b.tar.zst
gsoc2013-empathy-a24db41f217eea1cbf929cc3e623c50ca626db4b.zip
Pass a ready EmpathyConnectionManagers to empathy_account_assistant_show
This kinda suck but we have to construct the assistant in a sync way so can't wait for the manager to become ready.
Diffstat (limited to 'tests')
-rw-r--r--tests/interactive/test-empathy-account-assistant.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/tests/interactive/test-empathy-account-assistant.c b/tests/interactive/test-empathy-account-assistant.c
index 4f1c9a49b..dc04c7027 100644
--- a/tests/interactive/test-empathy-account-assistant.c
+++ b/tests/interactive/test-empathy-account-assistant.c
@@ -5,19 +5,36 @@
#include <libempathy-gtk/empathy-ui-utils.h>
#include "empathy-account-assistant.h"
-int main (int argc, char **argv)
+static void
+managers_prepare_cb (GObject *source,
+ GAsyncResult *result,
+ gpointer user_data)
{
GtkWidget *assistant;
+ EmpathyConnectionManagers *managers = EMPATHY_CONNECTION_MANAGERS (source);
- gtk_init (&argc, &argv);
- empathy_gtk_init ();
+ g_assert (empathy_connection_managers_prepare_finish (managers, result,
+ NULL));
- assistant = empathy_account_assistant_show (NULL);
+ assistant = empathy_account_assistant_show (NULL, managers);
gtk_widget_show_all (assistant);
g_signal_connect_swapped (assistant, "destroy",
G_CALLBACK (gtk_main_quit), NULL);
+}
+
+int main (int argc, char **argv)
+{
+ EmpathyConnectionManagers *managers;
+
+ gtk_init (&argc, &argv);
+ empathy_gtk_init ();
+
+ managers = empathy_connection_managers_dup_singleton ();
+
+ empathy_connection_managers_prepare_async (managers,
+ managers_prepare_cb, NULL);
gtk_main ();