diff options
author | jomui <jongmun.woo@samsung.com> | 2016-10-06 11:28:44 +0900 |
---|---|---|
committer | jomui <jongmun.woo@samsung.com> | 2016-10-06 11:29:06 +0900 |
commit | 700e8fb4d5f13b320fe48b796ab81c1652c09b03 (patch) | |
tree | dc14dc52580ba121e056f903bb9a4c6132d3bca0 | |
parent | 5a2c1694dcd2e8c3d1c01f13acb2b2ceb09023d0 (diff) | |
download | maps-plugin-here-700e8fb4d5f13b320fe48b796ab81c1652c09b03.tar.gz maps-plugin-here-700e8fb4d5f13b320fe48b796ab81c1652c09b03.tar.bz2 maps-plugin-here-700e8fb4d5f13b320fe48b796ab81c1652c09b03.zip |
modify the popup style of UC in wearablesubmit/tizen_3.0_common/20161104.104000submit/tizen_3.0/20161028.082423submit/tizen_3.0/20161028.062323submit/tizen/20161012.082118accepted/tizen/wearable/20161013.000758accepted/tizen/tv/20161013.000741accepted/tizen/mobile/20161013.000727accepted/tizen/ivi/20161013.000814accepted/tizen/common/20161012.154751accepted/tizen/3.0/wearable/20161028.133721accepted/tizen/3.0/tv/20161028.133447accepted/tizen/3.0/mobile/20161028.133115accepted/tizen/3.0/ivi/20161028.133957accepted/tizen/3.0/common/20161114.105749
Signed-off-by: jomui <jongmun.woo@samsung.com>
Change-Id: I6d05e218ac484fc989272043b2eb0d9156159c47
-rw-r--r-- | heremaps-uc/src/heremaps-uc-common.h | 7 | ||||
-rw-r--r-- | heremaps-uc/src/heremaps-uc.c | 66 |
2 files changed, 30 insertions, 43 deletions
diff --git a/heremaps-uc/src/heremaps-uc-common.h b/heremaps-uc/src/heremaps-uc-common.h index b948a1c..f5d66aa 100644 --- a/heremaps-uc/src/heremaps-uc-common.h +++ b/heremaps-uc/src/heremaps-uc-common.h @@ -90,8 +90,8 @@ extern "C" { #define KEY_ENABLED 1 #define KEY_DISABLED 0 -#define LS_FUNC_ENTER LS_LOGD("(%s) ENTER", __FUNCTION__); -#define LS_FUNC_EXIT LS_LOGD("(%s) EXIT", __FUNCTION__); +#define LS_FUNC_ENTER LS_LOGD("(%s) ENTER", __FUNCTION__); +#define LS_FUNC_EXIT LS_LOGD("(%s) EXIT", __FUNCTION__); #define SAFE_STRDUP(src) (src) ? strdup(src) : NULL @@ -128,8 +128,7 @@ extern "C" { } \ } while (0) -typedef struct appdata -{ +typedef struct appdata { app_control_h app_control; Evas_Object *win_main; diff --git a/heremaps-uc/src/heremaps-uc.c b/heremaps-uc/src/heremaps-uc.c index 4c9a989..bedadbd 100644 --- a/heremaps-uc/src/heremaps-uc.c +++ b/heremaps-uc/src/heremaps-uc.c @@ -60,7 +60,7 @@ static void win_del(void *data, Evas_Object * obj, void *event) elm_exit(); } -static void save_vconf(int value, heremaps_uc_app_data *ad) +static void save_vconf(int value) { int enabled = 0; int ret = 0; @@ -75,22 +75,22 @@ static void save_vconf(int value, heremaps_uc_app_data *ad) } } +#ifndef TIZEN_WEARABLE static void disagree_btn_cb(void *data, Evas_Object * obj, void *event) { LS_FUNC_ENTER - heremaps_uc_app_data *ad = (heremaps_uc_app_data *) data; - save_vconf(0, ad); + save_vconf(0); elm_exit(); } +#endif static void agree_btn_cb(void *data, Evas_Object * obj, void *event) { LS_FUNC_ENTER - heremaps_uc_app_data *ad = (heremaps_uc_app_data *) data; - save_vconf(1, ad); + save_vconf(1); elm_exit(); } @@ -98,9 +98,8 @@ static void agree_btn_cb(void *data, Evas_Object * obj, void *event) static void back_btn_cb(void *data, Evas_Object * obj, void *event) { LS_FUNC_ENTER - heremaps_uc_app_data *ad = (heremaps_uc_app_data *) data; - save_vconf(0, ad); + save_vconf(0); elm_exit(); } @@ -128,7 +127,7 @@ static Evas_Object *create_popup_wearable(Evas_Object *layout, heremaps_uc_app_d { LS_FUNC_ENTER Evas_Object *popup; - Evas_Object *disagree_btn, *agree_btn; + Evas_Object *agree_btn; /* popup */ popup = elm_popup_add(layout); @@ -137,7 +136,7 @@ static Evas_Object *create_popup_wearable(Evas_Object *layout, heremaps_uc_app_d eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, back_btn_cb, ad); Evas_Object *popupLayout = elm_layout_add(popup); - elm_layout_theme_set(popupLayout, "layout", "popup", "content/circle/buttons2"); + elm_layout_theme_set(popupLayout, "layout", "popup", "content/circle/buttons1"); evas_object_size_hint_align_set(popupLayout, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_size_hint_weight_set(popupLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_object_part_text_set(popupLayout, "elm.text.title", P_("IDS_POSITIONING_CONSENT_TITLE")); @@ -155,41 +154,23 @@ static Evas_Object *create_popup_wearable(Evas_Object *layout, heremaps_uc_app_d snprintf(buf, 4096, str1, str2, str3); char *text = strdup(buf); - Evas_Object *entry1 = elm_entry_add(box); - evas_object_size_hint_weight_set(entry1, EVAS_HINT_EXPAND, 0.0); - evas_object_size_hint_align_set(entry1, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_entry_editable_set(entry1, EINA_FALSE); - elm_entry_line_wrap_set(entry1, ELM_WRAP_CHAR); - elm_object_part_text_set(entry1, "elm.text", text); - elm_box_pack_end(box, entry1); - evas_object_show(entry1); - - /* Disagree button */ - disagree_btn = elm_button_add(popup); - elm_object_style_set(disagree_btn, "popup/circle/left"); - evas_object_size_hint_weight_set(disagree_btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_smart_callback_add(disagree_btn, "clicked", disagree_btn_cb, ad); - elm_object_part_content_set(popup, "button1", disagree_btn); - - Evas_Object *icon = elm_image_add(disagree_btn); - elm_image_file_set(icon, EDJE_PATH, "tw_ic_popup_btn_delete.png"); - evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_part_content_set(disagree_btn, "elm.swallow.content", icon); - evas_object_show(icon); + Evas_Object* entry = elm_entry_add(box); + evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_entry_editable_set(entry, EINA_FALSE); + elm_object_part_text_set(entry, "elm.text", text); + elm_entry_text_style_user_push(entry, "DEFAULT='align=center'"); + elm_box_pack_end(box, entry); + evas_object_show(entry); /* Agree button */ agree_btn = elm_button_add(popup); - elm_object_style_set(agree_btn, "popup/circle/right"); + elm_object_style_set(agree_btn, "popup/circle"); evas_object_size_hint_weight_set(agree_btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - - icon = elm_image_add(agree_btn); - elm_image_file_set(icon, EDJE_PATH, "tw_ic_popup_btn_check.png"); - evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_part_content_set(agree_btn, "elm.swallow.content", icon); - evas_object_show(icon); + elm_object_part_text_set(agree_btn, "elm.text", P_("IDS_ST_BUTTON_AGREE")); evas_object_smart_callback_add(agree_btn, "clicked", agree_btn_cb, ad); - elm_object_part_content_set(popup, "button2", agree_btn); + elm_object_part_content_set(popup, "button1", agree_btn); evas_object_show(popup); LS_FUNC_EXIT @@ -253,6 +234,13 @@ static void _app_terminate_cb(void *user_data) static void _app_pause_cb(void *user_data) { LS_FUNC_ENTER + //minseo.park:Sep 20, 2016:HERE UC launcher is hidden type app. So never be managed by applicaiton manager. + // So when paused by other event, should exit. And have to set vconfkey for notifing to caller application. + int enabled = 0; + vconf_get_int(VCONFKEY_LOCATION_HEREMAPS_CONSENT, &enabled); + + save_vconf(enabled); + elm_exit(); } static void _app_resume_cb(void *user_data) @@ -277,7 +265,7 @@ static void _app_control_cb(app_control_h app_control, void *user_data) bindtextdomain(HEREMAPS_UC_PKG, LOCALE_DIR); - save_vconf(-1, ad); + save_vconf(-1); ad->win_main = create_win(HEREMAPS_UC_PKG); ad->conformant = create_conformant(ad->win_main); |