summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Olshevskyi <i.olshevskyi@samsung.com>2017-10-19 09:52:28 +0300
committerIgor Olshevskyi <i.olshevskyi@samsung.com>2017-10-19 09:52:28 +0300
commit09e42c710836c0d93528e164f4942c3309db9108 (patch)
tree72764638ac56a0f3059452aa0808dc90d12eb50c
parent373b3ec5f0c8034a6f3bbe97758c90718d714117 (diff)
downloadapptray-widget-09e42c710836c0d93528e164f4942c3309db9108.tar.gz
apptray-widget-09e42c710836c0d93528e164f4942c3309db9108.tar.bz2
apptray-widget-09e42c710836c0d93528e164f4942c3309db9108.zip
TizenRefApp-9546 Wrong focus on Add app shortcuts screen
Change-Id: Ibeea40339b3590ec6dec347f2341c33a7062aeb0
-rw-r--r--apptray-widget-app/inc/apptray_wgt_app_accessibility_utils.h6
-rw-r--r--apptray-widget-app/src/apptray_wgt_app_accessibility_utils.c16
-rw-r--r--apptray-widget/inc/apptray_widget_accessibility_utils.h9
-rwxr-xr-xapptray-widget/src/apptray_widget.c29
-rw-r--r--apptray-widget/src/apptray_widget_accessibility_utils.c16
5 files changed, 48 insertions, 28 deletions
diff --git a/apptray-widget-app/inc/apptray_wgt_app_accessibility_utils.h b/apptray-widget-app/inc/apptray_wgt_app_accessibility_utils.h
index 8404d41..468f3db 100644
--- a/apptray-widget-app/inc/apptray_wgt_app_accessibility_utils.h
+++ b/apptray-widget-app/inc/apptray_wgt_app_accessibility_utils.h
@@ -32,9 +32,11 @@ Evas_Object *apptray_wgt_app_au_register_access_object(Evas_Object *parent,
/**
* @brief Unregisters accessible object
- * @param[in] obj Accessible object to unregister
+ * @param[in] ly Layout from which part for creation accessible object was taken
+ * @param[in] ly_part Part of layout for creation accessible object
*/
-void apptray_wgt_app_au_unregister_access_object(Evas_Object *obj);
+void apptray_wgt_app_au_unregister_access_object(Evas_Object *ly,
+ const char *ly_part);
/**
* @brief Registers fake first accessible object
diff --git a/apptray-widget-app/src/apptray_wgt_app_accessibility_utils.c b/apptray-widget-app/src/apptray_wgt_app_accessibility_utils.c
index b518c85..4929c0d 100644
--- a/apptray-widget-app/src/apptray_wgt_app_accessibility_utils.c
+++ b/apptray-widget-app/src/apptray_wgt_app_accessibility_utils.c
@@ -37,6 +37,14 @@ static Evas_Object *_register_access_object(Evas_Object *parent,
return ao;
}
+static void _unregister_access_object(Evas_Object *ly,
+ const char *ly_part)
+{
+ Evas_Object *po = (Evas_Object *)edje_object_part_object_get(
+ elm_layout_edje_get(ly), ly_part);
+ elm_access_object_unregister(po);
+}
+
Evas_Object *apptray_wgt_app_au_register_access_object(Evas_Object *parent,
Evas_Object *ly, const char *ly_part)
{
@@ -47,11 +55,13 @@ Evas_Object *apptray_wgt_app_au_register_access_object(Evas_Object *parent,
return _register_access_object(parent, ly, ly_part);
}
-void apptray_wgt_app_au_unregister_access_object(Evas_Object *obj)
+void apptray_wgt_app_au_unregister_access_object(Evas_Object *ly,
+ const char *ly_part)
{
- ret_if(!obj);
+ ret_if(!ly);
+ ret_if(!ly_part);
- elm_access_object_unregister(obj);
+ _unregister_access_object(ly, ly_part);
}
Evas_Object *apptray_wgt_app_au_register_fake_access_object(
diff --git a/apptray-widget/inc/apptray_widget_accessibility_utils.h b/apptray-widget/inc/apptray_widget_accessibility_utils.h
index 1d981a2..a31d30d 100644
--- a/apptray-widget/inc/apptray_widget_accessibility_utils.h
+++ b/apptray-widget/inc/apptray_widget_accessibility_utils.h
@@ -26,12 +26,15 @@
* @param[in] ly_part Part of layout for creation accessible object
* @return Accessible object on success or NULL otherwise
*/
-Evas_Object *apptray_wgt_au_register_access_object(Evas_Object *parent, Evas_Object *ly, const char *ly_part);
+Evas_Object *apptray_wgt_au_register_access_object(Evas_Object *parent,
+ Evas_Object *ly, const char *ly_part);
/**
* @brief Unregisters accessible object
- * @param[in] obj Accessible object to unregister
+ * @param[in] ly Layout from which part for creation accessible object was taken
+ * @param[in] ly_part Part of layout for creation accessible object
*/
-void apptray_wgt_au_unregister_access_object(Evas_Object *obj);
+void apptray_wgt_au_unregister_access_object(Evas_Object *ly,
+ const char *ly_part);
#endif /* __APPTRAY_WIDGET_ACCESSIBILITY_UTILS_H__ */
diff --git a/apptray-widget/src/apptray_widget.c b/apptray-widget/src/apptray_widget.c
index c45b297..f6ad857 100755
--- a/apptray-widget/src/apptray_widget.c
+++ b/apptray-widget/src/apptray_widget.c
@@ -64,6 +64,7 @@ struct _instance {
Evas_Object *win;
Evas_Object *bg;
Evas_Object *layout;
+ Evas_Object *add_apps_ly;
struct _slot slot[ATW_SLOTS_MAX_COUNT];
char *content_app_list[ATW_SLOTS_MAX_COUNT];
bundle *content;
@@ -158,8 +159,7 @@ static void _update_slot_access_object_info(_slot_h slot);
static Eina_Bool _slot_access_object_activate_cb(void *data, Evas_Object *obj,
Elm_Access_Action_Info *action_info);
-static void _create_add_apps_layout_access_object(_instance_h instance,
- Evas_Object *layout);
+static void _create_add_apps_layout_access_object(_instance_h instance);
static void _destroy_add_apps_layout_access_object(_instance_h instance);
static Eina_Bool _add_apps_access_object_activate_cb(void *data,
Evas_Object *obj, Elm_Access_Action_Info *action_info);
@@ -657,10 +657,8 @@ static void _reset_slot(_instance_h instance, int index)
snprintf(index_str, sizeof(index_str), "slot_%d", index + 1);
elm_object_part_content_unset(instance->layout, index_str);
- if (instance->slot[index].ao) {
- apptray_wgt_au_unregister_access_object(instance->slot[index].ao);
- instance->slot[index].ao = NULL;
- }
+ apptray_wgt_au_unregister_access_object(instance->slot[index].eo, "ao_icon");
+ instance->slot[index].ao = NULL;
DEL_EVAS_OBJECT(instance->slot[index].eo);
_EXIT;
@@ -835,13 +833,11 @@ static Eina_Bool _add_apps_access_object_activate_cb(void *data,
/**
* @brief Creates Add application access object
* @param[in] instance Instance handle
- * @param[in] layout Access object parent
*/
-static void _create_add_apps_layout_access_object(_instance_h instance,
- Evas_Object *layout)
+static void _create_add_apps_layout_access_object(_instance_h instance)
{
Evas_Object *ao = apptray_wgt_au_register_access_object(instance->layout,
- layout, "ao_icon");
+ instance->add_apps_ly, "ao_icon");
ret_if(!ao);
elm_atspi_accessible_translation_domain_set(ao, ATW_DOMAIN);
@@ -861,11 +857,11 @@ static void _create_add_apps_layout_access_object(_instance_h instance,
*/
static void _destroy_add_apps_layout_access_object(_instance_h instance)
{
- if (!instance->ao_add_app) {
+ if (!instance->add_apps_ly) {
return;
}
- apptray_wgt_au_unregister_access_object(instance->ao_add_app);
+ apptray_wgt_au_unregister_access_object(instance->add_apps_ly, "ao_icon");
instance->ao_add_app = NULL;
}
@@ -902,7 +898,9 @@ static void _create_add_apps_layout(_instance_h instance)
elm_object_part_content_set(instance->layout, "add_apps", eo);
evas_object_show(eo);
- _create_add_apps_layout_access_object(instance, eo);
+ instance->add_apps_ly = eo;
+
+ _create_add_apps_layout_access_object(instance);
_update_add_apps_access_object_info(instance);
}
@@ -912,12 +910,9 @@ static void _create_add_apps_layout(_instance_h instance)
*/
static void _destroy_add_apps_layout(_instance_h instance)
{
- Evas_Object *eo = NULL;
-
_destroy_add_apps_layout_access_object(instance);
- eo = elm_object_part_content_unset(instance->layout, "add_apps");
- DEL_EVAS_OBJECT(eo);
+ DEL_EVAS_OBJECT(instance->add_apps_ly);
}
/**
diff --git a/apptray-widget/src/apptray_widget_accessibility_utils.c b/apptray-widget/src/apptray_widget_accessibility_utils.c
index 71cb08d..a5c2ca9 100644
--- a/apptray-widget/src/apptray_widget_accessibility_utils.c
+++ b/apptray-widget/src/apptray_widget_accessibility_utils.c
@@ -33,6 +33,14 @@ static Evas_Object *_register_access_object(Evas_Object *parent,
return ao;
}
+static void _unregister_access_object(Evas_Object *ly,
+ const char *ly_part)
+{
+ Evas_Object *po = (Evas_Object *)edje_object_part_object_get(
+ elm_layout_edje_get(ly), ly_part);
+ elm_access_object_unregister(po);
+}
+
Evas_Object *apptray_wgt_au_register_access_object(Evas_Object *parent,
Evas_Object *ly, const char *ly_part)
{
@@ -43,9 +51,11 @@ Evas_Object *apptray_wgt_au_register_access_object(Evas_Object *parent,
return _register_access_object(parent, ly, ly_part);
}
-void apptray_wgt_au_unregister_access_object(Evas_Object *obj)
+void apptray_wgt_au_unregister_access_object(Evas_Object *ly,
+ const char *ly_part)
{
- ret_if(!obj);
+ ret_if(!ly);
+ ret_if(!ly_part);
- elm_access_object_unregister(obj);
+ _unregister_access_object(ly, ly_part);
}