From f2832e7d0282fe553573f73efedce239d2ae2205 Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Thu, 29 Mar 2012 10:48:33 -0400 Subject: [PATCH] * #9490: gnome: fixed account add behaviour --- gnome/src/config/accountlistconfigdialog.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/gnome/src/config/accountlistconfigdialog.c b/gnome/src/config/accountlistconfigdialog.c index a3b001957f..27560b0200 100644 --- a/gnome/src/config/accountlistconfigdialog.c +++ b/gnome/src/config/accountlistconfigdialog.c @@ -142,13 +142,6 @@ static void edit_account_cb(GtkButton *button UNUSED, gpointer data) g_free(selected_accountID); } -static void add_account_cb(void) -{ - account_t *new_account = create_default_account(); - account_list_add(new_account); - run_account_dialog(new_account->accountID); -} - static void account_store_add(GtkTreeIter *iter, account_t *account) { const gchar *enabled = account_lookup(account, ACCOUNT_ENABLED); @@ -165,10 +158,12 @@ static void account_store_add(GtkTreeIter *iter, account_t *account) } + /** - * Fills the treelist with accounts + * Fills the treelist with accounts, should be called whenever the account + * list is modified. */ -void account_store_fill() +static void account_store_fill() { RETURN_IF_NULL(account_list_dialog, "No account dialog"); gtk_list_store_clear(account_store); @@ -195,6 +190,14 @@ void account_store_fill() } } +static void add_account_cb(void) +{ + account_t *new_account = create_default_account(); + account_list_add(new_account); + run_account_dialog(new_account->accountID); + account_store_fill(); +} + /** * Call back when the user click on an account in the list */ -- GitLab