From: Carlos Garcia Campos Date: Fri, 12 Jan 2007 17:40:08 +0000 (+0000) Subject: Keep selected cell always visible in index treeview. X-Git-Tag: EVINCE_0_7_2~102 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=f0baa4b2679ca5692d210f2979d76f2c4be9ccf2;p=evince.git Keep selected cell always visible in index treeview. 2007-01-12 Carlos Garcia Campos * shell/ev-sidebar-links.c: (update_page_callback_foreach): Keep selected cell always visible in index treeview. svn path=/trunk/; revision=2219 --- diff --git a/ChangeLog b/ChangeLog index 19d50a19..c64ddd11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-01-12 Carlos Garcia Campos + + * shell/ev-sidebar-links.c: (update_page_callback_foreach): + + Keep selected cell always visible in index treeview. + 2007-01-12 Carlos Garcia Campos * shell/ev-view.c: (ev_view_size_allocate): diff --git a/shell/ev-sidebar-links.c b/shell/ev-sidebar-links.c index fbf1b738..4f677e67 100644 --- a/shell/ev-sidebar-links.c +++ b/shell/ev-sidebar-links.c @@ -419,7 +419,7 @@ ev_sidebar_links_construct (EvSidebarLinks *ev_sidebar_links) loading_model = create_loading_model (); priv->tree_view = gtk_tree_view_new_with_model (loading_model); g_object_unref (loading_model); - + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree_view)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (priv->tree_view), FALSE); @@ -548,12 +548,10 @@ update_page_callback_foreach (GtkTreeModel *model, current_page = ev_page_cache_get_current_page (sidebar_links->priv->page_cache); if (dest_page == current_page) { - GtkTreeSelection *selection; - - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (sidebar_links->priv->tree_view)); gtk_tree_view_expand_to_path (GTK_TREE_VIEW (sidebar_links->priv->tree_view), path); - gtk_tree_selection_select_path (selection, path); + gtk_tree_view_set_cursor (GTK_TREE_VIEW (sidebar_links->priv->tree_view), + path, NULL, FALSE); return TRUE; }