[gtk+/gtk-2-90-wip: 1/3] Remove uses of GtkCombo and gtk_widget_set_uposition in Gail
- From: Christian Dywan <cdywan src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-90-wip: 1/3] Remove uses of GtkCombo and gtk_widget_set_uposition in Gail
- Date: Wed, 9 Dec 2009 16:03:51 +0000 (UTC)
commit ca98d952139859c7a122014633ea76ccc2fb2721
Author: Christian Dywan <christian twotoasts de>
Date: Wed Dec 9 16:53:42 2009 +0100
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 | 38 ++++++++----------------------------
6 files changed, 11 insertions(+), 46 deletions(-)
---
diff --git a/modules/other/gail/gailentry.c b/modules/other/gail/gailentry.c
index ac1c4c9..7b1edbf 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 438cc25..1291a01 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 7f217e0..4b5b7d6 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 0a928c4..897bfec 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 c8ac919..daf71a6 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 9493fc4..1b0cc31 100644
--- a/modules/other/gail/gailwidget.c
+++ b/modules/other/gail/gailwidget.c
@@ -387,7 +387,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.
@@ -422,26 +422,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
@@ -782,7 +762,7 @@ gail_widget_set_extents (AtkComponent *component,
return FALSE;
gail_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
- if (GTK_WIDGET_TOPLEVEL (widget))
+ if (GTK_WIDGET_TOPLEVEL (widget) && GTK_IS_WINDOW (widget))
{
if (coord_type == ATK_XY_WINDOW)
{
@@ -796,14 +776,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;
}
@@ -826,7 +806,7 @@ gail_widget_set_position (AtkComponent *component,
return FALSE;
gail_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
- if (GTK_WIDGET_TOPLEVEL (widget))
+ if (GTK_WIDGET_TOPLEVEL (widget) && GTK_IS_WINDOW (widget))
{
if (coord_type == ATK_XY_WINDOW)
{
@@ -840,13 +820,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;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]