aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-account-prefs.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-account-prefs.c')
-rw-r--r--mail/em-account-prefs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mail/em-account-prefs.c b/mail/em-account-prefs.c
index 4207a66455..8cd3b9105e 100644
--- a/mail/em-account-prefs.c
+++ b/mail/em-account-prefs.c
@@ -433,6 +433,7 @@ mail_accounts_load (EMAccountPrefs *prefs)
char *name, *val;
EIterator *node;
int row = 0;
+ GtkTreeSelection *selection;
model = (GtkListStore *) gtk_tree_view_get_model (prefs->table);
gtk_list_store_clear (model);
@@ -441,6 +442,8 @@ mail_accounts_load (EMAccountPrefs *prefs)
accounts = mail_config_get_accounts ();
node = e_list_get_iterator ((EList *) accounts);
+ selection = gtk_tree_view_get_selection(prefs->table);
+
while (e_iterator_is_valid (node)) {
EAccount *account;
CamelURL *url;
@@ -470,6 +473,10 @@ mail_accounts_load (EMAccountPrefs *prefs)
if (url)
camel_url_free (url);
+ /* select the first row by default */
+ if (row == 0)
+ gtk_tree_selection_select_iter (selection, &iter);
+
row++;
}