summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIrfan Abdul <irfan.abdul@samsung.com>2016-12-12 21:04:18 +0530
committerIrfan Abdul <irfan.abdul@samsung.com>2016-12-12 21:04:18 +0530
commit353a684989f9809e32898d9cbe87dc547cf2add4 (patch)
tree6cf2f2f4aba580ea74b8e6c124ef105f5054e298
parent9f64896b1224021b856f17d8f25f3d7a6c7ab443 (diff)
downloadtimer-353a684989f9809e32898d9cbe87dc547cf2add4.tar.gz
timer-353a684989f9809e32898d9cbe87dc547cf2add4.tar.bz2
timer-353a684989f9809e32898d9cbe87dc547cf2add4.zip
[timer] fix for TSAM-11460 screen reader not read out reset/pause when click on itsubmit/tizen_3.0/20161212.153824
Change-Id: Ic733c893cb40c369ede113f1286a539081831a76 Signed-off-by: Irfan Abdul <irfan.abdul@samsung.com>
-rwxr-xr-xedje_include/timer_main_group.edc41
-rwxr-xr-xedje_include/timer_time_panel.edc2
-rwxr-xr-xinc/main.h2
-rwxr-xr-xsrc/main.c89
4 files changed, 45 insertions, 89 deletions
diff --git a/edje_include/timer_main_group.edc b/edje_include/timer_main_group.edc
index 292fa1f..93baf1d 100755
--- a/edje_include/timer_main_group.edc
+++ b/edje_include/timer_main_group.edc
@@ -123,6 +123,7 @@ group
{
name: "elm.text.title";
type: TEXTBLOCK;
+ mouse_events: 1;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
@@ -346,46 +347,6 @@ group
}
part
{
- name: "resetbutton_rect";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description
- {
- state: "default" 0.0;
- rel1 {
- relative: 85/360 34/360;
- to: "background";
- }
- rel2 {
- relative: 275/360 126/360;
- to: "background";
- }
- color: 0 0 0 0;
- }
- }
- part
- {
- name: "cancelbutton_rect";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description
- {
- state: "default" 0.0;
- rel1 {
- relative: 85/360 34/360;
- to: "background";
- }
- rel2 {
- relative: 275/360 126/360;
- to: "background";
- }
- color: 0 0 0 0;
- }
- }
- part
- {
name: "rbutton,touch";
type: RECT;
mouse_events: 1;
diff --git a/edje_include/timer_time_panel.edc b/edje_include/timer_time_panel.edc
index 1e26812..4e337b8 100755
--- a/edje_include/timer_time_panel.edc
+++ b/edje_include/timer_time_panel.edc
@@ -63,7 +63,7 @@ group{
name: "time_text";
type: RECT;
scale: 1;
- mouse_events: 0;
+ mouse_events: 1;
description
{
state: "default" 0.0;
diff --git a/inc/main.h b/inc/main.h
index 6b50952..cc2befa 100755
--- a/inc/main.h
+++ b/inc/main.h
@@ -100,7 +100,7 @@ typedef struct screenreader_data {
Evas_Object* min_spinner;
Evas_Object* sec_spinner;
Evas_Object* start_button;
- Evas_Object* reset_button;
+ Evas_Object* reset_cancel_button;
Evas_Object* pause_resume_button;
Evas_Object* time_text;
Evas_Object* cancel_button;
diff --git a/src/main.c b/src/main.c
index 432a533..26b1105 100755
--- a/src/main.c
+++ b/src/main.c
@@ -56,7 +56,6 @@ void _screen_reader_sec_description_change(void* data);
static Eina_Bool _screen_reader_reset_button_cb(void *data, Evas_Object *obj, Elm_Access_Action_Info *action_info);
void _screen_reader_objects_create(void* data);
void _screen_reader_setting_screen_update(void* data);
-void _screen_reader_preset_screen_update(void* data);
void _screen_reader_preset_screen_launch(void* data);
void _screen_reader_transition_from_runing_to_setting_screen(void* data);
void _screen_reader_transition_from_setting_to_runing_screen(void* data);
@@ -672,9 +671,6 @@ static void _tmr_button_state_update(void *data)
TMR_INFO("btn disable");
elm_object_signal_emit(ad->ly_main, "rbutton,hide", "*");
//call preset screen
-#ifdef __SCREEN_READER_ENABLE
- _screen_reader_preset_screen_update(ad);
-#endif
} else {
elm_object_disabled_set(ad->eo_btn_lft, EINA_FALSE);
TMR_INFO("btn enable");
@@ -1090,7 +1086,6 @@ static void _tmr_reset_cb(void *data)
}
elm_object_signal_emit(ad->progress, "default", "");
#ifdef __SCREEN_READER_ENABLE
- _screen_reader_preset_screen_update(ad);
_screen_reader_preset_screen_launch(ad);
#endif
}
@@ -1168,6 +1163,7 @@ static void _tmr_rbtn_cb_ex(void *data, Evas_Object *obj, const char *emission,
ad->min = 0;
ad->sec = 0;
_tmr_timepicker_time_update(ad);
+ _screen_reader_preset_screen_launch(ad);
} else {
if ((ad->due_time.tv_sec <= 0)
|| (ad->due_time.tv_sec == 1 && ad->due_time.tv_usec <= 0)) {
@@ -2012,24 +2008,14 @@ void _screen_reader_objects_create(void* data)
elm_atspi_accessible_reading_info_type_set(sr_data->time_text, (ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION));
//for reset button and cancle_button
- sr_data->reset_button = elm_access_object_register(edje_object_part_object_get(_EDJ(ad->ly_main), "resetbutton_rect"), ad->ly_main);
+ sr_data->reset_cancel_button = elm_access_object_register(edje_object_part_object_get(_EDJ(ad->ly_main), "rbutton,touch"), ad->ly_main);
snprintf(buf, sizeof(buf), "%s", S_(STRING_TMR_RESET));
- elm_atspi_accessible_name_set(sr_data->reset_button, buf);
- snprintf(buf, sizeof(buf), "%s", S_(STRING_TTS_TMR_BUTTON));
- elm_atspi_accessible_description_set(sr_data->reset_button, buf);
- elm_atspi_accessible_translation_domain_set(sr_data->reset_button, PACKAGE);
- elm_atspi_accessible_reading_info_type_set(sr_data->reset_button, (ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION));
- elm_access_action_cb_set(sr_data->reset_button, ELM_ACCESS_ACTION_ACTIVATE, _screen_reader_reset_button_cb, ad);
-
- //for reset button and cancle_button
- sr_data->cancel_button = elm_access_object_register(edje_object_part_object_get(_EDJ(ad->ly_main), "cancelbutton_rect"), ad->ly_main);
- snprintf(buf, sizeof(buf), "%s", S_(STRING_TMR_CANCEL));
- elm_atspi_accessible_name_set(sr_data->cancel_button, buf);
+ elm_atspi_accessible_name_set(sr_data->reset_cancel_button, buf);
snprintf(buf, sizeof(buf), "%s", S_(STRING_TTS_TMR_BUTTON));
- elm_atspi_accessible_description_set(sr_data->cancel_button, buf);
- elm_atspi_accessible_translation_domain_set(sr_data->cancel_button, PACKAGE);
- elm_atspi_accessible_reading_info_type_set(sr_data->cancel_button, (ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION));
- elm_access_action_cb_set(sr_data->cancel_button, ELM_ACCESS_ACTION_ACTIVATE, _screen_reader_reset_button_cb, ad);
+ elm_atspi_accessible_description_set(sr_data->reset_cancel_button, buf);
+ elm_atspi_accessible_translation_domain_set(sr_data->reset_cancel_button, PACKAGE);
+ elm_atspi_accessible_reading_info_type_set(sr_data->reset_cancel_button, (ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION));
+ elm_access_action_cb_set(sr_data->reset_cancel_button, ELM_ACCESS_ACTION_ACTIVATE, _screen_reader_reset_button_cb, ad);
//for pause and resume buttons
sr_data->pause_resume_button = elm_access_object_register(edje_object_part_object_get(_EDJ(ad->ly_main), "lbutton,touch"), ad->ly_main);
@@ -2086,24 +2072,26 @@ void _screen_reader_objects_create(void* data)
elm_access_action_cb_set(sr_data->start_button, ELM_ACCESS_ACTION_ACTIVATE, _screen_reader_start_button_cb, ad);
- elm_atspi_accessible_relationship_append(sr_data->reset_button, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->timer_title);
- elm_atspi_accessible_relationship_append(sr_data->hour_spinner, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->reset_button);
+ elm_atspi_accessible_relationship_append(sr_data->reset_cancel_button, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->timer_title);
+ elm_atspi_accessible_relationship_append(sr_data->hour_spinner, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->reset_cancel_button);
elm_atspi_accessible_relationship_append(sr_data->min_spinner, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->hour_spinner);
elm_atspi_accessible_relationship_append(sr_data->sec_spinner, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->min_spinner);
elm_atspi_accessible_relationship_append(sr_data->start_button, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->sec_spinner);
-
+ elm_atspi_accessible_relationship_append(sr_data->time_text, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->start_button);
elm_atspi_accessible_relationship_append(sr_data->pause_resume_button, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->time_text);
- elm_atspi_accessible_relationship_append(sr_data->time_text, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->cancel_button);
+ //elm_atspi_accessible_relationship_append(sr_data->time_text, ELM_ATSPI_RELATION_FLOWS_FROM, sr_data->cancel_button);
- elm_atspi_accessible_relationship_append(sr_data->timer_title, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->reset_button);
- elm_atspi_accessible_relationship_append(sr_data->reset_button, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->hour_spinner);
+ elm_atspi_accessible_relationship_append(sr_data->timer_title, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->reset_cancel_button);
+ elm_atspi_accessible_relationship_append(sr_data->reset_cancel_button, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->hour_spinner);
elm_atspi_accessible_relationship_append(sr_data->hour_spinner, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->min_spinner);
elm_atspi_accessible_relationship_append(sr_data->min_spinner, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->sec_spinner);
elm_atspi_accessible_relationship_append(sr_data->sec_spinner, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->start_button);
+ elm_atspi_accessible_relationship_append(sr_data->start_button, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->time_text);
- elm_atspi_accessible_relationship_append(sr_data->cancel_button, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->time_text);
+ //elm_atspi_accessible_relationship_append(sr_data->cancel_button, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->time_text);
elm_atspi_accessible_relationship_append(sr_data->time_text, ELM_ATSPI_RELATION_FLOWS_TO, sr_data->pause_resume_button);
+ elm_atspi_accessible_relationship_append(sr_data->time_text, ELM_ATSPI_RELATION_FLOWS_TO, NULL);
}
@@ -2116,17 +2104,7 @@ void _screen_reader_setting_screen_update(void* data)
screenreader_data* sr_data = ad->sr_data;
//title is hidden here
elm_atspi_accessible_can_highlight_set(sr_data->timer_title, EINA_FALSE);
- elm_atspi_accessible_can_highlight_set(sr_data->reset_button, EINA_TRUE);
-}
-void _screen_reader_preset_screen_update(void* data)
-{
- _D("");
- struct appdata *ad = (struct appdata *)data;
- ret_if(!ad);
- screenreader_data* sr_data = ad->sr_data;
- //reset is hidden here
- elm_atspi_accessible_can_highlight_set(sr_data->timer_title, EINA_TRUE);
- elm_atspi_accessible_can_highlight_set(sr_data->reset_button, EINA_FALSE);
+ elm_atspi_accessible_can_highlight_set(sr_data->reset_cancel_button, EINA_TRUE);
}
void _screen_reader_preset_screen_launch(void* data)
@@ -2138,8 +2116,8 @@ void _screen_reader_preset_screen_launch(void* data)
//when this screen is luanched grab
elm_atspi_accessible_can_highlight_set(sr_data->timer_title, EINA_TRUE);
- elm_atspi_accessible_can_highlight_set(sr_data->reset_button, EINA_FALSE);
- elm_atspi_accessible_can_highlight_set(sr_data->cancel_button, EINA_FALSE);
+ elm_atspi_accessible_can_highlight_set(sr_data->reset_cancel_button, EINA_FALSE);
+ //elm_atspi_accessible_can_highlight_set(sr_data->cancel_button, EINA_FALSE);
elm_atspi_component_highlight_grab(sr_data->timer_title);
}
@@ -2239,12 +2217,20 @@ void _screen_reader_transition_from_setting_to_runing_screen(void* data)
elm_atspi_accessible_can_highlight_set(sr_data->min_spinner, EINA_FALSE);
elm_atspi_accessible_can_highlight_set(sr_data->sec_spinner, EINA_FALSE);
elm_atspi_accessible_can_highlight_set(sr_data->start_button, EINA_FALSE);
- elm_atspi_accessible_can_highlight_set(sr_data->reset_button, EINA_FALSE);
- elm_atspi_accessible_can_highlight_set(sr_data->cancel_button, EINA_TRUE);
elm_atspi_accessible_can_highlight_set(sr_data->time_text, EINA_TRUE);
elm_atspi_accessible_can_highlight_set(sr_data->pause_resume_button, EINA_TRUE);
- elm_atspi_component_highlight_grab(sr_data->cancel_button);
+ //elm_atspi_component_highlight_grab(sr_data->cancel_button);
+ elm_atspi_accessible_can_highlight_set(sr_data->reset_cancel_button, EINA_TRUE);
+ elm_atspi_component_highlight_grab(sr_data->reset_cancel_button);
+
+ //change lable for reset button to cancel
+ snprintf(buf, sizeof(buf), "%s", S_(STRING_TMR_CANCEL));
+ elm_atspi_accessible_name_set(sr_data->reset_cancel_button, buf);
+ snprintf(buf, sizeof(buf), "%s", S_(STRING_TTS_TMR_BUTTON));
+ elm_atspi_accessible_description_set(sr_data->reset_cancel_button, buf);
+ elm_atspi_accessible_translation_domain_set(sr_data->reset_cancel_button, PACKAGE);
+ elm_atspi_accessible_reading_info_type_set(sr_data->reset_cancel_button, (ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION));
//change lable for pause_resume_button to pause
snprintf(buf, sizeof(buf), "%s", S_(STRING_TMR_PAUSE));
@@ -2259,10 +2245,11 @@ void _screen_reader_transition_from_runing_to_setting_screen(void* data)
{
_D("");
struct appdata *ad = (struct appdata *)data;
+ char buf[256] = {0,};
ret_if(!ad);
screenreader_data* sr_data = ad->sr_data;
elm_atspi_accessible_can_highlight_set(sr_data->timer_title, EINA_FALSE);
- elm_atspi_accessible_can_highlight_set(sr_data->cancel_button, EINA_FALSE);
+ //elm_atspi_accessible_can_highlight_set(sr_data->cancel_button, EINA_FALSE);
elm_atspi_accessible_can_highlight_set(sr_data->time_text, EINA_FALSE);
elm_atspi_accessible_can_highlight_set(sr_data->pause_resume_button, EINA_FALSE);
@@ -2270,7 +2257,15 @@ void _screen_reader_transition_from_runing_to_setting_screen(void* data)
elm_atspi_accessible_can_highlight_set(sr_data->min_spinner, EINA_TRUE);
elm_atspi_accessible_can_highlight_set(sr_data->sec_spinner, EINA_TRUE);
elm_atspi_accessible_can_highlight_set(sr_data->start_button, EINA_TRUE);
- elm_atspi_accessible_can_highlight_set(sr_data->reset_button, EINA_TRUE);
- elm_atspi_component_highlight_grab(sr_data->reset_button);
+ elm_atspi_accessible_can_highlight_set(sr_data->reset_cancel_button, EINA_TRUE);
+ elm_atspi_component_highlight_grab(sr_data->reset_cancel_button);
+
+ snprintf(buf, sizeof(buf), "%s", S_(STRING_TMR_RESET));
+ elm_atspi_accessible_name_set(sr_data->reset_cancel_button, buf);
+ snprintf(buf, sizeof(buf), "%s", S_(STRING_TTS_TMR_BUTTON));
+ elm_atspi_accessible_description_set(sr_data->reset_cancel_button, buf);
+ elm_atspi_accessible_translation_domain_set(sr_data->reset_cancel_button, PACKAGE);
+ elm_atspi_accessible_reading_info_type_set(sr_data->reset_cancel_button, (ELM_ACCESSIBLE_READING_INFO_TYPE_NAME | ELM_ACCESSIBLE_READING_INFO_TYPE_DESCRIPTION));
+
}
#endif