diff options
author | Denis Dolzhenko <d.dolzhenko@samsung.com> | 2017-08-07 16:26:32 +0300 |
---|---|---|
committer | Denis Dolzhenko <d.dolzhenko@samsung.com> | 2017-08-07 17:16:38 +0300 |
commit | bf592520ac4f307e0baeb2c3164f020cbecf5ec4 (patch) | |
tree | 2fae8bccb964d6671c8cb3b287c3e4fd5936338a | |
parent | e980343d2ec6a098d709b611946fa99eca5081d8 (diff) | |
download | timer-bf592520ac4f307e0baeb2c3164f020cbecf5ec4.tar.gz timer-bf592520ac4f307e0baeb2c3164f020cbecf5ec4.tar.bz2 timer-bf592520ac4f307e0baeb2c3164f020cbecf5ec4.zip |
TizenRefApp-9042 Screen Reader does not read Dismiss Buttonsubmit/tizen/20170808.101758
Change-Id: I911f3b4398900aadcbb4a4cd0616d037f043f47b
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
-rwxr-xr-x | timer_alert/src/ring.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/timer_alert/src/ring.c b/timer_alert/src/ring.c index 08852c5..970edeb 100755 --- a/timer_alert/src/ring.c +++ b/timer_alert/src/ring.c @@ -33,6 +33,7 @@ typedef struct appdata { Evas_Object* conform; Evas_Object* nf; Evas_Object* ly_main; + Evas_Object* ly_dismiss; Evas_Object* elapse_time; } appdata_s; @@ -137,7 +138,6 @@ static void create_base_gui(appdata_s *ad) { _TMR_ENTER_; - char edj_path[PATH_MAX] = {0, }; /* Window */ /* Create and initialize elm_win. @@ -163,8 +163,6 @@ create_base_gui(appdata_s *ad) elm_object_event_callback_add(ad->win, _key_pressed, NULL); evas_object_show(ad->conform); - app_get_resource(RING_TIME_EDJ, edj_path, (int)PATH_MAX); - ad->nf = elm_naviframe_add(ad->conform); elm_object_part_content_set(ad->conform, "elm.swallow.content", ad->nf); @@ -379,6 +377,7 @@ void ring_view_add_by_timer(void *data) elm_object_part_content_set(ly_main, "elm.swallow.dismiss", ly_dismiss); ad->ly_main = ly_main; + ad->ly_dismiss = ly_dismiss; elm_object_signal_emit(ly_dismiss, "reset_ani", "*"); elm_object_domain_translatable_part_text_set(ly_dismiss, "dismiss_text", PACKAGE, STRING_TMR_CANCEL); @@ -591,21 +590,15 @@ static Eina_Bool _screen_reader_dismiss_button_scroll(void *data, Evas_Object *o /* * @brief: function to read elapsed time * @param[data]: in, user data -* @param[obj]: dismiss button evas_object -* @param[action_info]: event information. +* @param[obj]: obj time object +* @return: text for say. */ -static Eina_Bool _screen_reader_elpase_time_cb(void *data, Evas_Object *obj, Elm_Access_Action_Info *action_info) +char *_time_atspi_cb(void *data, Evas_Object *obj) { - _D(""); - appdata_s *ad = (appdata_s *)data; - retv_if(!ad, EINA_TRUE); - retv_if(!obj, EINA_TRUE); - char buf[256] = {0,}; + static const size_t buf_size = 512; + char buf[buf_size] = {0,}; snprintf(buf, sizeof(buf), "%d %s, %d %s", delay_count/60, S_(STRING_TTS_TIME_MINUTE), delay_count%60, S_(STRING_TTS_TIME_SECOND)); - elm_atspi_accessible_name_set(ad->elapse_time, buf); - elm_atspi_accessible_translation_domain_set(ad->elapse_time, PACKAGE); - elm_atspi_accessible_reading_info_type_set(ad->elapse_time, (ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION)); - return EINA_TRUE; + return strdup(buf); } /* @@ -623,8 +616,7 @@ void _screen_reader_objects_create(void* data) char buf[256] = { 0, }; //create icon - //icon = elm_access_object_register(edje_object_part_object_get(_EDJ(ad->ly_main), "dismiss_bg"), ad->ly_main); - icon = elm_access_object_register(edje_object_part_object_get(_EDJ(ad->ly_main), "drag_item_dismiss"), ad->ly_main); + icon = elm_access_object_register(edje_object_part_object_get(_EDJ(ad->ly_dismiss), "drag_item_dismiss"), ad->ly_dismiss); snprintf(buf, sizeof(buf), "%s", S_(STRING_TMR_CANCEL)); elm_atspi_accessible_name_set(icon, buf); snprintf(buf, sizeof(buf), "%s", S_(STRING_TTS_TMR_SWIPE_RIGHT_TO_DISMISS)); @@ -636,12 +628,9 @@ void _screen_reader_objects_create(void* data) //create time text elapse_time = elm_access_object_register(edje_object_part_object_get(_EDJ(ad->ly_main), "time"), ad->ly_main); ad->elapse_time = elapse_time; - //tempbuf = elm_object_part_text_get(ad->ly_main, "time"); - snprintf(buf, sizeof(buf), "%d %s, %d %s", delay_count/60, S_(STRING_TTS_TIME_MINUTE), delay_count%60, S_(STRING_TTS_TIME_SECOND)); - elm_atspi_accessible_name_set(elapse_time, buf); + elm_atspi_accessible_reading_info_type_set(elapse_time, ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION); + elm_atspi_accessible_description_cb_set(elapse_time, _time_atspi_cb, ad); elm_atspi_accessible_translation_domain_set(elapse_time, PACKAGE); - elm_atspi_accessible_reading_info_type_set(elapse_time, (ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION)); - elm_access_action_cb_set(elapse_time, ELM_ACCESS_ACTION_ACTIVATE, _screen_reader_elpase_time_cb, ad); //create timeup timeupstr = elm_access_object_register(edje_object_part_object_get(_EDJ(ad->ly_main), "text"), ad->ly_main); |