summaryrefslogtreecommitdiff
path: root/gtk/gtktreeview.c
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2008-08-06 11:32:33 +0000
committerMichael Natterer <mitch@src.gnome.org>2008-08-06 11:32:33 +0000
commit3d75f278011b023a93136fe5f52cab97c8fb7215 (patch)
tree84160b6624be1778ca883fc501636d51c72b6fc7 /gtk/gtktreeview.c
parent5d95525f3041d591597f52a75020a243badb06ef (diff)
downloadgtk+-3d75f278011b023a93136fe5f52cab97c8fb7215.tar.gz
gtk/gtkcombobox.c gtk/gtkiconview.c gtk/gtkrange.c gtk/gtkscrolledwindow.c
2008-08-06 Michael Natterer <mitch@imendio.com> * gtk/gtkcombobox.c * gtk/gtkiconview.c * gtk/gtkrange.c * gtk/gtkscrolledwindow.c * gtk/gtktreeview.c: remove CLAMPing from values passed to gtk_adjustment_set_value() since it does it right now. svn path=/trunk/; revision=21021
Diffstat (limited to 'gtk/gtktreeview.c')
-rw-r--r--gtk/gtktreeview.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index ce3d22d09b..4aa6c195f9 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -3614,7 +3614,6 @@ gtk_tree_view_vertical_autoscroll (GtkTreeView *tree_view)
GdkRectangle visible_rect;
gint y;
gint offset;
- gfloat value;
gdk_window_get_pointer (tree_view->priv->bin_window, NULL, &y, NULL);
y += tree_view->priv->dy;
@@ -3630,9 +3629,8 @@ gtk_tree_view_vertical_autoscroll (GtkTreeView *tree_view)
return;
}
- value = CLAMP (tree_view->priv->vadjustment->value + offset, 0.0,
- tree_view->priv->vadjustment->upper - tree_view->priv->vadjustment->page_size);
- gtk_adjustment_set_value (tree_view->priv->vadjustment, value);
+ gtk_adjustment_set_value (tree_view->priv->vadjustment,
+ MAX (tree_view->priv->vadjustment->value + offset, 0.0));
}
static gboolean
@@ -3641,7 +3639,6 @@ gtk_tree_view_horizontal_autoscroll (GtkTreeView *tree_view)
GdkRectangle visible_rect;
gint x;
gint offset;
- gfloat value;
gdk_window_get_pointer (tree_view->priv->bin_window, &x, NULL, NULL);
@@ -3657,9 +3654,8 @@ gtk_tree_view_horizontal_autoscroll (GtkTreeView *tree_view)
}
offset = offset/3;
- value = CLAMP (tree_view->priv->hadjustment->value + offset,
- 0.0, tree_view->priv->hadjustment->upper - tree_view->priv->hadjustment->page_size);
- gtk_adjustment_set_value (tree_view->priv->hadjustment, value);
+ gtk_adjustment_set_value (tree_view->priv->hadjustment,
+ MAX (tree_view->priv->hadjustment->value + offset, 0.0));
return TRUE;
@@ -8952,11 +8948,7 @@ gtk_tree_view_clamp_column_visible (GtkTreeView *tree_view,
}
}
- gtk_adjustment_set_value (tree_view->priv->hadjustment,
- CLAMP (x,
- tree_view->priv->hadjustment->lower,
- tree_view->priv->hadjustment->upper
- - tree_view->priv->hadjustment->page_size));
+ gtk_adjustment_set_value (tree_view->priv->hadjustment, x);
}
else
{
@@ -11601,9 +11593,9 @@ gtk_tree_view_scroll_to_point (GtkTreeView *tree_view,
vadj = tree_view->priv->vadjustment;
if (tree_x != -1)
- gtk_adjustment_set_value (hadj, CLAMP (tree_x, hadj->lower, hadj->upper - hadj->page_size));
+ gtk_adjustment_set_value (hadj, tree_x);
if (tree_y != -1)
- gtk_adjustment_set_value (vadj, CLAMP (tree_y, vadj->lower, vadj->upper - vadj->page_size));
+ gtk_adjustment_set_value (vadj, tree_y);
}
/**