[empathy] empathy-logs: prepare the account manager first
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] empathy-logs: prepare the account manager first
- Date: Mon, 14 Nov 2011 14:38:56 +0000 (UTC)
commit 09e6bf30a2b213e30fcf7c33c316f69dd5fd64f4
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Nov 14 12:01:55 2011 +0100
empathy-logs: prepare the account manager first
The log viewer assumes it's already prepared.
https://bugzilla.gnome.org/show_bug.cgi?id=663873
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 4ed67d5..7671759 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]