atspi: fix parent-child relationship for elm_list and elm_toolbar
authorPiotr Ganicz <p.ganicz@samsung.com>
Tue, 20 Sep 2016 21:46:11 +0000 (14:46 -0700)
committerCedric BAIL <cedric@osg.samsung.com>
Tue, 20 Sep 2016 22:01:48 +0000 (15:01 -0700)
Summary:
This patch provides proper parent-child relationship for elm_list and elm_toolbar
while atsapi_mode is set for icon and end element.

This patch is moved from:
    bf188e59431ad9c4ca877b2632884d3d430de6b1

Change-Id: Iae855aacf29bef3808a0b5ec159f46cbf0f4539d

Reviewers: stanluk, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4259

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/elementary/elm_list.c
src/lib/elementary/elm_toolbar.c

index e126500..9c0cbbc 100644 (file)
@@ -2301,6 +2301,12 @@ _item_new(Evas_Object *obj,
    VIEW(it) = edje_object_add(evas_object_evas_get(obj));
    edje_object_update_hints_set(VIEW(it), 1);
 
+   if (_elm_config->atspi_mode)
+   {
+       if (it->icon) elm_interface_atspi_accessible_parent_set(it->icon, eo_it);
+       if (it->end) elm_interface_atspi_accessible_parent_set(it->end, eo_it);
+   }
+
    /* access */
    if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
      _access_widget_item_register(it, EINA_TRUE);
index 767b8b5..f73fd59 100644 (file)
@@ -2492,6 +2492,9 @@ _item_new(Evas_Object *obj,
 
    icon_obj = elm_icon_add(VIEW(it));
 
+   if (_elm_config->atspi_mode)
+       if (icon_obj) elm_interface_atspi_accessible_parent_set(icon_obj, eo_it);
+
    if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
      _access_widget_item_register(it);