diff options
author | Jonny Lamb <jonnylamb@gnome.org> | 2009-11-03 18:38:19 +0800 |
---|---|---|
committer | Jonny Lamb <jonnylamb@gnome.org> | 2009-11-03 18:38:19 +0800 |
commit | 1529840ddfa801111b2292c99de75d7e32272324 (patch) | |
tree | 9634226f380e8d303bf3f150aab47ae8a01ee612 /src/empathy-accounts-dialog.c | |
parent | 83edf41df3eb8a7925939756b4d6650700dbf75a (diff) | |
download | gsoc2013-empathy-1529840ddfa801111b2292c99de75d7e32272324.tar gsoc2013-empathy-1529840ddfa801111b2292c99de75d7e32272324.tar.gz gsoc2013-empathy-1529840ddfa801111b2292c99de75d7e32272324.tar.bz2 gsoc2013-empathy-1529840ddfa801111b2292c99de75d7e32272324.tar.lz gsoc2013-empathy-1529840ddfa801111b2292c99de75d7e32272324.tar.xz gsoc2013-empathy-1529840ddfa801111b2292c99de75d7e32272324.tar.zst gsoc2013-empathy-1529840ddfa801111b2292c99de75d7e32272324.zip |
accounts-dialog: don't always select the first account automatically
Sometimes it takes a while to get all account details, but getting the
account names is fairly quick. What tends to happen is that the tree
view of account names is populated immediately, but the account widget
is just grey until all details are retrieved. This time is enough to
select an account in the tree view for editing.
However, previously, once all details are retrieved, the first account
is automatically selected. This is of course sensible if the user has
not selected an account, but it's pretty annoying if you've already
selected your seventeenth jabber account and then it plonks you back
to number one.
This patch only selects the first account if there is not one already
selected.
Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r-- | src/empathy-accounts-dialog.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 860d61531..2a09e277b 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -542,14 +542,19 @@ accounts_dialog_update_settings (EmpathyAccountsDialog *dialog, { GtkTreeView *view; GtkTreeModel *model; + GtkTreeSelection *selection; view = GTK_TREE_VIEW (priv->treeview); model = gtk_tree_view_get_model (view); + selection = gtk_tree_view_get_selection (view); if (gtk_tree_model_iter_n_children (model, NULL) > 0) { - /* We have configured accounts, select the first one */ - accounts_dialog_model_select_first (dialog); + /* We have configured accounts, select the first one if there + * is no other account selected already. */ + if (!gtk_tree_selection_get_selected (selection, NULL, NULL)) + accounts_dialog_model_select_first (dialog); + return; } if (empathy_connection_managers_get_cms_num (priv->cms) > 0) |