]> www.fi.muni.cz Git - evince.git/commitdiff
Use set_cursor instead of set_selection, so that the keyboard focus moves
authorMarco Pesenti Gritti <mpg@redhat.com>
Mon, 9 May 2005 10:52:10 +0000 (10:52 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Mon, 9 May 2005 10:52:10 +0000 (10:52 +0000)
2005-05-09  Marco Pesenti Gritti  <mpg@redhat.com>

        * shell/ev-sidebar-thumbnails.c: (page_changed_cb):

        Use set_cursor instead of set_selection, so that
        the keyboard focus moves too.

ChangeLog
shell/ev-sidebar-thumbnails.c

index 3f37363a12b8822f0b29b937b26c65650a76f02f..905fc6eadadcd9f1e83d29469970b9ed377b2d31 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-05-09  Marco Pesenti Gritti  <mpg@redhat.com>
+
+       * shell/ev-sidebar-thumbnails.c: (page_changed_cb):
+
+       Use set_cursor instead of set_selection, so that
+       the keyboard focus moves too.
+
 2005-05-09  Aleksey Kliger <akliger@gmail.com>
 
        * dvi/mdvi-lib/tfmfile.c: (lookup_font_metrics):
index 7945874b28cb1c761d66b2cc6f784f66836e244d..424d061df9b8a1000c95f39e0f12416595740f42 100644 (file)
@@ -214,16 +214,12 @@ page_changed_cb (EvPageCache         *page_cache,
                 int                  page,
                 EvSidebarThumbnails *sidebar)
 {
+       GtkTreeView *tree_view = GTK_TREE_VIEW (sidebar->priv->tree_view);
        GtkTreePath *path;
-       GtkTreeSelection *selection;
 
        path = gtk_tree_path_new_from_indices (page, -1);
-       selection = gtk_tree_view_get_selection
-                       (GTK_TREE_VIEW (sidebar->priv->tree_view));
-
-       gtk_tree_selection_select_path (selection, path);
-       gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (sidebar->priv->tree_view),
-                                     path, NULL, FALSE, 0.0, 0.0);
+       gtk_tree_view_set_cursor (tree_view, path, NULL, FALSE);
+       gtk_tree_view_scroll_to_cell (tree_view, path, NULL, FALSE, 0.0, 0.0);
        gtk_tree_path_free (path);
 }