[gtk+] gtk: use the new scrollable API to get to the scroll adjustments
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk: use the new scrollable API to get to the scroll adjustments
- Date: Fri, 22 Oct 2010 15:11:13 +0000 (UTC)
commit 3dc1f097728260a653ef458ab5a639330686e6da
Author: Michael Natterer <mitch gimp org>
Date: Fri Oct 22 17:09:23 2010 +0200
gtk: use the new scrollable API to get to the scroll adjustments
gtk/tests/treeview-scrolling.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/tests/treeview-scrolling.c b/gtk/tests/treeview-scrolling.c
index d3afe04..8faf565 100644
--- a/gtk/tests/treeview-scrolling.c
+++ b/gtk/tests/treeview-scrolling.c
@@ -324,7 +324,7 @@ test_position_with_align (GtkTreeView *tree_view,
gdouble row_align)
{
gboolean passed = TRUE;
- GtkAdjustment *vadj = gtk_tree_view_get_vadjustment (tree_view);
+ GtkAdjustment *vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (tree_view));
/* Switch on row-align: 0.0, 0.5, 1.0 */
switch ((int)(row_align * 2.)) {
@@ -424,7 +424,7 @@ test_position_without_align (GtkTreeView *tree_view,
gdouble row_start,
gdouble row_height)
{
- GtkAdjustment *vadj = gtk_tree_view_get_vadjustment (tree_view);
+ GtkAdjustment *vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (tree_view));
/* Without align the tree view does as less work as possible,
* so basically we only have to check whether the row
@@ -460,7 +460,7 @@ test_position (GtkTreeView *tree_view,
/* Ugh */
pos = get_pos_from_path (GTK_TREE_VIEW (tree_view),
path, rect.height,
- gtk_tree_view_get_vadjustment (GTK_TREE_VIEW (tree_view)));
+ gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (tree_view)));
/* This is only tested for during test_single() */
model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
@@ -783,7 +783,7 @@ test_editable_position (GtkWidget *tree_view,
gtk_tree_view_get_background_area (GTK_TREE_VIEW (tree_view),
cursor_path, NULL, &rect);
- vadj = gtk_tree_view_get_vadjustment (GTK_TREE_VIEW (tree_view));
+ vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (tree_view));
/* There are all in bin_window coordinates */
gtk_widget_get_allocation (editable, &allocation);
@@ -872,7 +872,7 @@ scroll_new_row_tree (ScrollFixture *fixture,
gtk_main_iteration ();
model = gtk_tree_view_get_model (GTK_TREE_VIEW (fixture->tree_view));
- vadjustment = gtk_tree_view_get_vadjustment (GTK_TREE_VIEW (fixture->tree_view));
+ vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (fixture->tree_view));
for (i = 0; i < 5; i++) {
GtkTreeIter scroll_iter;
@@ -935,7 +935,7 @@ test_bug316689 (ScrollFixture *fixture,
while (gtk_events_pending ())
gtk_main_iteration ();
- vadj = gtk_tree_view_get_vadjustment (GTK_TREE_VIEW (fixture->tree_view));
+ vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (fixture->tree_view));
g_assert (vadj->value + vadj->page_size <= vadj->upper);
g_assert (vadj->value == vadj->upper - vadj->page_size);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]