diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-08-30 14:56:28 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-08-30 14:56:28 +0900 |
commit | 54d44a9bd04cfbed8426614fc69c027a46f41a14 (patch) | |
tree | 34bdf65a6e8d5d6d4016154345d1d803ba0da379 /gtk/tests/treeview-scrolling.c | |
parent | b3b22c31b997fb85b3319b392a1a69407703184c (diff) | |
parent | 67194ed77b153eb5a7eb6c596f3c20e274b7787a (diff) | |
download | gtk+-native-layout.tar.gz |
Merge branch 'master' into native-layoutnative-layout
Conflicts:
gtk/gtkplug.c
gtk/gtkscrolledwindow.c
Diffstat (limited to 'gtk/tests/treeview-scrolling.c')
-rw-r--r-- | gtk/tests/treeview-scrolling.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/tests/treeview-scrolling.c b/gtk/tests/treeview-scrolling.c index 81dfd8d752..6b2d13c9d9 100644 --- a/gtk/tests/treeview-scrolling.c +++ b/gtk/tests/treeview-scrolling.c @@ -416,6 +416,7 @@ test_position (GtkTreeView *tree_view, /* This is only tested for during test_single() */ model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view)); if (gtk_tree_model_iter_n_children (model, NULL) == 1) { + GtkAllocation allocation; GtkTreePath *tmppath; /* Test nothing is dangling at the bottom; read @@ -423,7 +424,8 @@ test_position (GtkTreeView *tree_view, */ /* FIXME: hardcoded width */ - if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (tree_view), 0, GTK_WIDGET (tree_view)->allocation.height - 30, &tmppath, NULL, NULL, NULL)) { + gtk_widget_get_allocation (GTK_WIDGET (tree_view), &allocation); + if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (tree_view), 0, allocation.height - 30, &tmppath, NULL, NULL, NULL)) { g_assert_not_reached (); gtk_tree_path_free (tmppath); } @@ -715,6 +717,7 @@ test_editable_position (GtkWidget *tree_view, GtkWidget *editable, GtkTreePath *cursor_path) { + GtkAllocation allocation; GdkRectangle rect; GtkAdjustment *vadj; @@ -724,7 +727,8 @@ test_editable_position (GtkWidget *tree_view, vadj = gtk_tree_view_get_vadjustment (GTK_TREE_VIEW (tree_view)); /* There are all in bin_window coordinates */ - g_assert (editable->allocation.y == rect.y + ((rect.height - editable->allocation.height) / 2)); + gtk_widget_get_allocation (editable, &allocation); + g_assert (allocation.y == rect.y + ((rect.height - allocation.height) / 2)); } static void |