add UC popup for TV profile 99/125499/1 accepted/tizen/unified/20170418.072755 submit/tizen/20170418.011800
authorjomui <jongmun.woo@samsung.com>
Tue, 18 Apr 2017 01:12:18 +0000 (10:12 +0900)
committerjomui <jongmun.woo@samsung.com>
Tue, 18 Apr 2017 01:12:34 +0000 (10:12 +0900)
Signed-off-by: jomui <jongmun.woo@samsung.com>
Change-Id: Id44ada0de9e0b3b77ffa768cd120501966e1aa12

heremaps-uc-launcher/src/heremaps-uc-launcher.h
heremaps-uc/src/heremaps-uc.c
maps-plugin-here.changes
packaging/maps-plugin-here.spec

index 9749068..bebbe66 100644 (file)
@@ -80,8 +80,8 @@ extern "C" {
 #define dgettext_noop(s)       (s)
 #define N_(s)                  dgettext_noop(s)
 
-#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__);
 
 
 
index 51d6135..6eab4e2 100644 (file)
@@ -187,6 +187,70 @@ static void anchor_clicked_cb(void *data, Evas_Object *obj, void *event_info)
        app_control_destroy(ac);
 }
 
+static Evas_Object *create_popup_tv(Evas_Object *layout, heremaps_uc_app_data *ad)
+{
+       LS_FUNC_ENTER
+       Evas_Object *popup;
+       Evas_Object *disagree_btn, *agree_btn;
+
+       /* popup */
+       popup = elm_popup_add(layout);
+       elm_object_style_set(popup, "default");
+       eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, back_btn_cb, ad);
+       evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_part_text_set(popup, "title,text", P_("IDS_POSITIONING_CONSENT_TITLE"));
+
+       Evas_Object *box = elm_box_add(popup);
+       elm_box_align_set(box, 0.5, 0);
+       evas_object_show(box);
+
+       Evas_Object *scroller = elm_scroller_add(box);
+       elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_TRUE);
+       elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
+       evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(scroller, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_size_hint_padding_set(scroller, 5, 5, 0, 0);
+       evas_object_show(scroller);
+
+       char buf[4096] = {0};
+       char *str1 = P_("IDS_POSITIONING_CONSENT_BODY");
+       char *str2 = "<color=#006fd1ff underline=on underline_color=#006fd1ff><a href=http://here.com/terms/service-terms>http://here.com/terms/service-terms</a></color>";
+       char *str3 = "<color=#006fd1ff underline=on underline_color=#006fd1ff><a href=http://here.com/privacy/privacy-policy>http://here.com/privacy/privacy-policy</a></color>";
+       snprintf(buf, 4096, str1, str2, str3);
+       char *text = strdup(buf);
+
+       Evas_Object* entry = elm_entry_add(scroller);
+       evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_size_hint_padding_set(entry, 5, 5, 0, 0);
+       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 color=#000000'");
+       evas_object_show(entry);
+
+       elm_object_content_set(scroller, entry);
+       elm_box_pack_end(box, scroller);
+       elm_object_part_content_set(popup, "elm.swallow.content", box);
+
+       /* Disagree button */
+       disagree_btn = elm_button_add(popup);
+       elm_object_style_set(disagree_btn, "popup");
+       elm_object_text_set(disagree_btn, P_("IDS_ST_BUTTON_DISAGREE"));
+       elm_object_part_content_set(popup, "button1", disagree_btn);
+       evas_object_smart_callback_add(disagree_btn, "clicked", disagree_btn_cb, ad);
+
+       /* Agree button */
+       agree_btn = elm_button_add(popup);
+       elm_object_style_set(agree_btn, "popup");
+       elm_object_text_set(agree_btn, P_("IDS_ST_BUTTON_AGREE"));
+       elm_object_part_content_set(popup, "button2", agree_btn);
+       evas_object_smart_callback_add(agree_btn, "clicked", agree_btn_cb, ad);
+
+       evas_object_show(popup);
+       LS_FUNC_EXIT
+       return popup;
+}
+
 static Evas_Object *create_popup_wearable(Evas_Object *layout, heremaps_uc_app_data *ad)
 {
        LS_FUNC_ENTER
@@ -224,7 +288,6 @@ static Evas_Object *create_popup_wearable(Evas_Object *layout, heremaps_uc_app_d
        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'");
-       evas_object_smart_callback_add(entry, "anchor,clicked", anchor_clicked_cb, NULL);
        elm_box_pack_end(box, entry);
        evas_object_show(entry);
 
@@ -351,6 +414,8 @@ static void _app_control_cb(app_control_h app_control, void *user_data)
 
        if (_get_tizen_profile() == TIZEN_PROFILE_WEARABLE)
                ad->popup = create_popup_wearable(ad->layout_main, ad);
+       else if (_get_tizen_profile() == TIZEN_PROFILE_TV)
+               ad->popup = create_popup_tv(ad->layout_main, ad);
        else
                ad->popup = create_popup(ad->layout_main, ad);
 
index 65267e3..1675d85 100644 (file)
@@ -1,3 +1,8 @@
+[Version]   maps-plugin-here_0.3.20
+[Date]      14 Apr 2017
+[Title]     Add UC popup for TV profile
+[Developer] Jongmun Woo <jongmun.woo@samsung.com>
+
 [Version]   maps-plugin-here_0.3.19
 [Date]      17 Apr 2017
 [Title]     Rebuild HERE Maps engine with gcc62
index fc5bb78..3906431 100644 (file)
@@ -1,6 +1,6 @@
 Name:       maps-plugin-here
 Summary:    Tizen HERE Maps Plug-in Library
-Version:    0.3.19
+Version:    0.3.20
 Release:    1
 Group:      Location/Libraries
 License:    Apache-2.0 and HERE