[gtk+/a11y] Set accessible parents of notebook children
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/a11y] Set accessible parents of notebook children
- Date: Sun, 3 Jul 2011 19:11:01 +0000 (UTC)
commit cbaa52ae3c79859471a20d5bc56f73d21a21ee46
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jul 3 15:06:44 2011 -0400
Set accessible parents of notebook children
Explicitly set the notebook page object as the accessible parent
of the page, otherwise, AtkObject follows the widget parents chain
and makes the notebook accessible the parent.
gtk/a11y/gtknotebookpageaccessible.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/a11y/gtknotebookpageaccessible.c b/gtk/a11y/gtknotebookpageaccessible.c
index 3e3dfc2..3b4aaec 100644
--- a/gtk/a11y/gtknotebookpageaccessible.c
+++ b/gtk/a11y/gtknotebookpageaccessible.c
@@ -238,6 +238,8 @@ gtk_notebook_page_accessible_new (GtkNotebookAccessible *notebook,
atk_object->role = ATK_ROLE_PAGE_TAB;
atk_object->layer = ATK_LAYER_WIDGET;
+ atk_object_set_parent (gtk_widget_get_accessible (child), atk_object);
+
g_signal_connect (gtk_accessible_get_widget (page->notebook),
"child-notify::tab-label",
G_CALLBACK (notify_tab_label), page);
@@ -258,6 +260,7 @@ gtk_notebook_page_accessible_invalidate (GtkNotebookPageAccessible *page)
atk_object_notify_state_change (obj, ATK_STATE_DEFUNCT, TRUE);
atk_object_set_parent (obj, NULL);
page->notebook = NULL;
+ atk_object_set_parent (gtk_widget_get_accessible (page->child), NULL);
page->child = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]