]> Pileus Git - ~andy/gtk/blobdiff - modules/other/gail/gailcombobox.c
Don't use old GtkComboBoxEntry in gail
[~andy/gtk] / modules / other / gail / gailcombobox.c
index f7dc403f3317d408c3875e603b16342b14651ff5..26dd6b0e40905c10851cb272a3e5556f6d11f82e 100644 (file)
@@ -116,7 +116,7 @@ gail_combo_box_real_initialize (AtkObject *obj,
       atk_object_set_parent (popup, obj);
       gail_combo_box->popup_set = TRUE;
     }
-  if (GTK_IS_COMBO_BOX_ENTRY (combo_box))
+  if (gtk_combo_box_get_has_entry (combo_box))
     atk_object_set_parent (gtk_widget_get_accessible (gtk_bin_get_child (GTK_BIN (combo_box))), obj);
 
   obj->role = ATK_ROLE_COMBO_BOX;
@@ -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
@@ -214,7 +215,7 @@ gail_combo_box_get_n_children (AtkObject* obj)
     return 0;
 
   n_children++;
-  if (GTK_IS_COMBO_BOX_ENTRY (widget))
+  if (gtk_combo_box_get_has_entry (GTK_COMBO_BOX (widget)))
     n_children ++;
 
   return n_children;
@@ -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)
     /*
@@ -248,7 +249,7 @@ gail_combo_box_ref_child (AtkObject *obj,
           box->popup_set = TRUE;
         }
     }
-  else if (i == 1 && GTK_IS_COMBO_BOX_ENTRY (widget))
+  else if (i == 1 && gtk_combo_box_get_has_entry (GTK_COMBO_BOX (widget)))
     {
       child = gtk_widget_get_accessible (gtk_bin_get_child (GTK_BIN (widget)));
     }
@@ -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,16 +386,13 @@ 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))
          {
              key_val = gtk_label_get_mnemonic_keyval (GTK_LABEL (label));
-            if (key_val != GDK_VoidSymbol)
+            if (key_val != GDK_KEY_VoidSymbol)
              return_value = gtk_accelerator_name (key_val, GDK_MOD1_MASK);
          }
           g_free (combo_box->press_keybinding);
@@ -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