From 6216ce2dfd5a1c3f66e0974ed71af7e0b74d3133 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Wed, 9 Dec 2009 16:53:42 +0100 Subject: [PATCH] Remove uses of GtkCombo and gtk_widget_set_uposition in Gail --- modules/other/gail/gailentry.c | 3 +-- modules/other/gail/gailitem.c | 7 ------- modules/other/gail/gaillabel.c | 4 ---- modules/other/gail/gailmenu.c | 2 +- modules/other/gail/gailtoplevel.c | 3 --- modules/other/gail/gailwidget.c | 34 +++++++------------------------ 6 files changed, 9 insertions(+), 44 deletions(-) diff --git a/modules/other/gail/gailentry.c b/modules/other/gail/gailentry.c index d410fc25ad..cfe724b1b3 100644 --- a/modules/other/gail/gailentry.c +++ b/modules/other/gail/gailentry.c @@ -360,8 +360,7 @@ gail_entry_get_index_in_parent (AtkObject *accessible) * otherwise do the normal thing. */ if (accessible->accessible_parent) - if (GAIL_IS_COMBO (accessible->accessible_parent) || - GAIL_IS_COMBO_BOX (accessible->accessible_parent)) + if (GAIL_IS_COMBO_BOX (accessible->accessible_parent)) return 1; return ATK_OBJECT_CLASS (gail_entry_parent_class)->get_index_in_parent (accessible); diff --git a/modules/other/gail/gailitem.c b/modules/other/gail/gailitem.c index 308e1618de..a5a1489c82 100644 --- a/modules/other/gail/gailitem.c +++ b/modules/other/gail/gailitem.c @@ -233,13 +233,6 @@ gail_item_get_name (AtkObject *obj) if (GTK_IS_MENU (parent)) { attach = gtk_menu_get_attach_widget (GTK_MENU (parent)); - - if (GTK_IS_OPTION_MENU (attach)) - { - label = get_label_from_container (attach); - if (GTK_IS_LABEL (label)) - return gtk_label_get_text (GTK_LABEL(label)); - } list = gtk_container_get_children (GTK_CONTAINER (parent)); index = g_list_index (list, widget); diff --git a/modules/other/gail/gaillabel.c b/modules/other/gail/gaillabel.c index b7e06eb45b..6653e72424 100644 --- a/modules/other/gail/gaillabel.c +++ b/modules/other/gail/gaillabel.c @@ -513,10 +513,6 @@ gail_label_ref_relation_set (AtkObject *obj) temp_widget = GTK_WIDGET (list->data); g_list_free (list); list = gtk_container_get_children (GTK_CONTAINER (temp_widget)); - if (GTK_IS_COMBO (list->data)) - { - mnemonic_widget = GTK_WIDGET (list->data); - } } } g_list_free (list); diff --git a/modules/other/gail/gailmenu.c b/modules/other/gail/gailmenu.c index 0a928c4cc4..897bfec415 100644 --- a/modules/other/gail/gailmenu.c +++ b/modules/other/gail/gailmenu.c @@ -92,7 +92,7 @@ gail_menu_get_parent (AtkObject *accessible) */ parent_widget = gtk_menu_get_attach_widget (GTK_MENU (widget)); - if (!GTK_IS_MENU_ITEM (parent_widget) && !GTK_IS_BUTTON (parent_widget) && !GTK_IS_COMBO_BOX (parent_widget) && !GTK_IS_OPTION_MENU (parent_widget)) + if (!GTK_IS_MENU_ITEM (parent_widget) && !GTK_IS_BUTTON (parent_widget) && !GTK_IS_COMBO_BOX (parent_widget)) parent_widget = widget->parent; if (parent_widget == NULL) diff --git a/modules/other/gail/gailtoplevel.c b/modules/other/gail/gailtoplevel.c index 7f458fbd82..422b97f38f 100644 --- a/modules/other/gail/gailtoplevel.c +++ b/modules/other/gail/gailtoplevel.c @@ -335,7 +335,6 @@ is_attached_menu_window (GtkWidget *widget) attach = gtk_menu_get_attach_widget (GTK_MENU (child)); /* Allow for menu belonging to the Panel Menu, which is a GtkButton */ if (GTK_IS_MENU_ITEM (attach) || - GTK_IS_OPTION_MENU (attach) || GTK_IS_BUTTON (attach)) ret = TRUE; } @@ -365,8 +364,6 @@ is_combo_window (GtkWidget *widget) obj = gtk_widget_get_accessible (child); obj = atk_object_get_parent (obj); accessible = GTK_ACCESSIBLE (obj); - if (GTK_IS_COMBO (accessible->widget)) - return TRUE; return FALSE; } diff --git a/modules/other/gail/gailwidget.c b/modules/other/gail/gailwidget.c index 4bd31ddf5a..20b5573990 100644 --- a/modules/other/gail/gailwidget.c +++ b/modules/other/gail/gailwidget.c @@ -382,7 +382,7 @@ gail_widget_ref_relation_set (AtkObject *obj) relation_set = ATK_OBJECT_CLASS (gail_widget_parent_class)->ref_relation_set (obj); - if (GTK_IS_BOX (widget) && !GTK_IS_COMBO (widget)) + if (GTK_IS_BOX (widget)) /* * Do not report labelled-by for a GtkBox which could be a * GnomeFileEntry. @@ -417,26 +417,6 @@ gail_widget_ref_relation_set (AtkObject *obj) } } } - else if (GTK_IS_COMBO (widget)) - /* - * Handle the case when GnomeFileEntry is the mnemonic widget. - * The GnomeEntry which is a grandchild of the GnomeFileEntry - * should be the mnemonic widget. See bug #137584. - */ - { - GtkWidget *temp_widget; - - temp_widget = gtk_widget_get_parent (widget); - - if (GTK_IS_HBOX (temp_widget)) - { - temp_widget = gtk_widget_get_parent (temp_widget); - if (GTK_IS_BOX (temp_widget)) - { - label = find_label (temp_widget); - } - } - } else if (GTK_IS_COMBO_BOX (widget)) /* * Handle the case when GtkFileChooserButton is the mnemonic @@ -791,14 +771,14 @@ gail_widget_set_extents (AtkComponent *component, return FALSE; else { - gtk_widget_set_uposition (widget, x_current, y_current); + gtk_window_move (GTK_WINDOW (widget), x_current, y_current); gtk_widget_set_size_request (widget, width, height); return TRUE; } } else if (coord_type == ATK_XY_SCREEN) - { - gtk_widget_set_uposition (widget, x, y); + { + gtk_window_move (GTK_WINDOW (widget), x, y); gtk_widget_set_size_request (widget, width, height); return TRUE; } @@ -835,13 +815,13 @@ gail_widget_set_position (AtkComponent *component, return FALSE; else { - gtk_widget_set_uposition (widget, x_current, y_current); + gtk_window_move (GTK_WINDOW (widget), x_current, y_current); return TRUE; } } else if (coord_type == ATK_XY_SCREEN) - { - gtk_widget_set_uposition (widget, x, y); + { + gtk_window_move (GTK_WINDOW (widget), x, y); return TRUE; } }