[gtk+] Gail: use accessor functions to access GtkScrolledWindow



commit 8da741f955b27722675518511ddf0f78383dc60d
Author: Javier Jardón <jjardon gnome org>
Date:   Tue Aug 31 01:33:15 2010 +0200

    Gail: use accessor functions to access GtkScrolledWindow

 modules/other/gail/gailscrollbar.c      |    6 +++---
 modules/other/gail/gailscrolledwindow.c |   18 +++++++++---------
 2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/modules/other/gail/gailscrollbar.c b/modules/other/gail/gailscrollbar.c
index d6ddb45..7bdae98 100644
--- a/modules/other/gail/gailscrollbar.c
+++ b/modules/other/gail/gailscrollbar.c
@@ -85,18 +85,18 @@ gail_scrollbar_get_index_in_parent (AtkObject *accessible)
 
   if (GTK_IS_HSCROLLBAR (widget))
   {
-    if (!scrolled_window->hscrollbar_visible) 
+    if (!gtk_scrolled_window_get_hscrollbar (scrolled_window))
     {
       n_children = -1;
     }
   }
   else if (GTK_IS_VSCROLLBAR (widget))
   {
-    if (!scrolled_window->vscrollbar_visible) 
+    if (!gtk_scrolled_window_get_vscrollbar (scrolled_window))
     {
       n_children = -1;
     }
-    else if (scrolled_window->hscrollbar_visible) 
+    else if (gtk_scrolled_window_get_hscrollbar (scrolled_window))
     {
       n_children++;
     }
diff --git a/modules/other/gail/gailscrolledwindow.c b/modules/other/gail/gailscrolledwindow.c
index 15706cf..e176de5 100644
--- a/modules/other/gail/gailscrolledwindow.c
+++ b/modules/other/gail/gailscrolledwindow.c
@@ -98,9 +98,9 @@ gail_scrolled_window_get_n_children (AtkObject *object)
   
   /* Add one to the count for each visible scrollbar */
 
-  if (gtk_window->hscrollbar_visible)
+  if (gtk_scrolled_window_get_hscrollbar (gtk_window))
     n_children++;
-  if (gtk_window->vscrollbar_visible)
+  if (gtk_scrolled_window_get_vscrollbar (gtk_window))
     n_children++;
   return n_children;
 }
@@ -132,14 +132,14 @@ gail_scrolled_window_ref_child (AtkObject *obj,
 
   if (child == n_children)
     {
-      if (gtk_window->hscrollbar_visible)
+      if (gtk_scrolled_window_get_hscrollbar (gtk_window))
         accessible = gtk_widget_get_accessible (hscrollbar);
-      else if (gtk_window->vscrollbar_visible)
+      else if (gtk_scrolled_window_get_vscrollbar (gtk_window))
         accessible = gtk_widget_get_accessible (vscrollbar);
     }
   else if (child == n_children+1 && 
-           gtk_window->hscrollbar_visible &&
-           gtk_window->vscrollbar_visible)
+           gtk_scrolled_window_get_hscrollbar (gtk_window) &&
+           gtk_scrolled_window_get_vscrollbar (gtk_window))
     accessible = gtk_widget_get_accessible (vscrollbar);
   else if (child < n_children)
     {
@@ -184,18 +184,18 @@ gail_scrolled_window_scrollbar_visibility_changed (GObject    *object,
 
       if ((gpointer) object == (gpointer) (hscrollbar))
         {
-          if (gtk_window->hscrollbar_visible)
+          if (gtk_scrolled_window_get_hscrollbar (gtk_window))
             child_added = TRUE;
 
           child = gtk_widget_get_accessible (hscrollbar);
         }
       else if ((gpointer) object == (gpointer) (vscrollbar))
         {
-          if (gtk_window->vscrollbar_visible)
+          if (gtk_scrolled_window_get_vscrollbar (gtk_window))
             child_added = TRUE;
 
           child = gtk_widget_get_accessible (vscrollbar);
-          if (gtk_window->hscrollbar_visible)
+          if (gtk_scrolled_window_get_hscrollbar (gtk_window))
             index = n_children+1;
         }
       else 



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