[gtk+/gtk-2-90: 44/146] Don't use deprecated classes in Gail



commit 7daab520598cf9f6a8a383fcb678b3e0138ba792
Author: Christian Dywan <christian twotoasts de>
Date:   Wed Oct 7 18:36:36 2009 +0200

    Don't use deprecated classes in Gail

 modules/other/gail/gail.c            |   17 +----------------
 modules/other/gail/gail.h            |    5 -----
 modules/other/gail/gailentry.c       |    1 -
 modules/other/gail/tests/testcombo.c |    4 +++-
 4 files changed, 4 insertions(+), 23 deletions(-)
---
diff --git a/modules/other/gail/gail.c b/modules/other/gail/gail.c
index 37e948d..403bac0 100644
--- a/modules/other/gail/gail.c
+++ b/modules/other/gail/gail.c
@@ -82,7 +82,6 @@ GAIL_IMPLEMENT_FACTORY_WITH_FUNC (GAIL_TYPE_MENU_ITEM, GailMenuItem, gail_menu_i
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_TOGGLE_BUTTON, GailToggleButton, gail_toggle_button, GTK_TYPE_TOGGLE_BUTTON)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_IMAGE, GailImage, gail_image, GTK_TYPE_IMAGE)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_TEXT_VIEW, GailTextView, gail_text_view, GTK_TYPE_TEXT_VIEW)
-GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_COMBO, GailCombo, gail_combo, GTK_TYPE_COMBO)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_COMBO_BOX, GailComboBox, gail_combo_box, GTK_TYPE_COMBO_BOX)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_ENTRY, GailEntry, gail_entry, GTK_TYPE_ENTRY)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_MENU_SHELL, GailMenuShell, gail_menu_shell, GTK_TYPE_MENU_SHELL)
@@ -91,7 +90,6 @@ GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_WINDOW, GailWindow, gail_window, GTK_TYPE_BIN)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_RANGE, GailRange, gail_range, GTK_TYPE_RANGE)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SCALE, GailScale, gail_scale, GTK_TYPE_SCALE)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SCALE_BUTTON, GailScaleButton, gail_scale_button, GTK_TYPE_SCALE_BUTTON)
-GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_CLIST, GailCList, gail_clist, GTK_TYPE_CLIST)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_LABEL, GailLabel, gail_label, GTK_TYPE_LABEL)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_STATUSBAR, GailStatusbar, gail_statusbar, GTK_TYPE_STATUSBAR)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_NOTEBOOK, GailNotebook, gail_notebook, GTK_TYPE_NOTEBOOK)
@@ -106,10 +104,8 @@ GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_PIXMAP, GailPixmap, gail_pixmap, GTK_TYPE_PIXM
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SEPARATOR, GailSeparator, gail_separator, GTK_TYPE_SEPARATOR)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_BOX, GailBox, gail_box, GTK_TYPE_BOX)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SCROLLED_WINDOW, GailScrolledWindow, gail_scrolled_window, GTK_TYPE_SCROLLED_WINDOW)
-GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_LIST, GailList, gail_list, GTK_TYPE_LIST)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_PANED, GailPaned, gail_paned, GTK_TYPE_PANED)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SCROLLBAR, GailScrollbar, gail_scrollbar, GTK_TYPE_SCROLLBAR)
-GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_OPTION_MENU, GailOptionMenu, gail_option_menu, GTK_TYPE_OPTION_MENU)
 GAIL_IMPLEMENT_FACTORY_WITH_FUNC (GAIL_TYPE_CHECK_MENU_ITEM, GailCheckMenuItem, gail_check_menu_item, gail_check_menu_item_new)
 GAIL_IMPLEMENT_FACTORY_WITH_FUNC (GAIL_TYPE_RADIO_MENU_ITEM, GailRadioMenuItem, gail_radio_menu_item, gail_radio_menu_item_new)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_EXPANDER, GailExpander, gail_expander, GTK_TYPE_EXPANDER)
@@ -132,14 +128,7 @@ gail_get_accessible_for_widget (GtkWidget *widget,
     return NULL;
 
   if (GTK_IS_ENTRY (widget))
-    {
-      GtkWidget *other_widget = widget->parent;
-      if (GTK_IS_COMBO (other_widget))
-        {
-          gail_set_focus_widget (other_widget, widget);
-          widget = other_widget;
-        }
-    } 
+    ;
   else if (GTK_IS_NOTEBOOK (widget)) 
     {
       GtkNotebook *notebook;
@@ -896,7 +885,6 @@ gail_accessibility_module_init (void)
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_TOGGLE_BUTTON, gail_toggle_button);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_IMAGE, gail_image);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_TEXT_VIEW, gail_text_view);
-  GAIL_WIDGET_SET_FACTORY (GTK_TYPE_COMBO, gail_combo);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_COMBO_BOX, gail_combo_box);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_ENTRY, gail_entry);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_MENU_BAR, gail_menu_shell);
@@ -905,7 +893,6 @@ gail_accessibility_module_init (void)
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_RANGE, gail_range);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_SCALE, gail_scale);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_SCALE_BUTTON, gail_scale_button);
-  GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CLIST, gail_clist);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_LABEL, gail_label);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_STATUSBAR, gail_statusbar);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_NOTEBOOK, gail_notebook);
@@ -924,10 +911,8 @@ gail_accessibility_module_init (void)
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_SEPARATOR, gail_separator);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_BOX, gail_box);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_SCROLLED_WINDOW, gail_scrolled_window);
-  GAIL_WIDGET_SET_FACTORY (GTK_TYPE_LIST, gail_list);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_PANED, gail_paned);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_SCROLLBAR, gail_scrollbar);
-  GAIL_WIDGET_SET_FACTORY (GTK_TYPE_OPTION_MENU, gail_option_menu);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CHECK_MENU_ITEM, gail_check_menu_item);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_RADIO_MENU_ITEM, gail_radio_menu_item);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_EXPANDER, gail_expander);
diff --git a/modules/other/gail/gail.h b/modules/other/gail/gail.h
index 97da104..3400731 100644
--- a/modules/other/gail/gail.h
+++ b/modules/other/gail/gail.h
@@ -6,9 +6,6 @@
 #include <gail/gailcalendar.h>
 #include <gail/gailcell.h>
 #include <gail/gailcheckmenuitem.h>
-#include <gail/gailclist.h>
-#include <gail/gailclistcell.h>
-#include <gail/gailcombo.h>
 #include <gail/gailcombobox.h>
 #include <gail/gailcontainer.h>
 #include <gail/gailcontainercell.h>
@@ -19,13 +16,11 @@
 #include <gail/gailimagecell.h>
 #include <gail/gailitem.h>
 #include <gail/gaillabel.h>
-#include <gail/gaillist.h>
 #include <gail/gailmenu.h>
 #include <gail/gailmenushell.h>
 #include <gail/gailmenuitem.h>
 #include <gail/gailnotebook.h>
 #include <gail/gailobject.h>
-#include <gail/gailoptionmenu.h>
 #include <gail/gailpaned.h>
 #include <gail/gailpixmap.h>
 #include <gail/gailprogressbar.h>
diff --git a/modules/other/gail/gailentry.c b/modules/other/gail/gailentry.c
index 5a7ba4a..ac1c4c9 100644
--- a/modules/other/gail/gailentry.c
+++ b/modules/other/gail/gailentry.c
@@ -23,7 +23,6 @@
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 #include "gailentry.h"
-#include "gailcombo.h"
 #include "gailcombobox.h"
 #include <libgail-util/gailmisc.h>
 
diff --git a/modules/other/gail/tests/testcombo.c b/modules/other/gail/tests/testcombo.c
index 7291fa0..03d5381 100644
--- a/modules/other/gail/tests/testcombo.c
+++ b/modules/other/gail/tests/testcombo.c
@@ -114,9 +114,11 @@ static void _check_combo_box (AtkObject *obj)
       }
       if (g_getenv ("TEST_ACCESSIBLE_COMBO_NOEDIT") != NULL)
       {
+        GtkWidget *combo;
         GtkEntry *entry;
 
-        entry = GTK_ENTRY (GTK_COMBO (GTK_ACCESSIBLE (combo_obj)->widget)->entry);
+        combo = GTK_ACCESSIBLE (combo_obj)->widget;
+        entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo)));
         gtk_entry_set_editable (entry, FALSE);
       }
       _check_children (combo_obj);



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