summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjomui <jongmun.woo@samsung.com>2017-11-06 15:40:25 +0900
committerjomui <jongmun.woo@samsung.com>2017-11-06 15:40:50 +0900
commit6441adf8ca5c8d83b036405bc33076ae61ebab43 (patch)
tree451f85da692db80f914d55701fb54e1fa75ecca1
parentfc0de656d42f602b261f7adfb4affaccc411e6a8 (diff)
downloadsimple-maps-accepted/tizen_4.0_unified.tar.gz
simple-maps-accepted/tizen_4.0_unified.tar.bz2
simple-maps-accepted/tizen_4.0_unified.zip
Signed-off-by: jomui <jongmun.woo@samsung.com> Change-Id: I5c8e23e6b0732a35d7b93f83f09b498f0eabfbda
-rw-r--r--org.tizen.simple-maps-tv.xml2
-rw-r--r--packaging/org.tizen.simple-maps-tv.spec2
-rw-r--r--src/simple-maps-mapview.c26
-rw-r--r--src/simple-maps-mapview.h1
-rw-r--r--src/simple-maps.c2
5 files changed, 29 insertions, 4 deletions
diff --git a/org.tizen.simple-maps-tv.xml b/org.tizen.simple-maps-tv.xml
index bcd291e..428a4c1 100644
--- a/org.tizen.simple-maps-tv.xml
+++ b/org.tizen.simple-maps-tv.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.simple-maps-tv" api-version="4.0" version="1.0.2" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.simple-maps-tv" api-version="4.0" version="1.0.3" install-location="internal-only">
<label>simple-maps</label>
<author email="cbible.kim@samsung.com" href="www.samsung.com">Seechan Kim</author>
<author email="jongmun.woo@samsung.com" href="www.samsung.com">JongMun Woo</author>
diff --git a/packaging/org.tizen.simple-maps-tv.spec b/packaging/org.tizen.simple-maps-tv.spec
index 786de17..93bab01 100644
--- a/packaging/org.tizen.simple-maps-tv.spec
+++ b/packaging/org.tizen.simple-maps-tv.spec
@@ -1,6 +1,6 @@
Name: org.tizen.simple-maps-tv
Summary: simple-maps-tv
-Version: 1.0.2
+Version: 1.0.3
Release: 1
Group: Applications/Location
License: Apache-2.0
diff --git a/src/simple-maps-mapview.c b/src/simple-maps-mapview.c
index af77336..6072251 100644
--- a/src/simple-maps-mapview.c
+++ b/src/simple-maps-mapview.c
@@ -278,6 +278,15 @@ static bool getLocationfromKeyword(maps_error_e result, int request_id, int inde
static void mapview_cancel_cb(void *data, Evas_Object * obj, void *event_info)
{
+ simple_maps_app_data *ad = (simple_maps_app_data *)data;
+ app_control_h reply = NULL;
+
+ app_control_create(&reply);
+ int ret = app_control_reply_to_launch_request(reply, ad->app_control, APP_CONTROL_RESULT_FAILED);
+ if (ret != APP_CONTROL_ERROR_NONE)
+ dlog_print(DLOG_ERROR, LOG_TAG, "app_control_reply_to_launch_request fail. err=%d", ret);
+ app_control_destroy(reply);
+
ui_app_exit();
}
@@ -321,6 +330,16 @@ static void mapview_done_cb(void *data, Evas_Object * obj, void *event_info)
ui_app_exit();
}
+void mapview_back_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ simple_maps_app_data *ad = (simple_maps_app_data *)data;
+
+ if (ad->operation == SIMPLE_MAPS_PICK)
+ mapview_cancel_cb(data, NULL, NULL);
+ else
+ ui_app_exit();
+}
+
static void maps_view_event_cb(maps_view_event_type_e type, maps_view_event_data_h event_data, void *user_data)
{
simple_maps_app_data *ad = (simple_maps_app_data *)user_data;
@@ -367,6 +386,11 @@ static void user_consent_cb(bool consented, const char *maps_provider, void *use
maps_coordinates_h maps_coord = NULL;
int request_id = 0;
+ if (consented != true) {
+ mapview_back_cb(user_data, NULL, NULL);
+ return;
+ }
+
int ret = maps_service_create(maps_provider, &(ad->maps_service));
if (ret != MAPS_ERROR_NONE) {
dlog_print(DLOG_ERROR, LOG_TAG, "maps_service_create fail, error = %d", ret);
@@ -527,7 +551,7 @@ void mapview(simple_maps_app_data *ad)
ad->map_cancel_btn = elm_button_add(ad->layout);
elm_object_text_set(ad->map_cancel_btn, P_("IDS_COM_SK_CANCEL"));
- evas_object_smart_callback_add(ad->map_cancel_btn, "clicked", mapview_cancel_cb, NULL);
+ evas_object_smart_callback_add(ad->map_cancel_btn, "clicked", mapview_cancel_cb, ad);
evas_object_size_hint_weight_set(ad->map_cancel_btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ad->map_cancel_btn, EVAS_HINT_FILL, 0.5);
evas_object_show(ad->map_cancel_btn);
diff --git a/src/simple-maps-mapview.h b/src/simple-maps-mapview.h
index 201982b..965a346 100644
--- a/src/simple-maps-mapview.h
+++ b/src/simple-maps-mapview.h
@@ -22,6 +22,7 @@
#ifndef SIMPLE_MAPS_MAPVIEW_H_
#define SIMPLE_MAPS_MAPVIEW_H_
+void mapview_back_cb(void *data, Evas_Object *obj, void *event_info);
void mapview(simple_maps_app_data *ad);
#endif /* SIMPLE_MAPS_MAPVIEW_H_ */
diff --git a/src/simple-maps.c b/src/simple-maps.c
index 6163ec3..f3dd89b 100644
--- a/src/simple-maps.c
+++ b/src/simple-maps.c
@@ -57,7 +57,7 @@ static void create_base_view(void *user_data)
ad->layout = elm_layout_add(ad->conformant);
evas_object_size_hint_weight_set(ad->layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_layout_theme_set(ad->layout, "layout", "application", "default");
- eext_object_event_callback_add(ad->layout, EEXT_CALLBACK_BACK, win_del, NULL);
+ eext_object_event_callback_add(ad->layout, EEXT_CALLBACK_BACK, mapview_back_cb, ad);
evas_object_show(ad->layout);
elm_object_content_set(ad->conformant, ad->layout);
}