aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy.c
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 /src/empathy.c
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 'src/empathy.c')
-rw-r--r--src/empathy.c43
1 files changed, 35 insertions, 8 deletions
diff --git a/src/empathy.c b/src/empathy.c
index b18e349e6..f272ecfec 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -228,7 +228,8 @@ connection_managers_prepare_cb (GObject *source,
goto out;
if (should_show_account_assistant (account_mgr, cm_mgr))
- empathy_account_assistant_show (GTK_WINDOW (empathy_main_window_get ()));
+ empathy_account_assistant_show (GTK_WINDOW (empathy_main_window_get ()),
+ cm_mgr);
out:
g_object_unref (cm_mgr);
@@ -336,20 +337,46 @@ migrate_config_to_xdg_dir (void)
}
static void
+connection_managers_prepare_for_accounts (GObject *source,
+ GAsyncResult *result,
+ gpointer user_data)
+{
+ EmpathyConnectionManagers *cm_mgr = EMPATHY_CONNECTION_MANAGERS (source);
+ GtkWidget *ui;
+
+ if (!empathy_connection_managers_prepare_finish (cm_mgr, result, NULL))
+ goto out;
+
+ ui = empathy_account_assistant_show (GTK_WINDOW (empathy_main_window_get ()),
+ cm_mgr);
+
+ if (account_dialog_only)
+ g_signal_connect (ui, "destroy", G_CALLBACK (gtk_main_quit), NULL);
+
+out:
+ g_object_unref (cm_mgr);
+}
+
+static void
do_show_accounts_ui (GtkWindow *window,
TpAccountManager *manager)
{
+ if (has_non_salut_accounts (manager))
+ {
+ GtkWidget *ui;
- GtkWidget *ui;
+ ui = empathy_accounts_dialog_show (window, NULL);
- if (has_non_salut_accounts (manager))
- ui = empathy_accounts_dialog_show (window, NULL);
+ if (account_dialog_only)
+ g_signal_connect (ui, "destroy", G_CALLBACK (gtk_main_quit), NULL);
+ }
else
- ui = empathy_account_assistant_show (window);
+ {
+ EmpathyConnectionManagers *cm_mgr;
- if (account_dialog_only)
- g_signal_connect (ui, "destroy",
- G_CALLBACK (gtk_main_quit), NULL);
+ empathy_connection_managers_prepare_async (cm_mgr,
+ connection_managers_prepare_for_accounts, NULL);
+ }
}
static void