aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-28 20:13:52 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-28 20:13:52 +0800
commitee8f37f906b6d5c678a393a4aa94a9566d2c6ecc (patch)
tree311649e9d7241de3f2a6e14bf2f464d4ca9f9990 /src/empathy-accounts-dialog.c
parent6dfdd570279f24ea16f51a63ff5edf0b09055dc1 (diff)
downloadgsoc2013-empathy-ee8f37f906b6d5c678a393a4aa94a9566d2c6ecc.tar
gsoc2013-empathy-ee8f37f906b6d5c678a393a4aa94a9566d2c6ecc.tar.gz
gsoc2013-empathy-ee8f37f906b6d5c678a393a4aa94a9566d2c6ecc.tar.bz2
gsoc2013-empathy-ee8f37f906b6d5c678a393a4aa94a9566d2c6ecc.tar.lz
gsoc2013-empathy-ee8f37f906b6d5c678a393a4aa94a9566d2c6ecc.tar.xz
gsoc2013-empathy-ee8f37f906b6d5c678a393a4aa94a9566d2c6ecc.tar.zst
gsoc2013-empathy-ee8f37f906b6d5c678a393a4aa94a9566d2c6ecc.zip
accounts_dialog_set_selected_account: scroll to the selected account
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r--src/empathy-accounts-dialog.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index d62d34e91..868ef3146 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -1899,7 +1899,20 @@ accounts_dialog_set_selected_account (EmpathyAccountsDialog *dialog,
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview));
if (accounts_dialog_get_account_iter (dialog, account, &iter))
- gtk_tree_selection_select_iter (selection, &iter);
+ {
+ GtkTreePath *path;
+ GtkTreeModel *model;
+
+ gtk_tree_selection_select_iter (selection, &iter);
+
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->treeview));
+ path = gtk_tree_model_get_path (model, &iter);
+
+ gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (priv->treeview), path, NULL,
+ TRUE, 0, 0.5);
+
+ gtk_tree_path_free (path);
+ }
}
static void