From: Marco Pesenti Gritti Date: Mon, 9 May 2005 10:52:10 +0000 (+0000) Subject: Use set_cursor instead of set_selection, so that the keyboard focus moves X-Git-Tag: EVINCE_0_3_1~55 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=ead6ec8b0cbdafc334fff0b3b5f9f79067af1e86;p=evince.git Use set_cursor instead of set_selection, so that the keyboard focus moves 2005-05-09 Marco Pesenti Gritti * shell/ev-sidebar-thumbnails.c: (page_changed_cb): Use set_cursor instead of set_selection, so that the keyboard focus moves too. --- diff --git a/ChangeLog b/ChangeLog index 3f37363a..905fc6ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-05-09 Marco Pesenti Gritti + + * 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 * dvi/mdvi-lib/tfmfile.c: (lookup_font_metrics): diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c index 7945874b..424d061d 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); }