[gtk+/refactor: 5/106] Use accessor functions to access GtkAccesible variables



commit 5ee19bdafe57d070b9d4a26a6caf8c0e8fea9225
Author: Javier Jardón <jjardon gnome org>
Date:   Sun May 23 01:55:33 2010 +0200

    Use accessor functions to access GtkAccesible variables

 gtk/gtkassistant.c                        |    4 +-
 gtk/gtkiconview.c                         |   31 ++++++-----
 gtk/gtkspinner.c                          |    2 +-
 modules/other/gail/gailbox.c              |    2 +-
 modules/other/gail/gailbutton.c           |   65 ++++++++++++-----------
 modules/other/gail/gailcheckmenuitem.c    |    2 +-
 modules/other/gail/gailchecksubmenuitem.c |    2 +-
 modules/other/gail/gailcombobox.c         |   37 ++++++++------
 modules/other/gail/gailcontainer.c        |    5 +-
 modules/other/gail/gailentry.c            |   65 +++++++++++------------
 modules/other/gail/gailexpander.c         |   36 +++++++-------
 modules/other/gail/gailframe.c            |    2 +-
 modules/other/gail/gailimage.c            |    4 +-
 modules/other/gail/gailitem.c             |   24 ++++----
 modules/other/gail/gaillabel.c            |   40 +++++++-------
 modules/other/gail/gailmenu.c             |    4 +-
 modules/other/gail/gailmenuitem.c         |   27 ++++------
 modules/other/gail/gailmenushell.c        |   12 ++--
 modules/other/gail/gailnotebook.c         |   12 ++--
 modules/other/gail/gailpaned.c            |   10 ++--
 modules/other/gail/gailradiobutton.c      |    2 +-
 modules/other/gail/gailradiomenuitem.c    |    2 +-
 modules/other/gail/gailradiosubmenuitem.c |    2 +-
 modules/other/gail/gailrange.c            |   13 ++---
 modules/other/gail/gailscale.c            |   22 ++++----
 modules/other/gail/gailscalebutton.c      |   12 ++--
 modules/other/gail/gailscrollbar.c        |    2 +-
 modules/other/gail/gailscrolledwindow.c   |    6 +-
 modules/other/gail/gailseparator.c        |    2 +-
 modules/other/gail/gailstatusbar.c        |   26 +++++-----
 modules/other/gail/gailsubmenuitem.c      |   12 ++--
 modules/other/gail/gailtextcell.c         |    8 ++--
 modules/other/gail/gailtextview.c         |   52 +++++++++---------
 modules/other/gail/gailtogglebutton.c     |    2 +-
 modules/other/gail/gailtreeview.c         |   79 +++++++++++++++--------------
 modules/other/gail/gailutil.c             |    4 +-
 modules/other/gail/gailwidget.c           |   44 ++++++++--------
 modules/other/gail/gailwindow.c           |   20 ++++----
 modules/other/gail/tests/ferret.c         |   14 +++--
 modules/other/gail/tests/testaction.c     |    2 +-
 modules/other/gail/tests/testbutton.c     |    2 +-
 modules/other/gail/tests/testcombo.c      |    2 +-
 modules/other/gail/tests/testlib.c        |    6 +-
 modules/other/gail/tests/testmenuitem.c   |    6 ++-
 modules/other/gail/tests/testnotebook.c   |    9 ++--
 modules/other/gail/tests/testobject.c     |    4 +-
 modules/other/gail/tests/testpaned.c      |    2 +-
 modules/other/gail/tests/testselection.c  |    2 +-
 modules/other/gail/tests/testtext.c       |    5 +-
 49 files changed, 380 insertions(+), 370 deletions(-)
---
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index 164f326..f4226f5 100644
--- a/gtk/gtkassistant.c
+++ b/gtk/gtkassistant.c
@@ -2322,7 +2322,7 @@ gtk_assistant_accessible_get_n_children (AtkObject *accessible)
   GtkAssistant *assistant;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
 
   if (!widget)
     return 0;
@@ -2344,7 +2344,7 @@ gtk_assistant_accessible_ref_child (AtkObject *accessible,
   AtkObject *obj;
   const gchar *title;
 
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
   if (!widget)
     return NULL;
 
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index cf6acff..90833b0 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -8968,7 +8968,7 @@ gtk_icon_view_accessible_get_n_children (AtkObject *accessible)
   GtkIconView *icon_view;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
   if (!widget)
       return 0;
 
@@ -9008,7 +9008,7 @@ gtk_icon_view_accessible_ref_child (AtkObject *accessible,
   AtkObject *obj;
   GtkIconViewItemAccessible *a11y_item;
 
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
   if (!widget)
     return NULL;
 
@@ -9066,7 +9066,7 @@ gtk_icon_view_accessible_traverse_items (GtkIconViewAccessible *view,
       GtkWidget *widget;
       gboolean act_on_item;
 
-      widget = GTK_ACCESSIBLE (view)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (view));
       if (widget == NULL)
         return;
 
@@ -9188,7 +9188,7 @@ gtk_icon_view_accessible_model_row_changed (GtkTreeModel *tree_model,
 
   if (a11y_item)
     {
-      widget = GTK_ACCESSIBLE (atk_obj)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_obj));
       icon_view = GTK_ICON_VIEW (widget);
       item = a11y_item->item;
 
@@ -9547,9 +9547,12 @@ gtk_icon_view_accessible_destroyed (GtkWidget *widget,
 static void
 gtk_icon_view_accessible_connect_widget_destroyed (GtkAccessible *accessible)
 {
-  if (accessible->widget)
+  GtkWidget *widget;
+
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+  if (widget)
     {
-      g_signal_connect_after (accessible->widget,
+      g_signal_connect_after (widget,
                               "destroy",
                               G_CALLBACK (gtk_icon_view_accessible_destroyed),
                               accessible);
@@ -9590,7 +9593,7 @@ gtk_icon_view_accessible_ref_accessible_at_point (AtkComponent *component,
   GtkIconViewItem *item;
   gint x_pos, y_pos;
 
-  widget = GTK_ACCESSIBLE (component)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
   if (widget == NULL)
   /* State is defunct */
     return NULL;
@@ -9618,7 +9621,7 @@ gtk_icon_view_accessible_add_selection (AtkSelection *selection,
   GtkIconView *icon_view;
   GtkIconViewItem *item;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     return FALSE;
 
@@ -9640,7 +9643,7 @@ gtk_icon_view_accessible_clear_selection (AtkSelection *selection)
   GtkWidget *widget;
   GtkIconView *icon_view;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     return FALSE;
 
@@ -9659,7 +9662,7 @@ gtk_icon_view_accessible_ref_selection (AtkSelection *selection,
   GtkIconView *icon_view;
   GtkIconViewItem *item;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     return NULL;
 
@@ -9691,7 +9694,7 @@ gtk_icon_view_accessible_get_selection_count (AtkSelection *selection)
   GList *l;
   gint count;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     return 0;
 
@@ -9720,7 +9723,7 @@ gtk_icon_view_accessible_is_child_selected (AtkSelection *selection,
   GtkIconView *icon_view;
   GtkIconViewItem *item;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     return FALSE;
 
@@ -9743,7 +9746,7 @@ gtk_icon_view_accessible_remove_selection (AtkSelection *selection,
   GList *l;
   gint count;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     return FALSE;
 
@@ -9774,7 +9777,7 @@ gtk_icon_view_accessible_select_all_selection (AtkSelection *selection)
   GtkWidget *widget;
   GtkIconView *icon_view;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     return FALSE;
 
diff --git a/gtk/gtkspinner.c b/gtk/gtkspinner.c
index b17c0ea..f3fbfff 100644
--- a/gtk/gtkspinner.c
+++ b/gtk/gtkspinner.c
@@ -475,7 +475,7 @@ gtk_spinner_accessible_image_get_size (AtkImage *image,
 {
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (image)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (image));
   if (!widget)
     {
       *width = *height = 0;
diff --git a/modules/other/gail/gailbox.c b/modules/other/gail/gailbox.c
index 779b44d..c4a045b 100644
--- a/modules/other/gail/gailbox.c
+++ b/modules/other/gail/gailbox.c
@@ -60,7 +60,7 @@ gail_box_ref_state_set (AtkObject *accessible)
   GtkWidget *widget;
 
   state_set = ATK_OBJECT_CLASS (gail_box_parent_class)->ref_state_set (accessible);
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
 
   if (widget == NULL)
     return state_set;
diff --git a/modules/other/gail/gailbutton.c b/modules/other/gail/gailbutton.c
index 33bdaea..8b0a05e 100644
--- a/modules/other/gail/gailbutton.c
+++ b/modules/other/gail/gailbutton.c
@@ -198,7 +198,7 @@ gail_button_get_name (AtkObject *obj)
       GtkWidget *widget;
       GtkWidget *child;
 
-      widget = GTK_ACCESSIBLE (obj)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
       if (widget == NULL)
         /*
          * State is defunct
@@ -459,7 +459,7 @@ gail_button_do_action (AtkAction *action,
   GailButton *button;
   gboolean return_value = TRUE;
 
-  widget = GTK_ACCESSIBLE (action)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (action));
   if (widget == NULL)
     /*
      * State is defunct
@@ -501,7 +501,7 @@ idle_do_action (gpointer data)
 
   gail_button = GAIL_BUTTON (data);
   gail_button->action_idle_handler = 0;
-  widget = GTK_ACCESSIBLE (gail_button)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (gail_button));
   tmp_event.button.type = GDK_BUTTON_RELEASE;
   tmp_event.button.window = widget->window;
   tmp_event.button.button = 1;
@@ -652,7 +652,7 @@ gail_button_get_keybinding (AtkAction *action,
         GtkWidget *label;
         guint key_val; 
 
-        widget = GTK_ACCESSIBLE (button)->widget;
+        widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (button));
         if (widget == NULL)
           /*
            * State is defunct
@@ -685,10 +685,7 @@ gail_button_get_keybinding (AtkAction *action,
                     target = atk_relation_get_target (relation);
             
                     target_object = g_ptr_array_index (target, 0);
-                    if (GTK_IS_ACCESSIBLE (target_object))
-                      {
-                        label = GTK_ACCESSIBLE (target_object)->widget;
-                      } 
+                    label = gtk_accessible_get_widget (GTK_ACCESSIBLE (target_object));
                   }
                 g_object_unref (set);
               }
@@ -809,7 +806,7 @@ gail_button_get_n_children (AtkObject* obj)
 
   g_return_val_if_fail (GAIL_IS_BUTTON (obj), 0);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /*
      * State is defunct
@@ -840,7 +837,7 @@ gail_button_ref_child (AtkObject *obj,
 
   g_return_val_if_fail (GAIL_IS_BUTTON (obj), NULL);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /*
      * State is defunct
@@ -883,7 +880,7 @@ gail_button_ref_state_set (AtkObject *obj)
   GtkWidget *widget;
 
   state_set = ATK_OBJECT_CLASS (gail_button_parent_class)->ref_state_set (obj);
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
 
   if (widget == NULL)
     return state_set;
@@ -980,8 +977,7 @@ gail_button_get_image_description (AtkImage *image) {
   GtkImage  *button_image;
   AtkObject *obj;
 
-  widget = GTK_ACCESSIBLE (image)->widget;
-
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (image));
   if (widget == NULL)
     /*
      * State is defunct
@@ -1009,7 +1005,7 @@ gail_button_get_image_position (AtkImage     *image,
   GtkImage  *button_image;
   AtkObject *obj;
 
-  widget = GTK_ACCESSIBLE (image)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (image));
 
   if (widget == NULL)
     {
@@ -1044,7 +1040,7 @@ gail_button_get_image_size (AtkImage *image,
   GtkImage  *button_image;
   AtkObject *obj;
 
-  widget = GTK_ACCESSIBLE (image)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (image));
 
   if (widget == NULL)
     {
@@ -1078,7 +1074,7 @@ gail_button_set_image_description (AtkImage    *image,
   GtkImage  *button_image;
   AtkObject *obj;
 
-  widget = GTK_ACCESSIBLE (image)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (image));
 
   if (widget == NULL)
     /*
@@ -1124,7 +1120,8 @@ gail_button_get_text (AtkText *text,
   GailButton *button;
   const gchar *label_text;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
+
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -1159,9 +1156,9 @@ gail_button_get_text_before_offset (AtkText         *text,
   GtkWidget *widget;
   GtkWidget *label;
   GailButton *button;
-  
-  widget = GTK_ACCESSIBLE (text)->widget;
-  
+
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
+
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -1191,9 +1188,9 @@ gail_button_get_text_at_offset (AtkText         *text,
   GtkWidget *widget;
   GtkWidget *label;
   GailButton *button;
+
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
  
-  widget = GTK_ACCESSIBLE (text)->widget;
-  
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -1224,8 +1221,8 @@ gail_button_get_text_after_offset (AtkText         *text,
   GtkWidget *label;
   GailButton *button;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
-  
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
+
   if (widget == NULL)
   {
     /* State is defunct */
@@ -1253,7 +1250,8 @@ gail_button_get_character_count (AtkText *text)
   GtkWidget *widget;
   GtkWidget *label;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
+
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -1280,8 +1278,8 @@ gail_button_get_character_extents (AtkText      *text,
   PangoRectangle char_rect;
   gint index, x_layout, y_layout;
   const gchar *label_text;
- 
-  widget = GTK_ACCESSIBLE (text)->widget;
+
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
 
   if (widget == NULL)
     /* State is defunct */
@@ -1312,10 +1310,12 @@ gail_button_get_offset_at_point (AtkText      *text,
   gint index, x_layout, y_layout;
   const gchar *label_text;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
+
   if (widget == NULL)
     /* State is defunct */
     return -1;
+
   label = get_label_from_button (widget, 0, FALSE);
 
   if (!GTK_IS_LABEL(label))
@@ -1350,7 +1350,8 @@ gail_button_get_run_attributes (AtkText        *text,
   GtkJustification justify;
   GtkTextDirection dir;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
+
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -1392,7 +1393,8 @@ gail_button_get_default_attributes (AtkText        *text)
   GtkWidget *label;
   AtkAttributeSet *at_set = NULL;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
+
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -1417,7 +1419,8 @@ gail_button_get_character_at_offset (AtkText	         *text,
   const gchar *string;
   gchar *index;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
+
   if (widget == NULL)
     /* State is defunct */
     return '\0';
diff --git a/modules/other/gail/gailcheckmenuitem.c b/modules/other/gail/gailcheckmenuitem.c
index e203e18..9ee53ea 100644
--- a/modules/other/gail/gailcheckmenuitem.c
+++ b/modules/other/gail/gailcheckmenuitem.c
@@ -111,7 +111,7 @@ gail_check_menu_item_ref_state_set (AtkObject *accessible)
   GtkWidget *widget;
 
   state_set = ATK_OBJECT_CLASS (gail_check_menu_item_parent_class)->ref_state_set (accessible);
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
  
   if (widget == NULL)
     return state_set;
diff --git a/modules/other/gail/gailchecksubmenuitem.c b/modules/other/gail/gailchecksubmenuitem.c
index d643268..f5b7a8d 100644
--- a/modules/other/gail/gailchecksubmenuitem.c
+++ b/modules/other/gail/gailchecksubmenuitem.c
@@ -108,7 +108,7 @@ gail_check_sub_menu_item_ref_state_set (AtkObject *accessible)
   GtkWidget *widget;
 
   state_set = ATK_OBJECT_CLASS (gail_check_sub_menu_item_parent_class)->ref_state_set (accessible);
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
  
   if (widget == NULL)
     return state_set;
diff --git a/modules/other/gail/gailcombobox.c b/modules/other/gail/gailcombobox.c
index f7dc403..a392b76 100644
--- a/modules/other/gail/gailcombobox.c
+++ b/modules/other/gail/gailcombobox.c
@@ -161,7 +161,7 @@ gail_combo_box_get_name (AtkObject *obj)
   if (name)
     return name;
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /*
      * State is defunct
@@ -206,7 +206,8 @@ gail_combo_box_get_n_children (AtkObject* obj)
 
   g_return_val_if_fail (GAIL_IS_COMBO_BOX (obj), 0);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
+
   if (widget == NULL)
     /*
      * State is defunct
@@ -230,7 +231,7 @@ gail_combo_box_ref_child (AtkObject *obj,
 
   g_return_val_if_fail (GAIL_IS_COMBO_BOX (obj), NULL);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
 
   if (widget == NULL)
     /*
@@ -277,7 +278,8 @@ gail_combo_box_do_action (AtkAction *action,
   GailComboBox *combo_box;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (action)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (action));
+
   if (widget == NULL)
     /*
      * State is defunct
@@ -311,7 +313,8 @@ idle_do_action (gpointer data)
 
   gail_combo_box = GAIL_COMBO_BOX (data);
   gail_combo_box->action_idle_handler = 0;
-  widget = GTK_ACCESSIBLE (gail_combo_box)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (gail_combo_box));
+
   if (widget == NULL || /* State is defunct */
       !gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
     return FALSE;
@@ -319,7 +322,7 @@ idle_do_action (gpointer data)
   combo_box = GTK_COMBO_BOX (widget);
 
   popup = gtk_combo_box_get_popup_accessible (combo_box);
-  do_popup = !gtk_widget_get_mapped (GTK_ACCESSIBLE (popup)->widget);
+  do_popup = !gtk_widget_get_mapped (gtk_accessible_get_widget (GTK_ACCESSIBLE (popup)));
   if (do_popup)
       gtk_combo_box_popup (combo_box);
   else
@@ -371,7 +374,7 @@ gail_combo_box_get_keybinding (AtkAction *action,
 	  guint key_val;
 
 	  combo_box = GAIL_COMBO_BOX (action);
-	  widget = GTK_ACCESSIBLE (combo_box)->widget;
+          widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (combo_box));
 	  if (widget == NULL)
              return NULL;
 	  set = atk_object_ref_relation_set (ATK_OBJECT (action));
@@ -383,10 +386,7 @@ gail_combo_box_get_keybinding (AtkAction *action,
 	  {
 	     target = atk_relation_get_target (relation);
 	     target_object = g_ptr_array_index (target, 0);
-	     if (GTK_IS_ACCESSIBLE (target_object))
-	     {
-	        label = GTK_ACCESSIBLE (target_object)->widget;
-	     }
+             widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (target_object));
 	  }
 	  g_object_unref (set);
 	  if (GTK_IS_LABEL (label))
@@ -456,7 +456,8 @@ gail_combo_box_add_selection (AtkSelection *selection,
   GtkComboBox *combo_box;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
+
   if (widget == NULL)
     /*
      * State is defunct
@@ -475,7 +476,8 @@ gail_combo_box_clear_selection (AtkSelection *selection)
   GtkComboBox *combo_box;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
+
   if (widget == NULL)
     /*
      * State is defunct
@@ -497,7 +499,8 @@ gail_combo_box_ref_selection (AtkSelection *selection,
   AtkObject *obj;
   gint index;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
+
   if (widget == NULL)
     /*
      * State is defunct
@@ -523,7 +526,8 @@ gail_combo_box_get_selection_count (AtkSelection *selection)
   GtkComboBox *combo_box;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
+
   if (widget == NULL)
     /*
      * State is defunct
@@ -543,7 +547,8 @@ gail_combo_box_is_child_selected (AtkSelection *selection,
   gint j;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
+
   if (widget == NULL)
     /*
      * State is defunct
diff --git a/modules/other/gail/gailcontainer.c b/modules/other/gail/gailcontainer.c
index 2c64b37..8cb314a 100644
--- a/modules/other/gail/gailcontainer.c
+++ b/modules/other/gail/gailcontainer.c
@@ -79,7 +79,7 @@ gail_container_get_n_children (AtkObject* obj)
 
   g_return_val_if_fail (GAIL_IS_CONTAINER (obj), count);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     return 0;
 
@@ -100,7 +100,8 @@ gail_container_ref_child (AtkObject *obj,
 
   g_return_val_if_fail (GAIL_IS_CONTAINER (obj), NULL);
   g_return_val_if_fail ((i >= 0), NULL);
-  widget = GTK_ACCESSIBLE (obj)->widget;
+
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     return NULL;
 
diff --git a/modules/other/gail/gailentry.c b/modules/other/gail/gailentry.c
index 33009ea..5dd5ae6 100644
--- a/modules/other/gail/gailentry.c
+++ b/modules/other/gail/gailentry.c
@@ -377,8 +377,8 @@ gail_entry_ref_state_set (AtkObject *accessible)
   GtkWidget *widget;
 
   state_set = ATK_OBJECT_CLASS (gail_entry_parent_class)->ref_state_set (accessible);
-  widget = GTK_ACCESSIBLE (accessible)->widget;
-  
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+
   if (widget == NULL)
     return state_set;
 
@@ -423,7 +423,7 @@ gail_entry_get_text (AtkText *text,
 {
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -441,7 +441,7 @@ gail_entry_get_text_before_offset (AtkText	    *text,
   GtkWidget *widget;
   GtkEntry *entry;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -464,7 +464,7 @@ gail_entry_get_text_at_offset (AtkText          *text,
   GtkWidget *widget;
   GtkEntry *entry;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -487,7 +487,7 @@ gail_entry_get_text_after_offset  (AtkText	    *text,
   GtkWidget *widget;
   GtkEntry *entry;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -506,7 +506,7 @@ gail_entry_get_character_count (AtkText *text)
   GtkEntry *entry;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -521,7 +521,7 @@ gail_entry_get_caret_offset (AtkText *text)
   GtkEntry *entry;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -537,7 +537,7 @@ gail_entry_set_caret_offset (AtkText *text, gint offset)
   GtkEntry *entry;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -559,7 +559,7 @@ gail_entry_get_run_attributes (AtkText *text,
   AtkAttributeSet *at_set = NULL;
   GtkTextDirection dir;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -590,7 +590,7 @@ gail_entry_get_default_attributes (AtkText *text)
   GtkEntry *entry;
   AtkAttributeSet *at_set = NULL;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -618,7 +618,7 @@ gail_entry_get_character_extents (AtkText *text,
   gint index, cursor_index, x_layout, y_layout;
   const gchar *entry_text;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -647,8 +647,8 @@ gail_entry_get_offset_at_point (AtkText *text,
   GtkEntry *entry;
   gint index, cursor_index, x_layout, y_layout;
   const gchar *entry_text;
-  
-  widget = GTK_ACCESSIBLE (text)->widget;
+
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return -1;
@@ -688,7 +688,7 @@ gail_entry_get_n_selections (AtkText              *text)
   GtkWidget *widget;
   gint select_start, select_end;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return -1;
@@ -713,7 +713,7 @@ gail_entry_get_selection (AtkText *text,
   GtkEntry *entry;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -742,7 +742,7 @@ gail_entry_add_selection (AtkText *text,
   GtkWidget *widget;
   gint select_start, select_end;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -772,7 +772,7 @@ gail_entry_remove_selection (AtkText *text,
   GtkWidget *widget;
   gint select_start, select_end, caret_pos;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -807,7 +807,7 @@ gail_entry_set_selection (AtkText *text,
   GtkWidget *widget;
   gint select_start, select_end;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -852,7 +852,7 @@ gail_entry_set_text_contents (AtkEditableText *text,
   GtkWidget *widget;
   GtkEditable *editable;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -875,7 +875,7 @@ gail_entry_insert_text (AtkEditableText *text,
   GtkWidget *widget;
   GtkEditable *editable;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -900,7 +900,7 @@ gail_entry_copy_text   (AtkEditableText *text,
   gchar *str;
   GtkClipboard *clipboard;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -924,7 +924,7 @@ gail_entry_cut_text (AtkEditableText *text,
   gchar *str;
   GtkClipboard *clipboard;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -949,7 +949,7 @@ gail_entry_delete_text (AtkEditableText *text,
   GtkWidget *widget;
   GtkEditable *editable;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -971,7 +971,7 @@ gail_entry_paste_text (AtkEditableText *text,
   GailEntryPaste paste_struct;
   GtkClipboard *clipboard;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -1022,7 +1022,7 @@ gail_entry_notify_insert (GailEntry *entry)
 {
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (entry)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (entry));
   if (gtk_entry_get_text_length (GTK_ENTRY (widget)) == 0)
     return;
 
@@ -1078,7 +1078,7 @@ gail_entry_get_character_at_offset (AtkText *text,
   gchar *index;
   gunichar unichar;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return '\0';
@@ -1204,7 +1204,7 @@ gail_entry_do_action (AtkAction *action,
   gboolean return_value = TRUE;
 
   entry = GAIL_ENTRY (action);
-  widget = GTK_ACCESSIBLE (action)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (action));
   if (widget == NULL)
     /*
      * State is defunct
@@ -1237,7 +1237,7 @@ idle_do_action (gpointer data)
 
   entry = GAIL_ENTRY (data);
   entry->action_idle_handler = 0;
-  widget = GTK_ACCESSIBLE (entry)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (entry));
   if (widget == NULL /* State is defunct */ ||
       !gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
     return FALSE;
@@ -1297,7 +1297,7 @@ gail_entry_get_keybinding (AtkAction *action,
         guint key_val; 
 
         entry = GAIL_ENTRY (action);
-        widget = GTK_ACCESSIBLE (entry)->widget;
+        widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (entry));
         if (widget == NULL)
           /*
            * State is defunct
@@ -1316,10 +1316,7 @@ gail_entry_get_keybinding (AtkAction *action,
             target = atk_relation_get_target (relation);
           
             target_object = g_ptr_array_index (target, 0);
-            if (GTK_IS_ACCESSIBLE (target_object))
-              {
-                label = GTK_ACCESSIBLE (target_object)->widget;
-              } 
+            label = gtk_accessible_get_widget (GTK_ACCESSIBLE (target_object));
           }
 
         g_object_unref (set);
diff --git a/modules/other/gail/gailexpander.c b/modules/other/gail/gailexpander.c
index 1d46819..369424b 100644
--- a/modules/other/gail/gailexpander.c
+++ b/modules/other/gail/gailexpander.c
@@ -161,7 +161,7 @@ gail_expander_get_name (AtkObject *obj)
        */
       GtkWidget *widget;
 
-      widget = GTK_ACCESSIBLE (obj)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
       if (widget == NULL)
         /*
          * State is defunct
@@ -183,7 +183,7 @@ gail_expander_get_n_children (AtkObject* obj)
 
   g_return_val_if_fail (GAIL_IS_CONTAINER (obj), count);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     return 0;
 
@@ -213,7 +213,8 @@ gail_expander_ref_child (AtkObject *obj,
 
   g_return_val_if_fail (GAIL_IS_CONTAINER (obj), NULL);
   g_return_val_if_fail ((i >= 0), NULL);
-  widget = GTK_ACCESSIBLE (obj)->widget;
+
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     return NULL;
 
@@ -367,7 +368,7 @@ gail_expander_do_action (AtkAction *action,
   GailExpander *expander;
   gboolean return_value = TRUE;
 
-  widget = GTK_ACCESSIBLE (action)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (action));
   if (widget == NULL)
     /*
      * State is defunct
@@ -402,7 +403,7 @@ idle_do_action (gpointer data)
   gail_expander = GAIL_EXPANDER (data);
   gail_expander->action_idle_handler = 0;
 
-  widget = GTK_ACCESSIBLE (gail_expander)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (gail_expander));
   if (widget == NULL /* State is defunct */ ||
       !gtk_widget_is_sensitive (widget) || !gtk_widget_get_visible (widget))
     return FALSE;
@@ -457,7 +458,7 @@ gail_expander_get_keybinding (AtkAction *action,
         GtkWidget *label;
 
         expander = GAIL_EXPANDER (action);
-        widget = GTK_ACCESSIBLE (expander)->widget;
+        widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (expander));
         if (widget == NULL)
           /*
            * State is defunct
@@ -540,7 +541,7 @@ gail_expander_ref_state_set (AtkObject *obj)
   GtkExpander *expander;
 
   state_set = ATK_OBJECT_CLASS (gail_expander_parent_class)->ref_state_set (obj);
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
 
   if (widget == NULL)
     return state_set;
@@ -583,7 +584,7 @@ gail_expander_get_text (AtkText *text,
   GailExpander *expander;
   const gchar *label_text;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -612,7 +613,7 @@ gail_expander_get_text_before_offset (AtkText         *text,
   GailExpander *expander;
   GtkWidget *label;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -641,7 +642,7 @@ gail_expander_get_text_at_offset (AtkText         *text,
   GailExpander *expander;
   GtkWidget *label;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -670,7 +671,7 @@ gail_expander_get_text_after_offset (AtkText         *text,
   GailExpander *expander;
   GtkWidget *label;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -694,7 +695,7 @@ gail_expander_get_character_count (AtkText *text)
   GtkWidget *widget;
   GtkWidget *label;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -720,9 +721,8 @@ gail_expander_get_character_extents (AtkText      *text,
   PangoRectangle char_rect;
   gint index, x_layout, y_layout;
   const gchar *label_text;
- 
-  widget = GTK_ACCESSIBLE (text)->widget;
 
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -751,7 +751,7 @@ gail_expander_get_offset_at_point (AtkText      *text,
   gint index, x_layout, y_layout;
   const gchar *label_text;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return -1;
@@ -789,7 +789,7 @@ gail_expander_get_run_attributes (AtkText *text,
   GtkJustification justify;
   GtkTextDirection dir;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -831,7 +831,7 @@ gail_expander_get_default_attributes (AtkText *text)
   GtkWidget *label;
   AtkAttributeSet *at_set = NULL;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -856,7 +856,7 @@ gail_expander_get_character_at_offset (AtkText *text,
   const gchar *string;
   gchar *index;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return '\0';
diff --git a/modules/other/gail/gailframe.c b/modules/other/gail/gailframe.c
index f779142..bdbf421 100644
--- a/modules/other/gail/gailframe.c
+++ b/modules/other/gail/gailframe.c
@@ -72,7 +72,7 @@ gail_frame_get_name (AtkObject *obj)
      */
     GtkWidget *widget;
 
-    widget = GTK_ACCESSIBLE (obj)->widget;
+    widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
     if (widget == NULL)
     {
       /*
diff --git a/modules/other/gail/gailimage.c b/modules/other/gail/gailimage.c
index 6dd1e02..6a3ea1a 100644
--- a/modules/other/gail/gailimage.c
+++ b/modules/other/gail/gailimage.c
@@ -131,7 +131,7 @@ gail_image_get_name (AtkObject *accessible)
   if (name)
     return name;
 
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
   /*
    * State is defunct
    */
@@ -191,7 +191,7 @@ gail_image_get_image_size (AtkImage *image,
   GtkImage *gtk_image;
   GtkImageType image_type;
 
-  widget = GTK_ACCESSIBLE (image)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (image));
   if (widget == 0)
   {
     /* State is defunct */
diff --git a/modules/other/gail/gailitem.c b/modules/other/gail/gailitem.c
index 531710a..341ccb8 100644
--- a/modules/other/gail/gailitem.c
+++ b/modules/other/gail/gailitem.c
@@ -205,7 +205,7 @@ gail_item_get_name (AtkObject *obj)
       GtkWidget *widget;
       GtkWidget *label;
 
-      widget = GTK_ACCESSIBLE (obj)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
       if (widget == NULL)
         /*
          * State is defunct
@@ -244,7 +244,7 @@ gail_item_get_name (AtkObject *obj)
               parent_obj = atk_object_get_parent (gtk_widget_get_accessible (parent));
               if (GTK_IS_ACCESSIBLE (parent_obj))
                 {
-                  parent = GTK_ACCESSIBLE (parent_obj)->widget;
+                  parent = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent_obj));
                   if (GTK_IS_COMBO_BOX (parent))
                     {
                       GtkTreeModel *model;
@@ -360,7 +360,7 @@ gail_item_get_text (AtkText *text,
   GailItem *item;
   const gchar *label_text;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -396,7 +396,7 @@ gail_item_get_text_before_offset (AtkText         *text,
   GtkWidget *label;
   GailItem *item;
   
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   
   if (widget == NULL)
     /* State is defunct */
@@ -428,7 +428,7 @@ gail_item_get_text_at_offset (AtkText         *text,
   GtkWidget *label;
   GailItem *item;
  
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   
   if (widget == NULL)
     /* State is defunct */
@@ -460,7 +460,7 @@ gail_item_get_text_after_offset (AtkText         *text,
   GtkWidget *label;
   GailItem *item;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   
   if (widget == NULL)
   {
@@ -489,7 +489,7 @@ gail_item_get_character_count (AtkText *text)
   GtkWidget *widget;
   GtkWidget *label;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -517,7 +517,7 @@ gail_item_get_character_extents (AtkText      *text,
   gint index, x_layout, y_layout;
   const gchar *label_text;
  
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
 
   if (widget == NULL)
     /* State is defunct */
@@ -548,7 +548,7 @@ gail_item_get_offset_at_point (AtkText      *text,
   gint index, x_layout, y_layout;
   const gchar *label_text;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return -1;
@@ -587,7 +587,7 @@ gail_item_get_run_attributes (AtkText *text,
   GtkJustification justify;
   GtkTextDirection dir;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -629,7 +629,7 @@ gail_item_get_default_attributes (AtkText *text)
   GtkWidget *label;
   AtkAttributeSet *at_set = NULL;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -654,7 +654,7 @@ gail_item_get_character_at_offset (AtkText *text,
   const gchar *string;
   gchar *index;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return '\0';
diff --git a/modules/other/gail/gaillabel.c b/modules/other/gail/gaillabel.c
index 158a718..217db59 100644
--- a/modules/other/gail/gaillabel.c
+++ b/modules/other/gail/gaillabel.c
@@ -217,7 +217,7 @@ notify_name_change (AtkObject *atk_obj)
   GtkWidget *widget;
   GObject *gail_obj;
 
-  widget = GTK_ACCESSIBLE (atk_obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_obj));
   if (widget == NULL)
     /*
      * State is defunct
@@ -421,7 +421,7 @@ gail_label_ref_state_set (AtkObject *accessible)
   GtkWidget *widget;
 
   state_set = ATK_OBJECT_CLASS (gail_label_parent_class)->ref_state_set (accessible);
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
 
   if (widget == NULL)
     return state_set;
@@ -439,7 +439,7 @@ gail_label_ref_relation_set (AtkObject *obj)
 
   g_return_val_if_fail (GAIL_IS_LABEL (obj), NULL);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /*
      * State is defunct
@@ -546,7 +546,7 @@ gail_label_get_name (AtkObject *accessible)
        */
       GtkWidget *widget;
 
-      widget = GTK_ACCESSIBLE (accessible)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
       if (widget == NULL)
         /*
          * State is defunct
@@ -593,7 +593,7 @@ gail_label_get_text (AtkText *text,
 
   const gchar *label_text;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -623,7 +623,7 @@ gail_label_get_text_before_offset (AtkText         *text,
   GtkWidget *widget;
   GtkLabel *label;
   
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   
   if (widget == NULL)
     /* State is defunct */
@@ -647,7 +647,7 @@ gail_label_get_text_at_offset (AtkText         *text,
   GtkWidget *widget;
   GtkLabel *label;
  
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   
   if (widget == NULL)
     /* State is defunct */
@@ -671,7 +671,7 @@ gail_label_get_text_after_offset (AtkText         *text,
   GtkWidget *widget;
   GtkLabel *label;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   
   if (widget == NULL)
   {
@@ -693,7 +693,7 @@ gail_label_get_character_count (AtkText *text)
   GtkWidget *widget;
   GtkLabel  *label;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -715,7 +715,7 @@ gail_label_set_caret_offset (AtkText *text,
   GtkWidget *widget;
   GtkLabel  *label;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -740,7 +740,7 @@ gail_label_get_n_selections (AtkText *text)
   GtkLabel  *label;
   gint start, end;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -765,7 +765,7 @@ gail_label_get_selection (AtkText *text,
   GtkWidget *widget;
   GtkLabel  *label;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -801,7 +801,7 @@ gail_label_add_selection (AtkText *text,
   GtkLabel  *label;
   gint start, end;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -828,7 +828,7 @@ gail_label_remove_selection (AtkText *text,
   GtkLabel  *label;
   gint start, end;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -860,7 +860,7 @@ gail_label_set_selection (AtkText *text,
   GtkLabel  *label;
   gint start, end;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -897,7 +897,7 @@ gail_label_get_character_extents (AtkText      *text,
   const gchar *label_text;
   gint index, x_layout, y_layout;
  
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
 
   if (widget == NULL)
     /* State is defunct */
@@ -925,7 +925,7 @@ gail_label_get_offset_at_point (AtkText      *text,
   const gchar *label_text;
   gint index, x_layout, y_layout;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return -1;
@@ -960,7 +960,7 @@ gail_label_get_run_attributes (AtkText        *text,
   GtkJustification justify;
   GtkTextDirection dir;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -999,7 +999,7 @@ gail_label_get_default_attributes (AtkText        *text)
   GtkLabel *label;
   AtkAttributeSet *at_set = NULL;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -1021,7 +1021,7 @@ gail_label_get_character_at_offset (AtkText	         *text,
   const gchar *string;
   gchar *index;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return '\0';
diff --git a/modules/other/gail/gailmenu.c b/modules/other/gail/gailmenu.c
index 0c559ef..5cdb1e6 100644
--- a/modules/other/gail/gailmenu.c
+++ b/modules/other/gail/gailmenu.c
@@ -74,7 +74,7 @@ gail_menu_get_parent (AtkObject *accessible)
     {
       GtkWidget *widget, *parent_widget;
 
-      widget = GTK_ACCESSIBLE (accessible)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
       if (widget == NULL)
         {
           /*
@@ -107,7 +107,7 @@ gail_menu_get_index_in_parent (AtkObject *accessible)
 {
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
 
   if (widget == NULL)
     {
diff --git a/modules/other/gail/gailmenuitem.c b/modules/other/gail/gailmenuitem.c
index 3f456b3..6e42968 100644
--- a/modules/other/gail/gailmenuitem.c
+++ b/modules/other/gail/gailmenuitem.c
@@ -187,7 +187,7 @@ gail_menu_item_get_n_children (AtkObject* obj)
 
   g_return_val_if_fail (GAIL_IS_MENU_ITEM (obj), count);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     return count;
 
@@ -214,7 +214,7 @@ gail_menu_item_ref_child (AtkObject *obj,
   g_return_val_if_fail (GAIL_IS_MENU_ITEM (obj), NULL);
   g_return_val_if_fail ((i >= 0), NULL);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     return NULL;
 
@@ -253,7 +253,7 @@ gail_menu_item_ref_state_set (AtkObject *obj)
 
   if (menu_item)
     {
-      if (!GTK_IS_MENU_ITEM (GTK_ACCESSIBLE (menu_item)->widget))
+      if (!GTK_IS_MENU_ITEM (gtk_accessible_get_widget (GTK_ACCESSIBLE (menu_item))))
         return state_set;
 
       parent_state_set = atk_object_ref_state_set (menu_item);
@@ -286,7 +286,7 @@ gail_menu_item_do_action (AtkAction *action,
       GtkWidget *item;
       GailMenuItem *gail_menu_item;
 
-      item = GTK_ACCESSIBLE (action)->widget;
+      item = gtk_accessible_get_widget (GTK_ACCESSIBLE (action));
       if (item == NULL)
         /* State is defunct */
         return FALSE;
@@ -320,16 +320,13 @@ ensure_menus_unposted (GailMenuItem *menu_item)
   parent = atk_object_get_parent (ATK_OBJECT (menu_item));
   while (parent)
     {
-      if (GTK_IS_ACCESSIBLE (parent))
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
+      if (GTK_IS_MENU (widget))
         {
-          widget = GTK_ACCESSIBLE (parent)->widget;
-          if (GTK_IS_MENU (widget))
-            {
-              if (gtk_widget_get_mapped (widget))
-                gtk_menu_shell_cancel (GTK_MENU_SHELL (widget));
+          if (gtk_widget_get_mapped (widget))
+            gtk_menu_shell_cancel (GTK_MENU_SHELL (widget));
 
-              return;
-            }
+          return;
         }
       parent = atk_object_get_parent (parent);
     }
@@ -345,7 +342,7 @@ idle_do_action (gpointer data)
 
   menu_item = GAIL_MENU_ITEM (data);
   menu_item->action_idle_handler = 0;
-  item = GTK_ACCESSIBLE (menu_item)->widget;
+  item = gtk_accessible_get_widget (GTK_ACCESSIBLE (menu_item));
   if (item == NULL /* State is defunct */ ||
       !gtk_widget_get_sensitive (item) || !gtk_widget_get_visible (item))
     return FALSE;
@@ -423,7 +420,7 @@ gail_menu_item_get_keybinding (AtkAction *action,
       GtkWidget *child;
       GtkWidget *parent;
 
-      item = GTK_ACCESSIBLE (action)->widget;
+      item = gtk_accessible_get_widget (GTK_ACCESSIBLE (action));
       if (item == NULL)
         /* State is defunct */
         return NULL;
diff --git a/modules/other/gail/gailmenushell.c b/modules/other/gail/gailmenushell.c
index 8a1b6a1..b31fe5b 100644
--- a/modules/other/gail/gailmenushell.c
+++ b/modules/other/gail/gailmenushell.c
@@ -93,7 +93,7 @@ gail_menu_shell_add_selection (AtkSelection *selection,
   guint length;
   GtkWidget *widget;
 
-  widget =  GTK_ACCESSIBLE (selection)->widget;
+  widget =  gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
   {
     /* State is defunct */
@@ -119,7 +119,7 @@ gail_menu_shell_clear_selection (AtkSelection   *selection)
   GtkMenuShell *shell;
   GtkWidget *widget;
 
-  widget =  GTK_ACCESSIBLE (selection)->widget;
+  widget =  gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
   {
     /* State is defunct */
@@ -143,7 +143,7 @@ gail_menu_shell_ref_selection (AtkSelection   *selection,
   if (i != 0)
     return NULL;
 
-  widget =  GTK_ACCESSIBLE (selection)->widget;
+  widget =  gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
   {
     /* State is defunct */
@@ -170,7 +170,7 @@ gail_menu_shell_get_selection_count (AtkSelection   *selection)
   GtkMenuShell *shell;
   GtkWidget *widget;
 
-  widget =  GTK_ACCESSIBLE (selection)->widget;
+  widget =  gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
   {
     /* State is defunct */
@@ -200,7 +200,7 @@ gail_menu_shell_is_child_selected (AtkSelection   *selection,
   gint j;
   GtkWidget *widget;
 
-  widget =  GTK_ACCESSIBLE (selection)->widget;
+  widget =  gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
   {
     /* State is defunct */
@@ -226,7 +226,7 @@ gail_menu_shell_remove_selection (AtkSelection   *selection,
   if (i != 0)
     return FALSE;
 
-  widget =  GTK_ACCESSIBLE (selection)->widget;
+  widget =  gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
   {
     /* State is defunct */
diff --git a/modules/other/gail/gailnotebook.c b/modules/other/gail/gailnotebook.c
index 7620e99..b3edb8c 100644
--- a/modules/other/gail/gailnotebook.c
+++ b/modules/other/gail/gailnotebook.c
@@ -114,7 +114,7 @@ gail_notebook_ref_child (AtkObject      *obj,
   GtkNotebook *gtk_notebook;
   GtkWidget *widget;
  
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /*
      * State is defunct
@@ -316,7 +316,7 @@ gail_notebook_add_selection (AtkSelection *selection,
   GtkNotebook *notebook;
   GtkWidget *widget;
   
-  widget =  GTK_ACCESSIBLE (selection)->widget;
+  widget =  gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     /*
      * State is defunct
@@ -343,7 +343,7 @@ gail_notebook_ref_selection (AtkSelection *selection,
   gail_return_val_if_fail (i == 0, NULL);
   g_return_val_if_fail (GAIL_IS_NOTEBOOK (selection), NULL);
   
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     /* State is defunct */
 	return NULL;
@@ -366,7 +366,7 @@ gail_notebook_get_selection_count (AtkSelection *selection)
   GtkWidget *widget;
   GtkNotebook *notebook;
   
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     /*
      * State is defunct
@@ -388,7 +388,7 @@ gail_notebook_is_child_selected (AtkSelection *selection,
   GtkNotebook *notebook;
   gint pagenumber;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     /* 
      * State is defunct
@@ -561,7 +561,7 @@ gail_notebook_check_focus_tab (gpointer data)
 
   atk_obj = ATK_OBJECT (data);
   gail_notebook = GAIL_NOTEBOOK (atk_obj);
-  widget = GTK_ACCESSIBLE (atk_obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_obj));
 
   gtk_notebook = GTK_NOTEBOOK (widget);
 
diff --git a/modules/other/gail/gailpaned.c b/modules/other/gail/gailpaned.c
index 039068c..5ac7cf3 100644
--- a/modules/other/gail/gailpaned.c
+++ b/modules/other/gail/gailpaned.c
@@ -68,7 +68,7 @@ gail_paned_ref_state_set (AtkObject *accessible)
   GtkWidget *widget;
 
   state_set = ATK_OBJECT_CLASS (gail_paned_parent_class)->ref_state_set (accessible);
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
 
   if (widget == NULL)
     return state_set;
@@ -121,7 +121,7 @@ gail_paned_get_current_value (AtkValue             *obj,
   GtkWidget* widget;
   gint current_value;
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -139,7 +139,7 @@ gail_paned_get_maximum_value (AtkValue             *obj,
   GtkWidget* widget;
   gint maximum_value;
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -157,7 +157,7 @@ gail_paned_get_minimum_value (AtkValue             *obj,
   GtkWidget* widget;
   gint minimum_value;
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -182,7 +182,7 @@ gail_paned_set_current_value (AtkValue             *obj,
   GtkWidget* widget;
   gint new_value;
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
diff --git a/modules/other/gail/gailradiobutton.c b/modules/other/gail/gailradiobutton.c
index 54d7160..46b85a0 100644
--- a/modules/other/gail/gailradiobutton.c
+++ b/modules/other/gail/gailradiobutton.c
@@ -65,7 +65,7 @@ gail_radio_button_ref_relation_set (AtkObject *obj)
 
   g_return_val_if_fail (GAIL_IS_RADIO_BUTTON (obj), NULL);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
   {
     /*
diff --git a/modules/other/gail/gailradiomenuitem.c b/modules/other/gail/gailradiomenuitem.c
index 312de5d..e791346 100644
--- a/modules/other/gail/gailradiomenuitem.c
+++ b/modules/other/gail/gailradiomenuitem.c
@@ -74,7 +74,7 @@ gail_radio_menu_item_ref_relation_set (AtkObject *obj)
 
   g_return_val_if_fail (GAIL_IS_RADIO_MENU_ITEM (obj), NULL);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
   {
     /*
diff --git a/modules/other/gail/gailradiosubmenuitem.c b/modules/other/gail/gailradiosubmenuitem.c
index c497173..9360f8f 100644
--- a/modules/other/gail/gailradiosubmenuitem.c
+++ b/modules/other/gail/gailradiosubmenuitem.c
@@ -70,7 +70,7 @@ gail_radio_sub_menu_item_ref_relation_set (AtkObject *obj)
 
   g_return_val_if_fail (GAIL_IS_RADIO_SUB_MENU_ITEM (obj), NULL);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
   {
     /*
diff --git a/modules/other/gail/gailrange.c b/modules/other/gail/gailrange.c
index c21a5b9..fc34eab 100644
--- a/modules/other/gail/gailrange.c
+++ b/modules/other/gail/gailrange.c
@@ -134,7 +134,7 @@ gail_range_ref_state_set (AtkObject *obj)
   GtkRange *range;
 
   state_set = ATK_OBJECT_CLASS (gail_range_parent_class)->ref_state_set (obj);
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
 
   if (widget == NULL)
     return state_set;
@@ -223,7 +223,7 @@ static gboolean	 gail_range_set_current_value (AtkValue		*obj,
 
   g_return_val_if_fail (GAIL_IS_RANGE (obj), FALSE);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     return FALSE;
 
@@ -340,7 +340,7 @@ gail_range_do_action (AtkAction *action,
   gboolean return_value = TRUE;
 
   range = GAIL_RANGE (action);
-  widget = GTK_ACCESSIBLE (action)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (action));
   if (widget == NULL)
     /*
      * State is defunct
@@ -368,7 +368,7 @@ idle_do_action (gpointer data)
 
   range = GAIL_RANGE (data);
   range->action_idle_handler = 0;
-  widget = GTK_ACCESSIBLE (range)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (range));
   if (widget == NULL /* State is defunct */ ||
      !gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
     return FALSE;
@@ -417,7 +417,7 @@ gail_range_get_keybinding (AtkAction *action,
     guint key_val;
 
     range = GAIL_RANGE (action);
-    widget = GTK_ACCESSIBLE (range)->widget;
+    widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (range));
     if (widget == NULL)
        return NULL;
     set = atk_object_ref_relation_set (ATK_OBJECT (action));
@@ -430,8 +430,7 @@ gail_range_get_keybinding (AtkAction *action,
      {
       target = atk_relation_get_target (relation);
       target_object = g_ptr_array_index (target, 0);
-      if (GTK_IS_ACCESSIBLE (target_object))
-         label = GTK_ACCESSIBLE (target_object)->widget;
+      label = gtk_accessible_get_widget (GTK_ACCESSIBLE (target_object));
      }
     g_object_unref (set);
     if (GTK_IS_LABEL (label))
diff --git a/modules/other/gail/gailscale.c b/modules/other/gail/gailscale.c
index a74de35..5291d8a 100644
--- a/modules/other/gail/gailscale.c
+++ b/modules/other/gail/gailscale.c
@@ -145,7 +145,7 @@ gail_scale_notify (GObject    *obj,
     {
       GtkWidget *widget;
 
-      widget = GTK_ACCESSIBLE (obj)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
       if (widget)
         {
           GtkScale *gtk_scale;
@@ -196,7 +196,7 @@ gail_scale_get_text (AtkText *text,
   GtkWidget *widget;
   GailScale *scale;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -218,7 +218,7 @@ gail_scale_get_text_before_offset (AtkText         *text,
   PangoLayout *layout;
   gchar *txt;
   
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   
   if (widget == NULL)
     /* State is defunct */
@@ -250,7 +250,7 @@ gail_scale_get_text_at_offset (AtkText         *text,
   PangoLayout *layout;
   gchar *txt;
  
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   
   if (widget == NULL)
     /* State is defunct */
@@ -282,7 +282,7 @@ gail_scale_get_text_after_offset (AtkText         *text,
   PangoLayout *layout;
   gchar *txt;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   
   if (widget == NULL)
     /* State is defunct */
@@ -308,7 +308,7 @@ gail_scale_get_character_count (AtkText *text)
   GtkWidget *widget;
   GailScale *scale;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -337,7 +337,7 @@ gail_scale_get_character_extents (AtkText      *text,
   gint index, x_layout, y_layout;
   const gchar *scale_text;
  
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
 
   if (widget == NULL)
     /* State is defunct */
@@ -369,7 +369,7 @@ gail_scale_get_offset_at_point (AtkText      *text,
   gint index, x_layout, y_layout;
   const gchar *scale_text;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return -1;
@@ -410,7 +410,7 @@ gail_scale_get_run_attributes (AtkText *text,
   PangoLayout *layout;
   const gchar *scale_text;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -448,7 +448,7 @@ gail_scale_get_default_attributes (AtkText *text)
   AtkAttributeSet *at_set = NULL;
   PangoLayout *layout;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -474,7 +474,7 @@ gail_scale_get_character_at_offset (AtkText *text,
   gchar *index;
   gunichar c;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return '\0';
diff --git a/modules/other/gail/gailscalebutton.c b/modules/other/gail/gailscalebutton.c
index bf79a5a..9f2130e 100644
--- a/modules/other/gail/gailscalebutton.c
+++ b/modules/other/gail/gailscalebutton.c
@@ -111,7 +111,7 @@ gail_scale_button_do_action(AtkAction *action,
 {
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (action)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (action));
   if (widget == NULL)
     return FALSE;
 
@@ -191,7 +191,7 @@ gail_scale_button_get_current_value (AtkValue *obj,
 
   g_return_if_fail (GAIL_IS_SCALE_BUTTON (obj));
 
-  gtk_scale_button = GTK_SCALE_BUTTON (GTK_ACCESSIBLE (obj)->widget);
+  gtk_scale_button = GTK_SCALE_BUTTON (gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)));
 
   g_value_set_double (g_value_init (value, G_TYPE_DOUBLE),
                       gtk_scale_button_get_value (gtk_scale_button));
@@ -206,7 +206,7 @@ gail_scale_button_get_maximum_value (AtkValue *obj,
 
   g_return_if_fail (GAIL_IS_SCALE_BUTTON (obj));
 
-  gtk_widget = GTK_ACCESSIBLE (obj)->widget;
+  gtk_widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (gtk_widget == NULL)
     return;
 
@@ -225,7 +225,7 @@ gail_scale_button_get_minimum_value (AtkValue *obj,
 
   g_return_if_fail (GAIL_IS_SCALE_BUTTON (obj));
 
-  gtk_widget = GTK_ACCESSIBLE (obj)->widget;
+  gtk_widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (gtk_widget == NULL)
     return;
 
@@ -244,7 +244,7 @@ gail_scale_button_get_minimum_increment (AtkValue *obj,
 
   g_return_if_fail (GAIL_IS_SCALE_BUTTON (obj));
 
-  gtk_widget = GTK_ACCESSIBLE (obj)->widget;
+  gtk_widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (gtk_widget == NULL)
     return;
 
@@ -262,7 +262,7 @@ gail_scale_button_set_current_value (AtkValue     *obj,
 
   g_return_val_if_fail (GAIL_IS_SCALE_BUTTON (obj), FALSE);
 
-  gtk_widget = GTK_ACCESSIBLE (obj)->widget;
+  gtk_widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (gtk_widget == NULL)
     return FALSE;
 
diff --git a/modules/other/gail/gailscrollbar.c b/modules/other/gail/gailscrollbar.c
index dd24b0d..35774db 100644
--- a/modules/other/gail/gailscrollbar.c
+++ b/modules/other/gail/gailscrollbar.c
@@ -62,7 +62,7 @@ gail_scrollbar_get_index_in_parent (AtkObject *accessible)
   gint n_children;
   GList *children;
 
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
 
   if (widget == NULL)
   {
diff --git a/modules/other/gail/gailscrolledwindow.c b/modules/other/gail/gailscrolledwindow.c
index e023b4a..8a0bc4b 100644
--- a/modules/other/gail/gailscrolledwindow.c
+++ b/modules/other/gail/gailscrolledwindow.c
@@ -82,7 +82,7 @@ gail_scrolled_window_get_n_children (AtkObject *object)
   GList *children;
   gint n_children;
  
-  widget = GTK_ACCESSIBLE (object)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (object));
   if (widget == NULL)
     /* Object is defunct */
     return 0;
@@ -116,7 +116,7 @@ gail_scrolled_window_ref_child (AtkObject *obj,
 
   g_return_val_if_fail (child >= 0, NULL);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /* Object is defunct */
     return NULL;
@@ -167,7 +167,7 @@ gail_scrolled_window_scrollbar_visibility_changed (GObject    *object,
       GailScrolledWindow *gail_window = GAIL_SCROLLED_WINDOW (user_data);
       gchar *signal_name;
 
-      gtk_window = GTK_SCROLLED_WINDOW (GTK_ACCESSIBLE (user_data)->widget);
+      gtk_window = GTK_SCROLLED_WINDOW (gtk_accessible_get_widget (GTK_ACCESSIBLE (user_data)));
       if (gtk_window == NULL)
         return;
       children = gtk_container_get_children (GTK_CONTAINER (gtk_window));
diff --git a/modules/other/gail/gailseparator.c b/modules/other/gail/gailseparator.c
index 39efe4e..6aaa010 100644
--- a/modules/other/gail/gailseparator.c
+++ b/modules/other/gail/gailseparator.c
@@ -60,7 +60,7 @@ gail_separator_ref_state_set (AtkObject *accessible)
   GtkWidget *widget;
 
   state_set = ATK_OBJECT_CLASS (gail_separator_parent_class)->ref_state_set (accessible);
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
 
   if (widget == NULL)
     return state_set;
diff --git a/modules/other/gail/gailstatusbar.c b/modules/other/gail/gailstatusbar.c
index e8b84cf..2b7c63f 100644
--- a/modules/other/gail/gailstatusbar.c
+++ b/modules/other/gail/gailstatusbar.c
@@ -137,7 +137,7 @@ gail_statusbar_get_name (AtkObject *obj)
       GtkWidget *widget;
       GtkWidget *label;
 
-      widget = GTK_ACCESSIBLE (obj)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
       if (widget == NULL)
         /*
          * State is defunct
@@ -160,7 +160,7 @@ gail_statusbar_get_n_children (AtkObject *obj)
   GList *children;
   gint count = 0;
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     return 0;
 
@@ -183,7 +183,7 @@ gail_statusbar_ref_child (AtkObject *obj,
   GtkWidget *widget;
 
   g_return_val_if_fail ((i >= 0), NULL);
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     return NULL;
 
@@ -315,7 +315,7 @@ gail_statusbar_get_text (AtkText *text,
   GailStatusbar *statusbar;
   const gchar *label_text;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -351,7 +351,7 @@ gail_statusbar_get_text_before_offset (AtkText         *text,
   GtkWidget *label;
   GailStatusbar *statusbar;
   
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   
   if (widget == NULL)
     /* State is defunct */
@@ -383,7 +383,7 @@ gail_statusbar_get_text_at_offset (AtkText         *text,
   GtkWidget *label;
   GailStatusbar *statusbar;
  
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   
   if (widget == NULL)
     /* State is defunct */
@@ -415,7 +415,7 @@ gail_statusbar_get_text_after_offset (AtkText         *text,
   GtkWidget *label;
   GailStatusbar *statusbar;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   
   if (widget == NULL)
   {
@@ -444,7 +444,7 @@ gail_statusbar_get_character_count (AtkText *text)
   GtkWidget *widget;
   GtkWidget *label;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -472,7 +472,7 @@ gail_statusbar_get_character_extents (AtkText      *text,
   gint index, x_layout, y_layout;
   const gchar *label_text;
  
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
 
   if (widget == NULL)
     /* State is defunct */
@@ -503,7 +503,7 @@ gail_statusbar_get_offset_at_point (AtkText      *text,
   gint index, x_layout, y_layout;
   const gchar *label_text;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return -1;
@@ -542,7 +542,7 @@ gail_statusbar_get_run_attributes (AtkText *text,
   GtkJustification justify;
   GtkTextDirection dir;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -584,7 +584,7 @@ gail_statusbar_get_default_attributes (AtkText *text)
   GtkWidget *label;
   AtkAttributeSet *at_set = NULL;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -609,7 +609,7 @@ gail_statusbar_get_character_at_offset (AtkText *text,
   const gchar *string;
   gchar *index;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return '\0';
diff --git a/modules/other/gail/gailsubmenuitem.c b/modules/other/gail/gailsubmenuitem.c
index c55a758..a2fb239 100644
--- a/modules/other/gail/gailsubmenuitem.c
+++ b/modules/other/gail/gailsubmenuitem.c
@@ -125,7 +125,7 @@ gail_sub_menu_item_add_selection (AtkSelection *selection,
   GtkWidget *widget;
   GtkWidget *submenu;
 
-  widget =  GTK_ACCESSIBLE (selection)->widget;
+  widget =  gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -152,7 +152,7 @@ gail_sub_menu_item_clear_selection (AtkSelection   *selection)
   GtkWidget *widget;
   GtkWidget *submenu;
 
-  widget =  GTK_ACCESSIBLE (selection)->widget;
+  widget =  gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -177,7 +177,7 @@ gail_sub_menu_item_ref_selection (AtkSelection   *selection,
   if (i != 0)
     return NULL;
 
-  widget =  GTK_ACCESSIBLE (selection)->widget;
+  widget =  gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -205,7 +205,7 @@ gail_sub_menu_item_get_selection_count (AtkSelection   *selection)
   GtkWidget *widget;
   GtkWidget *submenu;
 
-  widget =  GTK_ACCESSIBLE (selection)->widget;
+  widget =  gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -232,7 +232,7 @@ gail_sub_menu_item_is_child_selected (AtkSelection   *selection,
   GtkWidget *widget;
   GtkWidget *submenu;
 
-  widget =  GTK_ACCESSIBLE (selection)->widget;
+  widget =  gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -260,7 +260,7 @@ gail_sub_menu_item_remove_selection (AtkSelection   *selection,
   if (i != 0)
     return FALSE;
 
-  widget =  GTK_ACCESSIBLE (selection)->widget;
+  widget =  gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
diff --git a/modules/other/gail/gailtextcell.c b/modules/other/gail/gailtextcell.c
index d264b10..4eb5ad5 100644
--- a/modules/other/gail/gailtextcell.c
+++ b/modules/other/gail/gailtextcell.c
@@ -398,7 +398,7 @@ gail_text_cell_get_run_attributes (AtkText *text,
   if (GAIL_IS_CONTAINER_CELL (parent))
     parent = atk_object_get_parent (parent);
   g_return_val_if_fail (GAIL_IS_CELL_PARENT (parent), NULL);
-  widget = GTK_ACCESSIBLE (parent)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
   layout = create_pango_layout (gtk_renderer, widget),
   attrib_set = gail_misc_layout_get_run_attributes (attrib_set, 
                                                     layout,
@@ -428,7 +428,7 @@ gail_text_cell_get_default_attributes (AtkText	*text)
   if (GAIL_IS_CONTAINER_CELL (parent))
     parent = atk_object_get_parent (parent);
   g_return_val_if_fail (GAIL_IS_CELL_PARENT (parent), NULL);
-  widget = GTK_ACCESSIBLE (parent)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
   layout = create_pango_layout (gtk_renderer, widget),
 
   attrib_set = gail_misc_get_default_attributes (attrib_set, 
@@ -563,7 +563,7 @@ gail_text_cell_get_character_extents (AtkText          *text,
   parent = atk_object_get_parent (ATK_OBJECT (text));
   if (GAIL_IS_CONTAINER_CELL (parent))
     parent = atk_object_get_parent (parent);
-  widget = GTK_ACCESSIBLE (parent)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
   g_return_if_fail (GAIL_IS_CELL_PARENT (parent));
   gail_cell_parent_get_cell_area (GAIL_CELL_PARENT (parent), GAIL_CELL (text),
                                   &rendered_rect);
@@ -610,7 +610,7 @@ gail_text_cell_get_offset_at_point (AtkText          *text,
   if (GAIL_IS_CONTAINER_CELL (parent))
     parent = atk_object_get_parent (parent);
 
-  widget = GTK_ACCESSIBLE (parent)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
 
   g_return_val_if_fail (GAIL_IS_CELL_PARENT (parent), -1);
   gail_cell_parent_get_cell_area (GAIL_CELL_PARENT (parent), GAIL_CELL (text),
diff --git a/modules/other/gail/gailtextview.c b/modules/other/gail/gailtextview.c
index a383db5..873509c 100644
--- a/modules/other/gail/gailtextview.c
+++ b/modules/other/gail/gailtextview.c
@@ -301,7 +301,7 @@ gail_text_view_ref_state_set (AtkObject *accessible)
   GtkWidget *widget;
 
   state_set = ATK_OBJECT_CLASS (gail_text_view_parent_class)->ref_state_set (accessible);
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
 
   if (widget == NULL)
     return state_set;
@@ -349,7 +349,7 @@ gail_text_view_get_text (AtkText *text,
   GtkTextIter start, end;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -371,7 +371,7 @@ gail_text_view_get_text_after_offset (AtkText         *text,
 {
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -390,7 +390,7 @@ gail_text_view_get_text_at_offset (AtkText         *text,
 {
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -409,7 +409,7 @@ gail_text_view_get_text_before_offset (AtkText         *text,
 {
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -429,7 +429,7 @@ gail_text_view_get_character_at_offset (AtkText *text,
   gchar *string;
   gunichar unichar;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     return '\0';
 
@@ -453,7 +453,7 @@ gail_text_view_get_character_count (AtkText *text)
   GtkTextBuffer *buffer;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -469,7 +469,7 @@ gail_text_view_get_caret_offset (AtkText *text)
   GtkTextView *view;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -487,7 +487,7 @@ gail_text_view_set_caret_offset (AtkText *text,
   GtkTextBuffer *buffer;
   GtkTextIter pos_itr;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -515,7 +515,7 @@ gail_text_view_get_offset_at_point (AtkText      *text,
   GdkWindow *window;
   GdkRectangle rect;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return -1;
@@ -579,7 +579,7 @@ gail_text_view_get_character_extents (AtkText      *text,
   GdkWindow *window;
   gint x_widget, y_widget, x_window, y_window;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -628,7 +628,7 @@ gail_text_view_get_run_attributes (AtkText *text,
   GtkTextBuffer *buffer;
   GtkWidget *widget;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -649,7 +649,7 @@ gail_text_view_get_default_attributes (AtkText *text)
   AtkAttributeSet *attrib_set = NULL;
   PangoFontDescription *font;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -765,7 +765,7 @@ gail_text_view_get_n_selections (AtkText *text)
   GtkTextIter start, end;
   gint select_start, select_end;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return -1;
@@ -794,7 +794,7 @@ gail_text_view_get_selection (AtkText *text,
   GtkTextBuffer *buffer;
   GtkTextIter start, end;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -830,7 +830,7 @@ gail_text_view_add_selection (AtkText *text,
   GtkTextIter start, end;
   gint select_start, select_end;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -869,7 +869,7 @@ gail_text_view_remove_selection (AtkText *text,
   GtkTextIter start, end;
   gint select_start, select_end;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -911,7 +911,7 @@ gail_text_view_set_selection (AtkText *text,
   GtkTextIter start, end;
   gint select_start, select_end;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
   {
     /* State is defunct */
@@ -974,7 +974,7 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
   gchar** RGB_vals;
   GSList *l;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -1186,7 +1186,7 @@ gail_text_view_set_text_contents (AtkEditableText *text,
   GtkWidget *widget;
   GtkTextBuffer *buffer;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -1211,7 +1211,7 @@ gail_text_view_insert_text (AtkEditableText *text,
   GtkTextBuffer *buffer;
   GtkTextIter pos_itr;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -1237,7 +1237,7 @@ gail_text_view_copy_text   (AtkEditableText *text,
   gchar *str;
   GtkClipboard *clipboard;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -1265,7 +1265,7 @@ gail_text_view_cut_text (AtkEditableText *text,
   gchar *str;
   GtkClipboard *clipboard;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -1295,7 +1295,7 @@ gail_text_view_delete_text (AtkEditableText *text,
   GtkTextIter start_itr;
   GtkTextIter end_itr;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -1320,7 +1320,7 @@ gail_text_view_paste_text (AtkEditableText *text,
   GailTextViewPaste paste_struct;
   GtkClipboard *clipboard;
 
-  widget = GTK_ACCESSIBLE (text)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -1551,7 +1551,7 @@ get_text_near_offset (AtkText          *text,
   GtkTextView *view;
   gpointer layout = NULL;
 
-  view = GTK_TEXT_VIEW (GTK_ACCESSIBLE (text)->widget);
+  view = GTK_TEXT_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (text)));
 
   /*
    * Pass the GtkTextView to the function gail_text_util_get_text() 
diff --git a/modules/other/gail/gailtogglebutton.c b/modules/other/gail/gailtogglebutton.c
index 94f9f59..fb3c2a2 100644
--- a/modules/other/gail/gailtogglebutton.c
+++ b/modules/other/gail/gailtogglebutton.c
@@ -95,7 +95,7 @@ gail_toggle_button_ref_state_set (AtkObject *accessible)
   GtkWidget *widget;
 
   state_set = ATK_OBJECT_CLASS (gail_toggle_button_parent_class)->ref_state_set (accessible);
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
  
   if (widget == NULL)
     return state_set;
diff --git a/modules/other/gail/gailtreeview.c b/modules/other/gail/gailtreeview.c
index a054297..6383874 100644
--- a/modules/other/gail/gailtreeview.c
+++ b/modules/other/gail/gailtreeview.c
@@ -654,9 +654,12 @@ gail_tree_view_finalize (GObject	    *object)
 static void
 gail_tree_view_connect_widget_destroyed (GtkAccessible *accessible)
 {
-  if (accessible->widget)
+  GtkWidget *widget;
+
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+  if (widget)
     {
-      g_signal_connect_after (accessible->widget,
+      g_signal_connect_after (widget,
                               "destroy",
                               G_CALLBACK (gail_tree_view_destroyed),
                               accessible);
@@ -757,7 +760,7 @@ gail_tree_view_get_n_children (AtkObject *obj)
 
   gail_return_val_if_fail (GAIL_IS_TREE_VIEW (obj), 0);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /*
      * State is defunct
@@ -808,7 +811,7 @@ gail_tree_view_ref_child (AtkObject *obj,
   g_return_val_if_fail (GAIL_IS_TREE_VIEW (obj), NULL);
   g_return_val_if_fail (i >= 0, NULL);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /*
      * State is defunct
@@ -1049,7 +1052,7 @@ gail_tree_view_ref_state_set (AtkObject *obj)
   GtkWidget *widget;
 
   state_set = ATK_OBJECT_CLASS (gail_tree_view_parent_class)->ref_state_set (obj);
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
 
   if (widget != NULL)
     atk_state_set_add_state (state_set, ATK_STATE_MANAGES_DESCENDANTS);
@@ -1079,7 +1082,7 @@ gail_tree_view_ref_accessible_at_point (AtkComponent           *component,
   gint bx, by;
   gboolean ret_val;
 
-  widget = GTK_ACCESSIBLE (component)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -1160,7 +1163,7 @@ gail_tree_view_get_index_at (AtkTable *table,
       column >= n_cols)
     return -1;
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return -1;
@@ -1185,7 +1188,7 @@ gail_tree_view_get_column_at_index (AtkTable *table,
   GtkTreeView *tree_view;
   gint n_columns;
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return -1;
@@ -1208,7 +1211,7 @@ gail_tree_view_get_row_at_index (AtkTable *table,
   GtkTreeView *tree_view;
   GtkTreePath *path;
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return -1;
@@ -1246,7 +1249,7 @@ gail_tree_view_get_n_rows (AtkTable *table)
   GtkTreeModel *tree_model;
   gint n_rows;
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -1299,7 +1302,7 @@ gail_tree_view_get_n_columns (AtkTable *table)
   gint n_cols = 0;
   gint i = 0;
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -1328,7 +1331,7 @@ gail_tree_view_is_row_selected (AtkTable *table,
   GtkTreeSelection *selection;
   GtkTreeIter iter;
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -1365,7 +1368,7 @@ gail_tree_view_get_selected_rows (AtkTable *table,
   GtkTreePath *tree_path;
   gint ret_val = 0;
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return 0;
@@ -1441,7 +1444,7 @@ gail_tree_view_add_row_selection (AtkTable *table,
   GtkTreePath *tree_path;
   GtkTreeIter iter_to_row;
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -1480,7 +1483,7 @@ gail_tree_view_remove_row_selection (AtkTable *table,
   GtkTreeView *tree_view;
   GtkTreeSelection *selection;
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -1526,7 +1529,7 @@ gail_tree_view_get_column_header (AtkTable *table,
   GtkTreeView *tree_view;
   GtkTreeViewColumn *tv_col;
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -1547,7 +1550,7 @@ gail_tree_view_set_column_header (AtkTable  *table,
   AtkObject *rc;
   AtkPropertyValues values = { NULL };
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -1618,7 +1621,7 @@ gail_tree_view_get_column_description (AtkTable	  *table,
   GtkTreeViewColumn *tv_col;
   gchar *rc;
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -1652,7 +1655,7 @@ gail_tree_view_set_column_description (AtkTable	   *table,
   GtkTreeViewColumn *tv_col;
   AtkPropertyValues values = { NULL };
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -1748,7 +1751,7 @@ set_row_data (AtkTable    *table,
   AtkPropertyValues values = { NULL };
   gchar *signal_name;
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -1852,7 +1855,7 @@ get_row_info (AtkTable    *table,
   GArray *array;
   GailTreeViewRowInfo *rc = NULL;
 
-  widget = GTK_ACCESSIBLE (table)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (table));
   if (widget == NULL)
     /* State is defunct */
     return NULL;
@@ -1925,7 +1928,7 @@ gail_tree_view_clear_selection (AtkSelection *selection)
   GtkTreeView *tree_view;
   GtkTreeSelection *tree_selection;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -1980,7 +1983,7 @@ gail_tree_view_is_child_selected (AtkSelection *selection,
   GtkWidget *widget;
   gint row;
 
-  widget = GTK_ACCESSIBLE (selection)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -2013,7 +2016,7 @@ gail_tree_view_get_cell_extents (GailCellParent *parent,
   GdkRectangle cell_rect;
   gint w_x, w_y;
 
-  widget = GTK_ACCESSIBLE (parent)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -2064,7 +2067,7 @@ gail_tree_view_get_cell_area (GailCellParent *parent,
   GailTreeViewCellInfo *cell_info;
   GailCell *top_cell;
 
-  widget = GTK_ACCESSIBLE (parent)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
   if (widget == NULL)
     /* State is defunct */
     return;
@@ -2159,7 +2162,7 @@ gail_tree_view_grab_cell_focus  (GailCellParent *parent,
   GtkWidget *toplevel;
   gint index;
 
-  widget = GTK_ACCESSIBLE (parent)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
   if (widget == NULL)
     /* State is defunct */
     return FALSE;
@@ -2258,7 +2261,7 @@ idle_expand_row (gpointer data)
   gailview->idle_expand_id = 0;
 
   path = gailview->idle_expand_path;
-  tree_view = GTK_TREE_VIEW (GTK_ACCESSIBLE (gailview)->widget);
+  tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (gailview)));
 
   g_assert (GTK_IS_TREE_VIEW (tree_view));
 
@@ -2416,7 +2419,7 @@ gail_tree_view_changed_gtk (GtkTreeSelection *selection,
 
   gailview = GAIL_TREE_VIEW (data);
   cell_list = gailview->cell_data;
-  widget = GTK_ACCESSIBLE (gailview)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (gailview));
   if (widget == NULL)
     /*
      * destroy signal emitted for widget
@@ -2622,7 +2625,7 @@ idle_cursor_changed (gpointer data)
 
   gail_tree_view->idle_cursor_changed_id = 0;
 
-  widget = GTK_ACCESSIBLE (gail_tree_view)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (gail_tree_view));
   /*
    * Widget has been deleted
    */
@@ -3157,7 +3160,7 @@ update_cell_value (GailRendererCell *renderer_cell,
 
   if (emit_change_signal && cell_info->in_use)
     {
-      tree_view = GTK_TREE_VIEW (GTK_ACCESSIBLE (gailview)->widget);
+      tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (gailview)));
       tree_model = gtk_tree_view_get_model (tree_view);
       path = gtk_tree_row_reference_get_path (cell_info->cell_row_ref);
       if (path == NULL)
@@ -3739,7 +3742,7 @@ traverse_cells (GailTreeView *tree_view,
 
       g_assert (GTK_IS_ACCESSIBLE (tree_view));
 
-      widget = GTK_ACCESSIBLE (tree_view)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (tree_view));
       if (!widget)
         /* Widget is being deleted */
         return;
@@ -3963,7 +3966,7 @@ toggle_cell_expanded (GailCell *cell)
   gail_return_if_fail (cell_info->cell_col_ref);
   gail_return_if_fail (cell_info->cell_row_ref);
 
-  tree_view = GTK_TREE_VIEW (GTK_ACCESSIBLE (parent)->widget);
+  tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
   path = gtk_tree_row_reference_get_path (cell_info->cell_row_ref);
   gail_return_if_fail (path);
 
@@ -4000,7 +4003,7 @@ toggle_cell_toggled (GailCell *cell)
   gail_return_if_fail (cell_info->cell_col_ref);
   gail_return_if_fail (cell_info->cell_row_ref);
 
-  tree_view = GTK_TREE_VIEW (GTK_ACCESSIBLE (parent)->widget);
+  tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
   path = gtk_tree_row_reference_get_path (cell_info->cell_row_ref);
   gail_return_if_fail (path);
   pathstring = gtk_tree_path_to_string (path);
@@ -4053,7 +4056,7 @@ edit_cell (GailCell *cell)
   gail_return_if_fail (cell_info->cell_col_ref);
   gail_return_if_fail (cell_info->cell_row_ref);
 
-  tree_view = GTK_TREE_VIEW (GTK_ACCESSIBLE (parent)->widget);
+  tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
   path = gtk_tree_row_reference_get_path (cell_info->cell_row_ref);
   gail_return_if_fail (path);
   gtk_tree_view_set_cursor (tree_view, path, cell_info->cell_col_ref, TRUE);
@@ -4083,7 +4086,7 @@ activate_cell (GailCell *cell)
   gail_return_if_fail (cell_info->cell_col_ref);
   gail_return_if_fail (cell_info->cell_row_ref);
 
-  tree_view = GTK_TREE_VIEW (GTK_ACCESSIBLE (parent)->widget);
+  tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
   path = gtk_tree_row_reference_get_path (cell_info->cell_row_ref);
   gail_return_if_fail (path);
   gtk_tree_view_row_activated (tree_view, path, cell_info->cell_col_ref);
@@ -4182,7 +4185,7 @@ find_cell (GailTreeView *gailview,
   gboolean needs_cleaning = FALSE;
   GailCell *retval = NULL;
 
-  tree_view = GTK_TREE_VIEW (GTK_ACCESSIBLE (gailview)->widget);
+  tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (gailview)));
   cell_list = gailview->cell_data;
 
   for (l = cell_list; l; l = l->next)
@@ -4219,7 +4222,7 @@ refresh_cell_index (GailCell *cell)
   parent = atk_object_get_parent (ATK_OBJECT (cell));
   gail_return_if_fail (GAIL_IS_TREE_VIEW (parent));
 
-  tree_view = GTK_TREE_VIEW (GTK_ACCESSIBLE (parent)->widget);
+  tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent)));
 
   /* Find this cell in the GailTreeView's cache */
 
@@ -4268,7 +4271,7 @@ disconnect_model_signals (GailTreeView *view)
   GtkWidget *widget;
 
   obj = G_OBJECT (view->tree_model);
-  widget = GTK_ACCESSIBLE (view)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (view));
   g_signal_handlers_disconnect_by_func (obj, (gpointer) model_row_changed, widget);
   g_signal_handlers_disconnect_by_func (obj, (gpointer) model_row_inserted, widget);
   g_signal_handlers_disconnect_by_func (obj, (gpointer) model_row_deleted, widget);
diff --git a/modules/other/gail/gailutil.c b/modules/other/gail/gailutil.c
index 413d063..8d1c5fd 100644
--- a/modules/other/gail/gailutil.c
+++ b/modules/other/gail/gailutil.c
@@ -471,7 +471,7 @@ window_added (AtkObject *atk_obj,
 
   if (!GAIL_IS_WINDOW (child)) return;
 
-  widget = GTK_ACCESSIBLE (child)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (child));
   gail_return_if_fail (widget);
 
   g_signal_connect (widget, "focus-in-event",  
@@ -492,7 +492,7 @@ window_removed (AtkObject *atk_obj,
 
   if (!GAIL_IS_WINDOW (child)) return;
 
-  widget = GTK_ACCESSIBLE (child)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (child));
   gail_return_if_fail (widget);
 
   window = GTK_WINDOW (widget);
diff --git a/modules/other/gail/gailwidget.c b/modules/other/gail/gailwidget.c
index c92c3c6..6c320b5 100644
--- a/modules/other/gail/gailwidget.c
+++ b/modules/other/gail/gailwidget.c
@@ -149,7 +149,7 @@ gail_widget_real_initialize (AtkObject *obj,
   widget = GTK_WIDGET (data);
 
   accessible = GTK_ACCESSIBLE (obj);
-  accessible->widget = widget;
+  gtk_accessible_set_widget (accessible, widget);
   gtk_accessible_connect_widget_destroyed (accessible);
   g_signal_connect_after (widget,
                           "focus-in-event",
@@ -209,9 +209,12 @@ gail_widget_new (GtkWidget *widget)
 static void
 gail_widget_connect_widget_destroyed (GtkAccessible *accessible)
 {
-  if (accessible->widget)
+  GtkWidget *widget;
+
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+  if (widget)
     {
-      g_signal_connect_after (accessible->widget,
+      g_signal_connect_after (widget,
                               "destroy",
                               G_CALLBACK (gail_widget_destroyed),
                               accessible);
@@ -227,7 +230,7 @@ static void
 gail_widget_destroyed (GtkWidget     *widget,
                        GtkAccessible *accessible)
 {
-  accessible->widget = NULL;
+  gtk_accessible_set_widget (accessible, NULL);
   atk_object_notify_state_change (ATK_OBJECT (accessible), ATK_STATE_DEFUNCT,
                                   TRUE);
 }
@@ -239,20 +242,17 @@ gail_widget_get_description (AtkObject *accessible)
     return accessible->description;
   else
     {
-      /* Get the tooltip from the widget */
-      GtkAccessible *obj = GTK_ACCESSIBLE (accessible);
-
-      gail_return_val_if_fail (obj, NULL);
+      GtkWidget *widget;
 
-      if (obj->widget == NULL)
+      /* Get the tooltip from the widget */
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
+      if (widget == NULL)
         /*
          * Object is defunct
          */
         return NULL;
  
-      gail_return_val_if_fail (GTK_WIDGET (obj->widget), NULL);
-
-      return gtk_widget_get_tooltip_text (obj->widget);
+      return gtk_widget_get_tooltip_text (widget);
     }
 }
 
@@ -269,7 +269,7 @@ gail_widget_get_parent (AtkObject *accessible)
     {
       GtkWidget *widget, *parent_widget;
 
-      widget = GTK_ACCESSIBLE (accessible)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
       if (widget == NULL)
         /*
          * State is defunct
@@ -371,7 +371,7 @@ gail_widget_ref_relation_set (AtkObject *obj)
 
   gail_return_val_if_fail (GAIL_IS_WIDGET (obj), NULL);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /*
      * State is defunct
@@ -449,7 +449,7 @@ gail_widget_ref_relation_set (AtkObject *obj)
 static AtkStateSet*
 gail_widget_ref_state_set (AtkObject *accessible)
 {
-  GtkWidget *widget = GTK_ACCESSIBLE (accessible)->widget;
+  GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
   AtkStateSet *state_set;
 
   state_set = ATK_OBJECT_CLASS (gail_widget_parent_class)->ref_state_set (accessible);
@@ -525,7 +525,7 @@ gail_widget_get_index_in_parent (AtkObject *accessible)
   GType type;
 
   type = g_type_from_name ("GailCanvasWidget");
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
 
   if (widget == NULL)
     /*
@@ -632,7 +632,7 @@ gail_widget_get_extents (AtkComponent   *component,
   GdkWindow *window;
   gint x_window, y_window;
   gint x_toplevel, y_toplevel;
-  GtkWidget *widget = GTK_ACCESSIBLE (component)->widget;
+  GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
 
   if (widget == NULL)
     /*
@@ -683,7 +683,7 @@ gail_widget_get_size (AtkComponent   *component,
                       gint           *width,
                       gint           *height)
 {
-  GtkWidget *widget = GTK_ACCESSIBLE (component)->widget;
+  GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
 
   if (widget == NULL)
     /*
@@ -709,7 +709,7 @@ gail_widget_get_layer (AtkComponent *component)
 static gboolean 
 gail_widget_grab_focus (AtkComponent   *component)
 {
-  GtkWidget *widget = GTK_ACCESSIBLE (component)->widget;
+  GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
   GtkWidget *toplevel;
 
   gail_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
@@ -746,7 +746,7 @@ gail_widget_set_extents (AtkComponent   *component,
                          gint           height,
                          AtkCoordType   coord_type)
 {
-  GtkWidget *widget = GTK_ACCESSIBLE (component)->widget;
+  GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
 
   if (widget == NULL)
     /*
@@ -790,7 +790,7 @@ gail_widget_set_position (AtkComponent   *component,
                           gint           y,
                           AtkCoordType   coord_type)
 {
-  GtkWidget *widget = GTK_ACCESSIBLE (component)->widget;
+  GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
 
   if (widget == NULL)
     /*
@@ -831,7 +831,7 @@ gail_widget_set_size (AtkComponent   *component,
                       gint           width,
                       gint           height)
 {
-  GtkWidget *widget = GTK_ACCESSIBLE (component)->widget;
+  GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
 
   if (widget == NULL)
     /*
diff --git a/modules/other/gail/gailwindow.c b/modules/other/gail/gailwindow.c
index e3e3703..9b62acb 100644
--- a/modules/other/gail/gailwindow.c
+++ b/modules/other/gail/gailwindow.c
@@ -272,7 +272,7 @@ gail_window_get_name (AtkObject *accessible)
       /*
        * Get the window title if it exists
        */
-      GtkWidget* widget = GTK_ACCESSIBLE (accessible)->widget; 
+      GtkWidget* widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
 
       if (widget == NULL)
         /*
@@ -338,7 +338,7 @@ gail_window_get_parent (AtkObject *accessible)
 static gint
 gail_window_get_index_in_parent (AtkObject *accessible)
 {
-  GtkWidget* widget = GTK_ACCESSIBLE (accessible)->widget; 
+  GtkWidget* widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
   AtkObject* atk_obj = atk_get_root ();
   gint index = -1;
 
@@ -399,7 +399,7 @@ gail_window_ref_relation_set (AtkObject *obj)
 
   gail_return_val_if_fail (GAIL_IS_WIDGET (obj), NULL);
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (widget == NULL)
     /*
      * State is defunct
@@ -437,7 +437,7 @@ gail_window_ref_state_set (AtkObject *accessible)
   GdkWindowState state;
 
   state_set = ATK_OBJECT_CLASS (gail_window_parent_class)->ref_state_set (accessible);
-  widget = GTK_ACCESSIBLE (accessible)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
  
   if (widget == NULL)
     return state_set;
@@ -470,7 +470,7 @@ idle_notify_name_change (gpointer data)
 
   window = GAIL_WINDOW (data);
   window->name_change_handler = 0;
-  if (GTK_ACCESSIBLE (window)->widget == NULL)
+  if (gtk_accessible_get_widget (GTK_ACCESSIBLE (window)) == NULL)
     return FALSE;
 
   obj = ATK_OBJECT (window);
@@ -549,7 +549,7 @@ gail_window_get_extents (AtkComponent  *component,
                          gint          *height,
                          AtkCoordType  coord_type)
 {
-  GtkWidget *widget = GTK_ACCESSIBLE (component)->widget; 
+  GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component)); 
   GdkRectangle rect;
   gint x_toplevel, y_toplevel;
 
@@ -595,7 +595,7 @@ gail_window_get_size (AtkComponent *component,
                       gint         *width,
                       gint         *height)
 {
-  GtkWidget *widget = GTK_ACCESSIBLE (component)->widget; 
+  GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
   GdkRectangle rect;
 
   if (widget == NULL)
@@ -1000,7 +1000,7 @@ get_window_zorder (GdkWindow *window)
 static gint
 gail_window_get_mdi_zorder (AtkComponent *component)
 {
-  GtkWidget *widget = GTK_ACCESSIBLE (component)->widget;
+  GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
 
   if (widget == NULL)
     /*
@@ -1018,7 +1018,7 @@ gail_window_get_mdi_zorder (AtkComponent *component)
 static gint
 gail_window_get_mdi_zorder (AtkComponent *component)
 {
-  GtkWidget *widget = GTK_ACCESSIBLE (component)->widget;
+  GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
 
   if (widget == NULL)
     /*
@@ -1036,7 +1036,7 @@ gail_window_get_mdi_zorder (AtkComponent *component)
 static gint
 gail_window_get_mdi_zorder (AtkComponent *component)
 {
-  GtkWidget *widget = GTK_ACCESSIBLE (component)->widget;
+  GtkWidget *widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (component));
 
   if (widget == NULL)
     /*
diff --git a/modules/other/gail/tests/ferret.c b/modules/other/gail/tests/ferret.c
index 2dfa914..6eb4b9a 100644
--- a/modules/other/gail/tests/ferret.c
+++ b/modules/other/gail/tests/ferret.c
@@ -574,10 +574,11 @@ _object_is_ours (AtkObject *aobject)
    */
    if (aobject != NULL)
      {
-       if (GTK_ACCESSIBLE(toplevel)->widget == mainWindow)
-         {
+       GtkWidget *widget;
+
+       widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (toplevel));
+       if (widget == mainWindow)
            return TRUE;
-         }
      }
 
   return FALSE;
@@ -615,6 +616,7 @@ ferret_get_name_from_container (AtkObject *aobject)
 static gint
 _print_object (AtkObject *aobject)
 {
+    GtkWidget *widget;
     G_CONST_RETURN gchar * parent_name = NULL;
     G_CONST_RETURN gchar * name = NULL;
     G_CONST_RETURN gchar * description = NULL;
@@ -654,11 +656,11 @@ _print_object (AtkObject *aobject)
         accel_name = "";
       }
 
-    if (GTK_IS_ACCESSIBLE (aobject) &&
-        GTK_IS_WIDGET (GTK_ACCESSIBLE (aobject)->widget))
+    widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (aobject));
+    if (widget)
       {
         _print_key_value(tab_n, group_num, "Widget name",
-          (gpointer)gtk_widget_get_name(GTK_ACCESSIBLE (aobject)->widget),
+          (gpointer)gtk_widget_get_name (widget),
           VALUE_STRING);
       }
     else
diff --git a/modules/other/gail/tests/testaction.c b/modules/other/gail/tests/testaction.c
index 4e13c59..2aaa81e 100644
--- a/modules/other/gail/tests/testaction.c
+++ b/modules/other/gail/tests/testaction.c
@@ -21,7 +21,7 @@ _check_object (AtkObject *obj)
   {
     GtkWidget* widget = NULL;
 
-    widget = GTK_ACCESSIBLE (obj)->widget;
+    widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
     typename = g_type_name (G_OBJECT_TYPE (widget));
     g_print ("Widget type name: %s\n", typename ? typename : "NULL");
   }
diff --git a/modules/other/gail/tests/testbutton.c b/modules/other/gail/tests/testbutton.c
index 1b8e16f..ea6d60e 100644
--- a/modules/other/gail/tests/testbutton.c
+++ b/modules/other/gail/tests/testbutton.c
@@ -63,7 +63,7 @@ _check_object (AtkObject *obj)
       return;
     }
     g_assert (GTK_IS_ACCESSIBLE (atk_button));
-    widget = GTK_ACCESSIBLE (atk_button)->widget;
+    widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_button));
     g_assert (GTK_IS_BUTTON (widget));
     g_signal_connect (GTK_OBJECT (widget),
                       "pressed",
diff --git a/modules/other/gail/tests/testcombo.c b/modules/other/gail/tests/testcombo.c
index f34a812..ca47eab 100644
--- a/modules/other/gail/tests/testcombo.c
+++ b/modules/other/gail/tests/testcombo.c
@@ -115,7 +115,7 @@ static void _check_combo_box (AtkObject *obj)
         GtkWidget *combo;
         GtkEntry *entry;
 
-        combo = GTK_ACCESSIBLE (combo_obj)->widget;
+        combo = gtk_accessible_get_widget (GTK_ACCESSIBLE (combo_obj));
         entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo)));
         gtk_editable_set_editable (GTK_EDITABLE (entry), FALSE);
       }
diff --git a/modules/other/gail/tests/testlib.c b/modules/other/gail/tests/testlib.c
index 06b879d..a3a99a9 100644
--- a/modules/other/gail/tests/testlib.c
+++ b/modules/other/gail/tests/testlib.c
@@ -110,7 +110,7 @@ find_object_by_name_and_role(AtkObject   *obj,
   if (obj == NULL)
     return NULL;
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
   if (GTK_IS_WIDGET (widget))
     {
       if (strcmp (name, gtk_widget_get_name(GTK_WIDGET (widget))) == 0)
@@ -133,7 +133,7 @@ find_object_by_name_and_role(AtkObject   *obj,
       if (child == NULL)
         continue;
 
-      widget = GTK_ACCESSIBLE (child)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (child));
       if (GTK_IS_WIDGET (widget))
         {
           if (strcmp(name, gtk_widget_get_name(GTK_WIDGET (widget))) == 0)
@@ -385,7 +385,7 @@ display_children_to_depth (AtkObject *obj,
     {
       GtkWidget *widget;
 
-      widget = GTK_ACCESSIBLE (obj)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
       g_print("name <%s>, ", gtk_widget_get_name(GTK_WIDGET (widget)));
     }
   else
diff --git a/modules/other/gail/tests/testmenuitem.c b/modules/other/gail/tests/testmenuitem.c
index e7c56ed..238abd9 100644
--- a/modules/other/gail/tests/testmenuitem.c
+++ b/modules/other/gail/tests/testmenuitem.c
@@ -52,7 +52,7 @@ _check_object (AtkObject *obj)
     }
 
     g_assert (GTK_IS_ACCESSIBLE (atk_menu_item));
-    widget = GTK_ACCESSIBLE (atk_menu_item)->widget;
+    widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_menu_item));
     g_assert (GTK_IS_MENU_ITEM (widget));
 
     if (first_time)
@@ -106,7 +106,9 @@ _check_object (AtkObject *obj)
       g_print ("Name: %s\n", accessible_name);
     else if (GTK_IS_ACCESSIBLE (obj))
     {
-      GtkWidget *widget = GTK_ACCESSIBLE (obj)->widget;
+      GtkWidget *widget;
+
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
       g_print ("Type: %s\n", g_type_name (G_OBJECT_TYPE (widget)));
     } 
   }
diff --git a/modules/other/gail/tests/testnotebook.c b/modules/other/gail/tests/testnotebook.c
index 5e8c690..321dd4d 100644
--- a/modules/other/gail/tests/testnotebook.c
+++ b/modules/other/gail/tests/testnotebook.c
@@ -23,7 +23,7 @@ static void _print_type (AtkObject *obj)
   {
     GtkWidget* widget = NULL;
 
-    widget = GTK_ACCESSIBLE (obj)->widget;
+    widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
     typename = g_type_name (G_OBJECT_TYPE (widget));
     g_print ("\tWidget type name: %s\n", typename ? typename : "NULL");
   }
@@ -162,9 +162,8 @@ static gint _remove_page (gpointer data)
   AtkObject *obj = ATK_OBJECT (data);
   GtkWidget *widget = NULL;
 
-  if (GTK_IS_ACCESSIBLE (obj))
-    widget = GTK_ACCESSIBLE (obj)->widget;
-     
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
+
   g_return_val_if_fail (GTK_IS_NOTEBOOK (widget), FALSE);
   gtk_notebook_remove_page (GTK_NOTEBOOK (widget), 4);
   return FALSE;
@@ -196,7 +195,7 @@ static gint _finish_selection (gpointer data)
   parent_object = atk_object_get_parent (selected);
   g_return_val_if_fail (ATK_IS_OBJECT (parent_object), FALSE);
   g_return_val_if_fail (parent_object == obj, FALSE);
-  parent_widget = GTK_ACCESSIBLE (parent_object)->widget;
+  parent_widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent_object));
   g_return_val_if_fail (GTK_IS_NOTEBOOK (parent_widget), FALSE);
   
   _print_type (selected);
diff --git a/modules/other/gail/tests/testobject.c b/modules/other/gail/tests/testobject.c
index 2c8d595..f0d67fa 100644
--- a/modules/other/gail/tests/testobject.c
+++ b/modules/other/gail/tests/testobject.c
@@ -53,7 +53,7 @@ static void _print_type (AtkObject *obj)
     {
       GtkWidget* widget = NULL;
 
-      widget = GTK_ACCESSIBLE (obj)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
       typename = g_type_name (G_OBJECT_TYPE (widget));
       g_print ("Widget type name: %s\n", typename ? typename : "NULL");
     }
@@ -154,7 +154,7 @@ static void _print_accessible (AtkObject *obj)
    */
   if (GTK_IS_ACCESSIBLE (obj))
     {
-      widget = GTK_ACCESSIBLE (obj)->widget;
+      widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
       ref_obj = atk_implementor_ref_accessible (ATK_IMPLEMENTOR (widget));
       g_assert (ref_obj == obj);
       g_object_unref (G_OBJECT (ref_obj));
diff --git a/modules/other/gail/tests/testpaned.c b/modules/other/gail/tests/testpaned.c
index 6935f41..3b2a7cb 100644
--- a/modules/other/gail/tests/testpaned.c
+++ b/modules/other/gail/tests/testpaned.c
@@ -55,7 +55,7 @@ static gint _test_paned (gpointer data)
   GtkWidget *widget;
   static gint times = 0;
 
-  widget = GTK_ACCESSIBLE (obj)->widget;
+  widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
 
   if (role == ATK_ROLE_SPLIT_PANE)
   {
diff --git a/modules/other/gail/tests/testselection.c b/modules/other/gail/tests/testselection.c
index 4cd90d5..ffce58a 100644
--- a/modules/other/gail/tests/testselection.c
+++ b/modules/other/gail/tests/testselection.c
@@ -57,7 +57,7 @@ static void _print_type (AtkObject *obj)
   {
     GtkWidget* widget = NULL;
 
-    widget = GTK_ACCESSIBLE (obj)->widget;
+    widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
     typename = g_type_name (G_OBJECT_TYPE (widget));
     g_print ("Widget type name: %s\n", typename ? typename : "NULL");
   }
diff --git a/modules/other/gail/tests/testtext.c b/modules/other/gail/tests/testtext.c
index ddc272f..c461006 100644
--- a/modules/other/gail/tests/testtext.c
+++ b/modules/other/gail/tests/testtext.c
@@ -42,12 +42,11 @@ static void _check_text (AtkObject *in_obj)
   else
   {
     GtkWidget *toplevel;
-    GtkWidget* widget = GTK_ACCESSIBLE (in_obj)->widget;
+    GtkWidget* widget;
 
+    widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (in_obj));
     if (widget == NULL)
-    {
       title = NULL;
-    }
 
     toplevel = gtk_widget_get_toplevel (widget);
     if (GTK_IS_WINDOW (toplevel) && GTK_WINDOW (toplevel)->title)



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