]> www.fi.muni.cz Git - evince.git/commitdiff
Keep selected cell always visible in index treeview.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Fri, 12 Jan 2007 17:40:08 +0000 (17:40 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Fri, 12 Jan 2007 17:40:08 +0000 (17:40 +0000)
2007-01-12  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-sidebar-links.c: (update_page_callback_foreach):
Keep selected cell always visible in index treeview.

svn path=/trunk/; revision=2219

ChangeLog
shell/ev-sidebar-links.c

index 19d50a19ab1b46804c44a13b0e2305b2c27a6a94..c64ddd119ca9c0d89c6d2debee36c7bb3d46a7bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-12  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-sidebar-links.c: (update_page_callback_foreach):
+
+       Keep selected cell always visible in index treeview.
+
 2007-01-12  Carlos Garcia Campos  <carlosgc@gnome.org>
        
        * shell/ev-view.c: (ev_view_size_allocate):
index fbf1b73893e0a814c8a100335acbab00925c2835..4f677e67fdbfc777d78ab384bb59a06ba5bc00cf 100644 (file)
@@ -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;
                }