diff options
-rw-r--r-- | mail/em-account-prefs.c | 3 | ||||
-rw-r--r-- | widgets/misc/e-account-tree-view.c | 11 |
2 files changed, 12 insertions, 2 deletions
diff --git a/mail/em-account-prefs.c b/mail/em-account-prefs.c index 5431a4dad3..75ff66db9c 100644 --- a/mail/em-account-prefs.c +++ b/mail/em-account-prefs.c @@ -39,7 +39,6 @@ #include "em-config.h" #include "em-account-editor.h" #include "e-mail-shell-backend.h" -#include "mail-config.h" #define EM_ACCOUNT_PREFS_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ @@ -227,7 +226,7 @@ account_prefs_delete_account (EAccountManager *manager) /* Remove it from the config file. */ e_account_list_remove (account_list, account); - mail_config_write (); + e_account_list_save (account_list); } static void diff --git a/widgets/misc/e-account-tree-view.c b/widgets/misc/e-account-tree-view.c index 9f2d33a050..78f92d5f06 100644 --- a/widgets/misc/e-account-tree-view.c +++ b/widgets/misc/e-account-tree-view.c @@ -159,8 +159,15 @@ account_tree_view_enabled_toggled_cb (EAccountTreeView *tree_view, gchar *path_string, GtkCellRendererToggle *renderer) { + GtkTreeSelection *selection; + GtkTreePath *path; + /* Change the selection first so we enable or disable the * correct account. */ + path = gtk_tree_path_new_from_string (path_string); + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)); + gtk_tree_selection_select_path (selection, path); + gtk_tree_path_free (path); if (gtk_cell_renderer_toggle_get_active (renderer)) e_account_tree_view_disable_account (tree_view); @@ -355,6 +362,8 @@ account_tree_view_enable_account (EAccountTreeView *tree_view) account->enabled = TRUE; e_account_list_change (account_list, account); + + e_account_list_save (account_list); } static void @@ -372,6 +381,8 @@ account_tree_view_disable_account (EAccountTreeView *tree_view) account->enabled = FALSE; e_account_list_change (account_list, account); + + e_account_list_save (account_list); } static void |