diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-11-14 19:01:55 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-11-14 22:37:22 +0800 |
commit | 09e6bf30a2b213e30fcf7c33c316f69dd5fd64f4 (patch) | |
tree | c1a9b71e5653e47831dcf3e49bcea29d23eb9c8c /tests | |
parent | a12ee9fcdd35a1482b07da932b3af71a7f7d495c (diff) | |
download | gsoc2013-empathy-09e6bf30a2b213e30fcf7c33c316f69dd5fd64f4.tar gsoc2013-empathy-09e6bf30a2b213e30fcf7c33c316f69dd5fd64f4.tar.gz gsoc2013-empathy-09e6bf30a2b213e30fcf7c33c316f69dd5fd64f4.tar.bz2 gsoc2013-empathy-09e6bf30a2b213e30fcf7c33c316f69dd5fd64f4.tar.lz gsoc2013-empathy-09e6bf30a2b213e30fcf7c33c316f69dd5fd64f4.tar.xz gsoc2013-empathy-09e6bf30a2b213e30fcf7c33c316f69dd5fd64f4.tar.zst gsoc2013-empathy-09e6bf30a2b213e30fcf7c33c316f69dd5fd64f4.zip |
empathy-logs: prepare the account manager first
The log viewer assumes it's already prepared.
https://bugzilla.gnome.org/show_bug.cgi?id=663873
Diffstat (limited to 'tests')
-rw-r--r-- | tests/interactive/empathy-logs.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/tests/interactive/empathy-logs.c b/tests/interactive/empathy-logs.c index 4ed67d5d1..76717596e 100644 --- a/tests/interactive/empathy-logs.c +++ b/tests/interactive/empathy-logs.c @@ -36,11 +36,27 @@ destroy_cb (GtkWidget *dialog, gtk_main_quit (); } +static void +account_manager_prepare_cb (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + GError *error = NULL; + GtkWidget *window; + + tp_proxy_prepare_finish (source, result, &error); + g_assert_no_error (error); + + window = empathy_log_window_show (NULL, NULL, FALSE, NULL); + + g_signal_connect (window, "destroy", G_CALLBACK (destroy_cb), NULL); +} + int main (int argc, char *argv[]) { - GtkWidget *window; + TpAccountManager *mgr; g_thread_init (NULL); gtk_init (&argc, &argv); @@ -48,11 +64,13 @@ main (int argc, g_set_application_name (PACKAGE_NAME); gtk_window_set_default_icon_name ("empathy"); - window = empathy_log_window_show (NULL, NULL, FALSE, NULL); + mgr = tp_account_manager_dup (); - g_signal_connect (window, "destroy", G_CALLBACK (destroy_cb), NULL); + tp_proxy_prepare_async (mgr, NULL, account_manager_prepare_cb, NULL); gtk_main (); + g_object_unref (mgr); + return EXIT_SUCCESS; } |