[gnome-control-center] online-accounts: Scroll the tree view when showing an account



commit 48a9df92c3e691e088cb945b6d8eca73c2ecb9db
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Mar 19 13:40:33 2013 +0100

    online-accounts: Scroll the tree view when showing an account
    
    https://bugzilla.gnome.org/show_bug.cgi?id=695171

 panels/online-accounts/cc-online-accounts-panel.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/panels/online-accounts/cc-online-accounts-panel.c 
b/panels/online-accounts/cc-online-accounts-panel.c
index 16c2974..5d569a6 100644
--- a/panels/online-accounts/cc-online-accounts-panel.c
+++ b/panels/online-accounts/cc-online-accounts-panel.c
@@ -501,12 +501,16 @@ select_account_by_id (CcGoaPanel    *panel,
 
   if (iter_set)
     {
+      GtkTreePath *path;
       GtkTreeView *tree_view;
       GtkTreeSelection *selection;
 
       tree_view = GTK_TREE_VIEW (panel->accounts_treeview);
       selection = gtk_tree_view_get_selection (tree_view);
       gtk_tree_selection_select_iter (selection, &iter);
+      path = gtk_tree_model_get_path (GTK_TREE_MODEL (panel->accounts_model), &iter);
+      gtk_tree_view_scroll_to_cell (tree_view, path, NULL, FALSE, 0.0, 0.0);
+      gtk_tree_path_free (path);
     }
 
   return iter_set;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]