]> git.0d.be Git - empathy.git/commitdiff
Don't create some extra "ghost" account if we're creating our first account and we...
authorTravis Reitter <treitter@gmail.com>
Fri, 26 Feb 2010 20:08:27 +0000 (12:08 -0800)
committerTravis Reitter <treitter@gmail.com>
Sat, 27 Feb 2010 00:59:18 +0000 (16:59 -0800)
src/empathy-accounts-dialog.c

index e34903f12b4401326a5c9adda19ddb292f962739..65019142e982247ebb21b445fa9031be49204a26 100644 (file)
@@ -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 */