Merge lp:~rodrigo-moya/unity/fix-732049 into lp:unity

Proposed by Rodrigo Moya
Status: Merged
Approved by: Rodrigo Moya
Approved revision: no longer in the source branch.
Merged at revision: 947
Proposed branch: lp:~rodrigo-moya/unity/fix-732049
Merge into: lp:unity
Diff against target: 74 lines (+15/-9)
3 files modified
services/panel-indicator-accessible.c (+7/-5)
services/panel-indicator-entry-accessible.c (+4/-1)
services/panel-root-accessible.c (+4/-3)
To merge this branch: bzr merge lp:~rodrigo-moya/unity/fix-732049
Reviewer Review Type Date Requested Status
Alejandro Piñeiro (community) Approve
Review via email: mp+53232@code.launchpad.net

Description of the change

Set the correct ATK parent on A11Y objects

To post a comment you must log in.
Revision history for this message
Alejandro Piñeiro (apinheiro) wrote :

Seems ok to me

review: Approve
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Neil gave his +1 on IRC

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'services/panel-indicator-accessible.c'
2--- services/panel-indicator-accessible.c 2011-02-28 15:51:27 +0000
3+++ services/panel-indicator-accessible.c 2011-03-14 12:29:10 +0000
4@@ -107,8 +107,9 @@
5 accessible = panel_indicator_entry_accessible_new (entry);
6 if (accessible != NULL)
7 {
8+ atk_object_set_parent (accessible, ATK_OBJECT (pia));
9 pia->priv->a11y_children = g_slist_append (pia->priv->a11y_children, accessible);
10- g_signal_emit_by_name (ATK_OBJECT (pia), "children-changed",
11+ g_signal_emit_by_name (ATK_OBJECT (pia), "children-changed::add",
12 g_slist_length (pia->priv->a11y_children) - 1,
13 accessible);
14 }
15@@ -128,7 +129,7 @@
16 if (entry == panel_indicator_entry_accessible_get_entry (PANEL_INDICATOR_ENTRY_ACCESSIBLE (accessible)))
17 {
18 pia->priv->a11y_children = g_slist_remove (pia->priv->a11y_children, accessible);
19- g_signal_emit_by_name (ATK_OBJECT (pia), "children-changed",
20+ g_signal_emit_by_name (ATK_OBJECT (pia), "children-changed::remove",
21 count, accessible);
22
23 g_object_unref (accessible);
24@@ -162,11 +163,12 @@
25 entries = indicator_object_get_entries (pia->priv->indicator);
26 for (l = entries; l != NULL; l = l->next)
27 {
28- AtkObject *accessible;
29+ AtkObject *child;
30 IndicatorObjectEntry *entry = (IndicatorObjectEntry *) l->data;
31
32- accessible = panel_indicator_entry_accessible_new (entry);
33- pia->priv->a11y_children = g_slist_append (pia->priv->a11y_children, accessible);
34+ child = panel_indicator_entry_accessible_new (entry);
35+ atk_object_set_parent (child, accessible);
36+ pia->priv->a11y_children = g_slist_append (pia->priv->a11y_children, child);
37 }
38
39 g_list_free (entries);
40
41=== modified file 'services/panel-indicator-entry-accessible.c'
42--- services/panel-indicator-entry-accessible.c 2011-02-28 15:51:27 +0000
43+++ services/panel-indicator-entry-accessible.c 2011-03-14 12:29:10 +0000
44@@ -192,7 +192,10 @@
45
46 piea = PANEL_INDICATOR_ENTRY_ACCESSIBLE (accessible);
47 if (GTK_IS_MENU (piea->priv->entry->menu))
48- child = gtk_widget_get_accessible (GTK_WIDGET (piea->priv->entry->menu));
49+ {
50+ child = gtk_widget_get_accessible (GTK_WIDGET (piea->priv->entry->menu));
51+ atk_object_set_parent (child, accessible);
52+ }
53
54 return child;
55 }
56
57=== modified file 'services/panel-root-accessible.c'
58--- services/panel-root-accessible.c 2011-02-14 10:53:27 +0000
59+++ services/panel-root-accessible.c 2011-03-14 12:29:10 +0000
60@@ -118,10 +118,11 @@
61 indicator = panel_service_get_indicator (root->priv->service, i);
62 if (indicator != NULL)
63 {
64- AtkObject *accessible;
65+ AtkObject *child;
66
67- accessible = panel_indicator_accessible_new (indicator);
68- root->priv->a11y_children = g_slist_append (root->priv->a11y_children, accessible);
69+ child = panel_indicator_accessible_new (indicator);
70+ atk_object_set_parent (child, accessible);
71+ root->priv->a11y_children = g_slist_append (root->priv->a11y_children, child);
72 }
73 }
74 }