diff options
Diffstat (limited to 'src/empathy.c')
-rw-r--r-- | src/empathy.c | 43 |
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 |