[gtk+] inspector: Refine object tree search
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] inspector: Refine object tree search
- Date: Sat, 1 Nov 2014 01:14:34 +0000 (UTC)
commit 3f3725d97b0b5dc5bdd33916ff685a6b9b5923eb
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 31 21:13:18 2014 -0400
inspector: Refine object tree search
Behave similar to traditional treeview search, and center
the row when moving between matches.
gtk/inspector/object-tree.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/inspector/object-tree.c b/gtk/inspector/object-tree.c
index b601859..6f7d0bc 100644
--- a/gtk/inspector/object-tree.c
+++ b/gtk/inspector/object-tree.c
@@ -210,7 +210,7 @@ move_search_to_row (GtkInspectorObjectTree *wt,
path = gtk_tree_model_get_path (GTK_TREE_MODEL (wt->priv->model), iter);
gtk_tree_view_expand_to_path (wt->priv->tree, path);
gtk_tree_selection_select_path (selection, path);
- gtk_tree_view_scroll_to_cell (wt->priv->tree, path, wt->priv->object_column, FALSE, 0.0, 0.0);
+ gtk_tree_view_scroll_to_cell (wt->priv->tree, path, NULL, TRUE, 0.5, 0.0);
gtk_tree_path_free (path);
}
@@ -853,7 +853,7 @@ gtk_inspector_object_tree_select_object (GtkInspectorObjectTree *wt,
path = gtk_tree_model_get_path (GTK_TREE_MODEL (wt->priv->model), &iter);
gtk_tree_view_expand_to_path (GTK_TREE_VIEW (wt->priv->tree), path);
gtk_tree_selection_select_iter (gtk_tree_view_get_selection (GTK_TREE_VIEW (wt->priv->tree)), &iter);
- gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (wt->priv->tree), path, NULL, FALSE, 0, 0);
+ gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (wt->priv->tree), path, NULL, TRUE, 0.5, 0);
gtk_tree_view_row_activated (GTK_TREE_VIEW (wt->priv->tree), path, NULL);
gtk_tree_path_free (path);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]