From c15ddf6b53db97e61acd45da5fd8cc9f804d7625 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Thu, 4 Mar 2010 12:19:32 +0000 Subject: Cancel creation in the accounts dialog if the wizard is running If the account wizard is finished it should have created at least some accounts. Cancel any account creation that was going on in the accounts dialog so it nicely jumps showing the first real account :) --- src/empathy-accounts-dialog.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'src/empathy-accounts-dialog.c') diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index d8489ee92..75357be9c 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -346,10 +346,8 @@ accounts_dialog_update_status_infobar (EmpathyAccountsDialog *dialog, g_free (message_markup); } -static void -empathy_account_dialog_widget_cancelled_cb ( - EmpathyAccountWidget *widget_object, - EmpathyAccountsDialog *dialog) +void +empathy_account_dialog_cancel (EmpathyAccountsDialog *dialog) { GtkTreeView *view; GtkTreeModel *model; @@ -393,6 +391,14 @@ empathy_account_dialog_widget_cancelled_cb ( g_object_unref (settings); } +static void +empathy_account_dialog_widget_cancelled_cb ( + EmpathyAccountWidget *widget_object, + EmpathyAccountsDialog *dialog) +{ + empathy_account_dialog_cancel (dialog); +} + static void empathy_account_dialog_account_created_cb (EmpathyAccountWidget *widget_object, TpAccount *account, @@ -2344,3 +2350,19 @@ empathy_accounts_dialog_show_application (GdkScreen *screen, g_free (account_option); g_free (path); } + +gboolean +empathy_account_dialog_is_creating (EmpathyAccountsDialog *dialog) +{ + EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog); + gboolean result = FALSE; + + if (priv->setting_widget_object == NULL) + goto out; + + g_object_get (priv->setting_widget_object, + "creating-account", &result, NULL); + +out: + return result; +} -- cgit v1.2.3