From 7b1d0ce92c5437efab223bfdb6dbae990cba312e Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Tue, 5 Jun 2007 14:51:42 +0000 Subject: [PATCH] don't expand the row we are going to, only its parent node. 2007-06-05 Michael Natterer * plug-ins/helpbrowser/dialog.c (browser_dialog_goto_index): don't expand the row we are going to, only its parent node. svn path=/trunk/; revision=22714 --- ChangeLog | 5 +++++ plug-ins/helpbrowser/dialog.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dea24d8308..531683a30b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-06-05 Michael Natterer + + * plug-ins/helpbrowser/dialog.c (browser_dialog_goto_index): don't + expand the row we are going to, only its parent node. + 2007-06-05 Simon Budig * plug-ins/common/tiff-load.c diff --git a/plug-ins/helpbrowser/dialog.c b/plug-ins/helpbrowser/dialog.c index f714ec18aa..6fc0f594f5 100644 --- a/plug-ins/helpbrowser/dialog.c +++ b/plug-ins/helpbrowser/dialog.c @@ -667,17 +667,21 @@ browser_dialog_goto_index (const gchar *ref) GtkTreeSelection *selection; GtkTreeModel *model; GtkTreePath *path; + GtkTreePath *scroll_path; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)); model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view)); path = gtk_tree_model_get_path (model, iter); + scroll_path = gtk_tree_path_copy (path); + gtk_tree_path_up (path); gtk_tree_view_expand_to_path (GTK_TREE_VIEW (tree_view), path); - gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (tree_view), path, + gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (tree_view), scroll_path, NULL, FALSE, 0.0, 0.0); gtk_tree_path_free (path); + gtk_tree_path_free (scroll_path); gtk_tree_selection_select_iter (selection, iter); }