summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjunkyu han <junkyu.han@samsung.com>2016-12-14 20:12:35 +0900
committerjunkyu han <junkyu.han@samsung.com>2016-12-14 20:57:47 +0900
commit17497a54c2e661d496ee8090abd5c0d2eba1c5cf (patch)
tree8fa5a1cbee7b9e6a365d047b37a897b2ff2e9d09
parenta1728c2973af8b72fc96380907bf4a0af03cdf48 (diff)
downloadw3-home-17497a54c2e661d496ee8090abd5c0d2eba1c5cf.tar.gz
w3-home-17497a54c2e661d496ee8090abd5c0d2eba1c5cf.tar.bz2
w3-home-17497a54c2e661d496ee8090abd5c0d2eba1c5cf.zip
Make time longer showing progress & block resume callback on edit & fix svace issuesubmit/tizen_3.0/20161214.120114accepted/tizen/3.0/wearable/20161215.045822
Change-Id: I3c772ae362c89d94e6b1cbc91a4716ec2552824d
-rwxr-xr-xhome/src/add-viewer.c11
-rwxr-xr-xhome/src/apps/apps_callback_manager.c2
-rwxr-xr-xhome/src/apps/apps_state_edit.c6
-rwxr-xr-xhome/src/apps/apps_view_circle.c9
-rwxr-xr-xhome/src/apps/apps_view_circle_icon_page.c4
-rwxr-xr-xhome/src/edit.c5
-rw-r--r--home/src/index.c3
-rwxr-xr-xhome/src/main.c14
-rwxr-xr-xhome/src/moments/moments_manager.c3
-rwxr-xr-xhome/src/page.c1
-rwxr-xr-xhome/src/scroller.c26
11 files changed, 39 insertions, 45 deletions
diff --git a/home/src/add-viewer.c b/home/src/add-viewer.c
index c94d622..9c654f4 100755
--- a/home/src/add-viewer.c
+++ b/home/src/add-viewer.c
@@ -1183,10 +1183,15 @@ static Evas_Object *winset_preview_add(struct widget_data *widget_data, Evas_Obj
access_info_t *access_info = NULL;
Evas_Object *item_ao = NULL;
- char buf[1024];
- strncpy(buf, name, sizeof(buf));
+ char buf[2056];
+
+ if (name) {
+ strncpy(buf, name, sizeof(buf));
+ access_info = screen_reader_create_access_info(preview, parent, name, NULL, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME);
+ } else {
+ access_info = screen_reader_create_access_info(preview, parent, NULL, NULL, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME);
+ }
- access_info = screen_reader_create_access_info(preview, parent, buf, NULL, ELM_ACCESSIBLE_READING_INFO_TYPE_NAME);
item_ao = screen_reader_create_access_object(access_info);
if (!item_ao) {
DbgPrint("Failed to create access object");
diff --git a/home/src/apps/apps_callback_manager.c b/home/src/apps/apps_callback_manager.c
index 89983d2..bba21f3 100755
--- a/home/src/apps/apps_callback_manager.c
+++ b/home/src/apps/apps_callback_manager.c
@@ -106,7 +106,7 @@ void apps_callback_manager_execute_cb(apps_callback_t *cb_stack, void *data)
}
for (idx = 0; idx < cb_stack->cb_count; idx++) {
- if (cb_stack->cb_list != NULL) {
+ if (cb_stack->cb_list[idx] != NULL) {
(*cb_stack->cb_list[idx])(data);
}
}
diff --git a/home/src/apps/apps_state_edit.c b/home/src/apps/apps_state_edit.c
index 4010f77..bc3468b 100755
--- a/home/src/apps/apps_state_edit.c
+++ b/home/src/apps/apps_state_edit.c
@@ -30,6 +30,8 @@
#define POPUP_OK_IMAGE_PATH IMAGE_DIR"/tw_ic_popup_btn_check.png"
#define APPS_POPUP_EDJE_PATH EDJE_DIR"/circle/apps_popup.edj"
#define PROGRESS_STOP_TIME 0.5
+#define PROGRESS_MIN_TIME_COUNT 4
+#define PROGRESS_MAX_TIME_COUNT 10
static void __step_in(void);
static void __step_out(void *next_state);
@@ -346,11 +348,11 @@ static void __close_uninstall_progress()
static Eina_Bool __progress_time_over(void *data)
{
s_info.progress_timer_count++;
- if (s_info.progress_timer_count >= 2 && s_info.uninstall_complete == 1) {
+ if (s_info.progress_timer_count >= PROGRESS_MIN_TIME_COUNT && s_info.uninstall_complete == 1) {
_D("It's the time for HIDING progress");
__close_uninstall_progress();
return ECORE_CALLBACK_CANCEL;
- } else if (s_info.progress_timer_count >= 4 && s_info.uninstall_complete == 0) {
+ } else if (s_info.progress_timer_count >= PROGRESS_MAX_TIME_COUNT && s_info.uninstall_complete == 0) {
_D("Uninstall copletion is delaying, hide progress popup");
__close_uninstall_progress();
return ECORE_CALLBACK_CANCEL;
diff --git a/home/src/apps/apps_view_circle.c b/home/src/apps/apps_view_circle.c
index 0868eb5..dad1f52 100755
--- a/home/src/apps/apps_view_circle.c
+++ b/home/src/apps/apps_view_circle.c
@@ -153,7 +153,7 @@ void apps_view_move_focus_next(void)
} else {
if (item.icon_idx == apps_data_get_list_count() - 1) {
__apps_view_circle_animator_focus_point_bound(
- s_info.focus_point, ICON_ANGLE[pos], CLOCKWISE,
+ s_info.focus_point, ICON_ANGLE[pos >= APPS_ICON_COUNT_PER_PAGE ? 0 : pos], CLOCKWISE,
APPS_FOCUS_POINT_RADIUS, APPS_FOCUS_POINT_W, APPS_FOCUS_POINT_H, APPS_FOCUS_BOUND_TIME, __show_focus_point);
} else {
Eina_List *layout_list = NULL;
@@ -161,8 +161,8 @@ void apps_view_move_focus_next(void)
Eina_List *dest_angle_list = NULL;
layout_list = eina_list_append(layout_list, s_info.focus_point);
- cur_angle_list = eina_list_append(cur_angle_list, &ICON_ANGLE[pos]);
- dest_angle_list = eina_list_append(dest_angle_list, &ICON_ANGLE[pos + 1]);
+ cur_angle_list = eina_list_append(cur_angle_list, &ICON_ANGLE[pos >= APPS_ICON_COUNT_PER_PAGE ? 0 : pos]);
+ dest_angle_list = eina_list_append(dest_angle_list, &ICON_ANGLE[pos + 1 >= APPS_ICON_COUNT_PER_PAGE ? 0 : pos + 1]);
__apps_view_circle_animator_rotation(layout_list, cur_angle_list, dest_angle_list,
APPS_FOCUS_POINT_RADIUS, APPS_FOCUS_POINT_W, APPS_FOCUS_POINT_H, APPS_FOCUS_MOVE_TIME, ANIMATION_OPTION_DEFAULT, __move_focus_next);
@@ -514,7 +514,8 @@ static void __show_focus_point(void)
int x = 0;
int y = 0;
int pos = apps_data_get_focus_pos();
- __apps_view_circle_get_pos(APPS_FOCUS_POINT_RADIUS, ICON_ANGLE[pos], &x, &y);
+
+ __apps_view_circle_get_pos(APPS_FOCUS_POINT_RADIUS, ICON_ANGLE[pos >= APPS_ICON_COUNT_PER_PAGE ? 0 : pos], &x, &y);
x -= APPS_FOCUS_POINT_W / 2;
y -= APPS_FOCUS_POINT_H / 2;
diff --git a/home/src/apps/apps_view_circle_icon_page.c b/home/src/apps/apps_view_circle_icon_page.c
index 81154c9..f32d016 100755
--- a/home/src/apps/apps_view_circle_icon_page.c
+++ b/home/src/apps/apps_view_circle_icon_page.c
@@ -155,7 +155,7 @@ APPS_ICON_INFO *apps_view_get_focus_icon_info(void)
apps_data_set_focus_pos(pos);
}
- return s_info.icon_info[pos];
+ return s_info.icon_info[pos >= APPS_ICON_COUNT_PER_PAGE ? 0 : pos];
}
void apps_view_turn_next_page(void)
@@ -568,7 +568,7 @@ void __apps_view_circle_tap_focus_text(void)
pos = (count < 0) ? 0 : count;
apps_data_set_focus_pos(pos);
}
- icon_info = s_info.icon_info[pos];
+ icon_info = s_info.icon_info[pos >= APPS_ICON_COUNT_PER_PAGE ? 0 : pos];
if (s_info.callback == NULL) {
_E("view callback is null");
diff --git a/home/src/edit.c b/home/src/edit.c
index 8327b6d..f15ff70 100755
--- a/home/src/edit.c
+++ b/home/src/edit.c
@@ -815,14 +815,14 @@ Evas_Object *_create_proxy_item(Evas_Object *edit_scroller, Evas_Object *real_pa
/* Proxy Image */
proxy_image = evas_object_image_filled_add(main_get_info()->e);
- if (!proxy_item) {
+ if (!proxy_image) {
_E("Cannot add an image");
evas_object_del(proxy_image);
return NULL;
}
ret = evas_object_image_source_set(proxy_image, page_info->item);
- if(EINA_FALSE == ret) _E("Cannot set the source into the proxy image");
+ if (EINA_FALSE == ret) _E("Cannot set the source into the proxy image");
evas_object_image_source_visible_set(proxy_image, EINA_FALSE);
evas_object_image_source_clip_set(proxy_image, EINA_FALSE);
@@ -2018,6 +2018,7 @@ HAPI void edit_destroy_add_viewer(Evas_Object *layout)
widget_data = evas_object_smart_data_get(add_viewer);
if (!widget_data) {
_E("Failed to get widget data");
+ return;
}
scroller_info = evas_object_data_get(widget_data->scroller, DATA_KEY_SCROLLER_INFO);
diff --git a/home/src/index.c b/home/src/index.c
index fdfff29..59886c2 100644
--- a/home/src/index.c
+++ b/home/src/index.c
@@ -142,7 +142,6 @@ HAPI void index_bring_in_page(Evas_Object *index, Evas_Object *page)
HAPI void multi_index_bring_in_page(struct index_st *index, Evas_Object *page)
{
- _D("Multi index page bring in");
const Eina_List *l = NULL;
page_index_s *page_index = NULL;
layout_info_s *layout_info = NULL;
@@ -172,8 +171,6 @@ HAPI void multi_index_bring_in_page(struct index_st *index, Evas_Object *page)
}
}
if (!found) {
- _E("Cannot find a page(%p)", page);
-
for (i = 0; i < inserted_count; i++)
{
elm_object_signal_emit(index->unit[i], "show", "index");
diff --git a/home/src/main.c b/home/src/main.c
index a26ab4f..77ae82b 100755
--- a/home/src/main.c
+++ b/home/src/main.c
@@ -495,8 +495,8 @@ static void _resume_cb(void *data)
{
Evas_Object *scroller = NULL;
Evas_Object *focused_page = NULL;
-
- _D("Resumed");
+ layout_info_s *layout_info = NULL;
+ _D("Resume");
if (main_info.state == APP_STATE_RESUME) {
_E("resumed already");
@@ -513,6 +513,16 @@ static void _resume_cb(void *data)
return;
}
+ layout_info = evas_object_data_get(main_info.layout, DATA_KEY_LAYOUT_INFO);
+ if (!layout_info) {
+ _E("Failed to get layout info");
+ return;
+ }
+ if (layout_info->edit || evas_object_data_get(main_info.layout, DATA_KEY_ADD_VIEWER)) {
+ _D("This is edit or add widget scroller");
+ return;
+ }
+
main_info.state = APP_STATE_RESUME;
_execute_cbs(APP_STATE_RESUME);
diff --git a/home/src/moments/moments_manager.c b/home/src/moments/moments_manager.c
index 087d94b..eded062 100755
--- a/home/src/moments/moments_manager.c
+++ b/home/src/moments/moments_manager.c
@@ -62,12 +62,11 @@ void moments_fini(void)
void moments_show(void)
{
- scroller_freeze(s_info.bg_scroller);
-
if (!moments_view_show()) {
_E("failed to show moment-bar");
return ;
}
+ scroller_freeze(s_info.bg_scroller);
s_info.visible = true;
diff --git a/home/src/page.c b/home/src/page.c
index acaa8af..3d1aaaf 100755
--- a/home/src/page.c
+++ b/home/src/page.c
@@ -678,7 +678,6 @@ HAPI char *page_read_title(Evas_Object *page)
tmp = widget_id;
}
}
- if (!tmp) return NULL;
title = strdup(tmp);
retv_if(!title, NULL);
diff --git a/home/src/scroller.c b/home/src/scroller.c
index e524c9d..3a2bb31 100755
--- a/home/src/scroller.c
+++ b/home/src/scroller.c
@@ -432,7 +432,6 @@ static Evas_Object *_select_singular_index(Evas_Object *scroller)
{
Evas_Object *cur_page;
scroller_info_s *scroller_info = NULL;
- page_direction_e direction;
retv_if(!scroller, NULL);
@@ -442,29 +441,10 @@ static Evas_Object *_select_singular_index(Evas_Object *scroller)
cur_page = scroller_get_focused_page(scroller);
retv_if(!cur_page, NULL);
- direction = scroller_get_current_page_direction(scroller);
- switch (direction) {
- case PAGE_DIRECTION_LEFT:
- if (scroller_info->index) {
- index_bring_in_page(scroller_info->single_index, cur_page);
- }
- return scroller_info->single_index;
- case PAGE_DIRECTION_CENTER:
- if (scroller_info->index) {
- index_bring_in_page(scroller_info->single_index, cur_page);
- }
- break;
- case PAGE_DIRECTION_RIGHT:
- if (scroller_info->index) {
- index_bring_in_page(scroller_info->single_index, cur_page);
- }
- return scroller_info->single_index;
- default:
- _E("Cannot reach here");
- break;
+ if (scroller_info->single_index) {
+ index_bring_in_page(scroller_info->single_index, cur_page);
}
-
- return NULL;
+ return scroller_info->single_index;
}