diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-05-24 12:52:23 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-05-24 12:52:23 +0800 |
commit | 4324f34596feee175c5934bfbe8011fc1f31f7b8 (patch) | |
tree | 56e8c1a757e4ee50f9a6afa0d9588850bcb1bc14 | |
parent | 03ca12814b49f7f7999c635d7449dabce0b145b5 (diff) | |
download | gsoc2013-evolution-4324f34596feee175c5934bfbe8011fc1f31f7b8.tar.gz gsoc2013-evolution-4324f34596feee175c5934bfbe8011fc1f31f7b8.tar.zst gsoc2013-evolution-4324f34596feee175c5934bfbe8011fc1f31f7b8.zip |
Fix some account UI glitches.
-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 |