summaryrefslogtreecommitdiff
path: root/src/lib/elm_toolbar.c
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2015-12-01 16:55:12 +0100
committerLukasz Stanislawski <l.stanislaws@samsung.com>2015-12-02 11:43:58 +0100
commit0aa37178abc4409a647bbf321a346bc5c7cbf261 (patch)
tree7c9bc90691183ed23f1e138ca77c420dde44f565 /src/lib/elm_toolbar.c
parentcfc7b806193c67b79f3fb86468b5ce6ed9929aac (diff)
atspi: always use widget's subobj as accessible children
Patch fixes issue when widgets could be orphaned in accessibility tree due to overloaded accessible_children_get methods in widgets returning Elm_Object_Items. Widgets like genlist, gengrid, list and toolbar returned only items as its accessibility children so if some widget was attached directly to those widgets (like ctxpopup/popup) it become orphaned in accessibility tree.
Diffstat (limited to 'src/lib/elm_toolbar.c')
-rw-r--r--src/lib/elm_toolbar.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 024493927..4fc055bc1 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -2370,6 +2370,7 @@ _item_new(Evas_Object *obj,
2370 2370
2371 VIEW(it) = elm_layout_add(obj); 2371 VIEW(it) = elm_layout_add(obj);
2372 evas_object_data_set(VIEW(it), "item", it); 2372 evas_object_data_set(VIEW(it), "item", it);
2373 eo_do(VIEW(it), elm_interface_atspi_accessible_type_set(ELM_ATSPI_TYPE_DISABLED));
2373 2374
2374 icon_obj = elm_icon_add(VIEW(it)); 2375 icon_obj = elm_icon_add(VIEW(it));
2375 elm_icon_order_lookup_set(icon_obj, sd->lookup_order); 2376 elm_icon_order_lookup_set(icon_obj, sd->lookup_order);
@@ -2377,9 +2378,6 @@ _item_new(Evas_Object *obj,
2377 if (_elm_config->access_mode == ELM_ACCESS_MODE_ON) 2378 if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
2378 _access_widget_item_register(it); 2379 _access_widget_item_register(it);
2379 2380
2380 eo_do(icon_obj, elm_interface_atspi_accessible_parent_set(VIEW(it)));
2381 eo_do(VIEW(it), elm_interface_atspi_accessible_parent_set(eo_it));
2382
2383 if (_item_icon_set(icon_obj, "toolbar/", icon)) 2381 if (_item_icon_set(icon_obj, "toolbar/", icon))
2384 { 2382 {
2385 it->icon = icon_obj; 2383 it->icon = icon_obj;
@@ -2758,6 +2756,7 @@ _elm_toolbar_evas_object_smart_add(Eo *obj, Elm_Toolbar_Data *priv)
2758 else 2756 else
2759 elm_object_signal_emit(priv->more, "elm,orient,horizontal", "elm"); 2757 elm_object_signal_emit(priv->more, "elm,orient,horizontal", "elm");
2760 2758
2759 eo_do(priv->more, elm_interface_atspi_accessible_type_set(ELM_ATSPI_TYPE_DISABLED));
2761 elm_widget_sub_object_add(obj, priv->more); 2760 elm_widget_sub_object_add(obj, priv->more);
2762 evas_object_show(priv->more); 2761 evas_object_show(priv->more);
2763 2762
@@ -3850,24 +3849,22 @@ _elm_toolbar_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUS
3850EOLIAN static Eina_List* 3849EOLIAN static Eina_List*
3851_elm_toolbar_elm_interface_atspi_accessible_children_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd) 3850_elm_toolbar_elm_interface_atspi_accessible_children_get(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd)
3852{ 3851{
3853 Eina_List *ret = NULL; 3852 Eina_List *ret = NULL, *ret2 = NULL;
3854 Elm_Toolbar_Item_Data *it; 3853 Elm_Toolbar_Item_Data *it;
3854 eo_do_super(obj, ELM_TOOLBAR_CLASS, ret2 = elm_interface_atspi_accessible_children_get());
3855 3855
3856 EINA_INLIST_FOREACH(sd->items, it) 3856 EINA_INLIST_FOREACH(sd->items, it)
3857 ret = eina_list_append(ret, EO_OBJ(it)); 3857 ret = eina_list_append(ret, EO_OBJ(it));
3858 3858
3859 return ret; 3859 return eina_list_merge(ret, ret2);
3860} 3860}
3861 3861
3862EOLIAN static Elm_Atspi_State_Set 3862EOLIAN static Elm_Atspi_State_Set
3863_elm_toolbar_elm_interface_atspi_accessible_state_set_get(Eo *obj, Elm_Toolbar_Data *sd EINA_UNUSED) 3863_elm_toolbar_elm_interface_atspi_accessible_state_set_get(Eo *obj, Elm_Toolbar_Data *sd EINA_UNUSED)
3864{ 3864{
3865 Elm_Atspi_State_Set ret; 3865 Elm_Atspi_State_Set ret;
3866
3867 eo_do_super(obj, ELM_TOOLBAR_CLASS, ret = elm_interface_atspi_accessible_state_set_get()); 3866 eo_do_super(obj, ELM_TOOLBAR_CLASS, ret = elm_interface_atspi_accessible_state_set_get());
3868 3867
3869 STATE_TYPE_SET(ret, ELM_ATSPI_STATE_MANAGES_DESCENDANTS);
3870
3871 return ret; 3868 return ret;
3872} 3869}
3873 3870