[gtk+] scrolledwindow: Update adjustment usage for sealing
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] scrolledwindow: Update adjustment usage for sealing
- Date: Wed, 5 Jan 2011 22:55:01 +0000 (UTC)
commit f5a3af9b021999fdf62e28a763b5d11a6f906d00
Author: Benjamin Otte <otte redhat com>
Date: Wed Jan 5 19:15:06 2011 +0100
scrolledwindow: Update adjustment usage for sealing
gtk/gtkscrolledwindow.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 828dd8a..972d996 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1332,27 +1332,27 @@ gtk_scrolled_window_scroll_child (GtkScrolledWindow *scrolled_window,
if (adjustment)
{
- gdouble value = adjustment->value;
+ gdouble value = gtk_adjustment_get_value (adjustment);
switch (scroll)
{
case GTK_SCROLL_STEP_FORWARD:
- value += adjustment->step_increment;
+ value += gtk_adjustment_get_step_increment (adjustment);
break;
case GTK_SCROLL_STEP_BACKWARD:
- value -= adjustment->step_increment;
+ value -= gtk_adjustment_get_step_increment (adjustment);
break;
case GTK_SCROLL_PAGE_FORWARD:
- value += adjustment->page_increment;
+ value += gtk_adjustment_get_page_increment (adjustment);
break;
case GTK_SCROLL_PAGE_BACKWARD:
- value -= adjustment->page_increment;
+ value -= gtk_adjustment_get_page_increment (adjustment);
break;
case GTK_SCROLL_START:
- value = adjustment->lower;
+ value = gtk_adjustment_get_lower (adjustment);
break;
case GTK_SCROLL_END:
- value = adjustment->upper;
+ value = gtk_adjustment_get_upper (adjustment);
break;
default:
g_assert_not_reached ();
@@ -1842,12 +1842,12 @@ gtk_scrolled_window_scroll_event (GtkWidget *widget,
if (range && gtk_widget_get_visible (range))
{
- GtkAdjustment *adj = gtk_range_get_adjustment (GTK_RANGE (range));
+ GtkAdjustment *adjustment = gtk_range_get_adjustment (GTK_RANGE (range));
gdouble delta;
delta = _gtk_range_get_wheel_delta (GTK_RANGE (range), event->direction);
- gtk_adjustment_set_value (adj, adj->value + delta);
+ gtk_adjustment_set_value (adjustment, gtk_adjustment_get_value (adjustment) + delta);
return TRUE;
}
@@ -1915,8 +1915,8 @@ gtk_scrolled_window_adjustment_changed (GtkAdjustment *adjustment,
gboolean visible;
visible = priv->hscrollbar_visible;
- priv->hscrollbar_visible = (adjustment->upper - adjustment->lower >
- adjustment->page_size);
+ priv->hscrollbar_visible = (gtk_adjustment_get_upper (adjustment) - gtk_adjustment_get_lower (adjustment) >
+ gtk_adjustment_get_page_size (adjustment));
if (priv->hscrollbar_visible != visible)
gtk_widget_queue_resize (GTK_WIDGET (scrolled_window));
@@ -1930,8 +1930,8 @@ gtk_scrolled_window_adjustment_changed (GtkAdjustment *adjustment,
gboolean visible;
visible = priv->vscrollbar_visible;
- priv->vscrollbar_visible = (adjustment->upper - adjustment->lower >
- adjustment->page_size);
+ priv->vscrollbar_visible = (gtk_adjustment_get_upper (adjustment) - gtk_adjustment_get_lower (adjustment) >
+ gtk_adjustment_get_page_size (adjustment));
if (priv->vscrollbar_visible != visible)
gtk_widget_queue_resize (GTK_WIDGET (scrolled_window));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]