[gtk+] gail: Update adjustment usage for sealing



commit a28be2cc6caff82b8b55694bd045cc3786079ef5
Author: Benjamin Otte <otte redhat com>
Date:   Wed Jan 5 22:12:58 2011 +0100

    gail: Update adjustment usage for sealing

 modules/other/gail/gailadjustment.c |   26 +++++++++++++-------------
 modules/other/gail/gailwidget.c     |    4 ++--
 2 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/modules/other/gail/gailadjustment.c b/modules/other/gail/gailadjustment.c
index 0a5a9c0..58e19ea 100644
--- a/modules/other/gail/gailadjustment.c
+++ b/modules/other/gail/gailadjustment.c
@@ -118,7 +118,7 @@ gail_adjustment_get_current_value (AtkValue             *obj,
     return;
   }
 
-  current_value = adjustment->value;
+  current_value = gtk_adjustment_get_value (adjustment);
   memset (value,  0, sizeof (GValue));
   g_value_init (value, G_TYPE_DOUBLE);
   g_value_set_double (value,current_value);
@@ -138,7 +138,7 @@ gail_adjustment_get_maximum_value (AtkValue             *obj,
     return;
   }
 
-  maximum_value = adjustment->upper;
+  maximum_value = gtk_adjustment_get_upper (adjustment);
   memset (value,  0, sizeof (GValue));
   g_value_init (value, G_TYPE_DOUBLE);
   g_value_set_double (value, maximum_value);
@@ -158,7 +158,7 @@ gail_adjustment_get_minimum_value (AtkValue             *obj,
     return;
   }
 
-  minimum_value = adjustment->lower;
+  minimum_value = gtk_adjustment_get_lower (adjustment);
   memset (value,  0, sizeof (GValue));
   g_value_init (value, G_TYPE_DOUBLE);
   g_value_set_double (value, minimum_value);
@@ -178,26 +178,26 @@ gail_adjustment_get_minimum_increment (AtkValue        *obj,
     return;
   }
 
-  if (adjustment->step_increment != 0 &&
-      adjustment->page_increment != 0)
+  if (gtk_adjustment_get_step_increment (adjustment) != 0 &&
+      gtk_adjustment_get_page_increment (adjustment) != 0)
     {
-      if (ABS (adjustment->step_increment) < ABS (adjustment->page_increment))
-        minimum_increment = adjustment->step_increment;
+      if (ABS (gtk_adjustment_get_step_increment (adjustment)) < ABS (gtk_adjustment_get_page_increment (adjustment)))
+        minimum_increment = gtk_adjustment_get_step_increment (adjustment);
       else
-        minimum_increment = adjustment->page_increment;
+        minimum_increment = gtk_adjustment_get_page_increment (adjustment);
     }
-  else if (adjustment->step_increment == 0 &&
-           adjustment->page_increment == 0)
+  else if (gtk_adjustment_get_step_increment (adjustment) == 0 &&
+           gtk_adjustment_get_page_increment (adjustment) == 0)
     {
       minimum_increment = 0;
     }
-  else if (adjustment->step_increment == 0)
+  else if (gtk_adjustment_get_step_increment (adjustment) == 0)
     {
-      minimum_increment = adjustment->page_increment;
+      minimum_increment = gtk_adjustment_get_page_increment (adjustment);
     }
   else
     {
-      minimum_increment = adjustment->step_increment;
+      minimum_increment = gtk_adjustment_get_step_increment (adjustment);
     }
 
   memset (value,  0, sizeof (GValue));
diff --git a/modules/other/gail/gailwidget.c b/modules/other/gail/gailwidget.c
index 922673d..c9ce43d 100644
--- a/modules/other/gail/gailwidget.c
+++ b/modules/other/gail/gailwidget.c
@@ -1061,9 +1061,9 @@ static gboolean gail_widget_on_screen (GtkWidget *widget)
       gtk_widget_get_allocation (viewport, &viewport_allocation);
 
       adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (viewport));
-      visible_rect.y = adjustment->value;
+      visible_rect.y = gtk_adjustment_get_value (adjustment);
       adjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (viewport));
-      visible_rect.x = adjustment->value;
+      visible_rect.x = gtk_adjustment_get_value (adjustment);
       visible_rect.width = viewport_allocation.width;
       visible_rect.height = viewport_allocation.height;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]