Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-05-09 10:52:10 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-05-09 10:52:10 (GMT)
commitead6ec8b0cbdafc334fff0b3b5f9f79067af1e86 (patch)
tree78a08935e6e6edf296295e06e030267058d49662 /shell
parent525205819a52cbca4388175bf7e3973a9a3d7d6e (diff)
Use set_cursor instead of set_selection, so that the keyboard focus moves
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.
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-sidebar-thumbnails.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c
index 7945874..424d061 100644
--- a/shell/ev-sidebar-thumbnails.c
+++ b/shell/ev-sidebar-thumbnails.c
@@ -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);
}