aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts-dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r--src/empathy-accounts-dialog.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index e34903f12..65019142e 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -625,8 +625,17 @@ accounts_dialog_protocol_changed_cb (GtkWidget *widget,
/* We are creating a new widget to replace the current one, don't ask
* confirmation to the user. */
priv->force_change_row = TRUE;
+
+ /* We'll update the selection after we create the new account widgets;
+ * updating it right now causes problems for the # of accounts = zero case */
+ g_signal_handlers_block_by_func (selection,
+ accounts_dialog_model_selection_changed, dialog);
+
gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+ g_signal_handlers_unblock_by_func (selection,
+ accounts_dialog_model_selection_changed, dialog);
+
accounts_dialog_setup_ui_to_add_account (dialog);
/* Restore "account" and "password" parameters in the new widget */