summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjin0.kim <jin0.kim@samsung.com>2017-06-19 13:16:05 +0830
committerjin0.kim <jin0.kim@samsung.com>2017-06-19 13:16:05 +0830
commit41332b3b78e59207e0a33eefa25a3d2aab21de1c (patch)
tree4ad7e236f9f74036e946cd55b5d7adf4e96413a6
parentbcebd341a0665cc19847ab2310a38d002bae2414 (diff)
downloadw3-home-41332b3b78e59207e0a33eefa25a3d2aab21de1c.tar.gz
w3-home-41332b3b78e59207e0a33eefa25a3d2aab21de1c.tar.bz2
w3-home-41332b3b78e59207e0a33eefa25a3d2aab21de1c.zip
Add close function for moments-popup
Change-Id: I74c2e4b98627194798782490b3a4852872944b30
-rwxr-xr-xinc/moments/moments_control_view.h5
-rwxr-xr-xsrc/home_app_manager.c8
-rwxr-xr-xsrc/moments/moments_control_view.c25
3 files changed, 36 insertions, 2 deletions
diff --git a/inc/moments/moments_control_view.h b/inc/moments/moments_control_view.h
index c5ecbb1..de2981f 100755
--- a/inc/moments/moments_control_view.h
+++ b/inc/moments/moments_control_view.h
@@ -69,5 +69,10 @@ position_t *moments_control_get_button_position(int total_count, int index);
void moments_control_clear_button_list(void);
Eina_List * __t__get_moments_control_button_list(void);
+bool moments_control_get_do_not_disturb_popup_visible(void);
+bool moments_control_get_flight_mode_popup_visible(void);
+void moments_control_do_not_disturb_popup_close(void);
+void moments_control_flight_mode_popup_close(void);
+
#endif
diff --git a/src/home_app_manager.c b/src/home_app_manager.c
index 56458f6..26c98ff 100755
--- a/src/home_app_manager.c
+++ b/src/home_app_manager.c
@@ -50,6 +50,7 @@
#include "notification/noti_detail_view.h"
#include "notification/noti_time.h"
#include "moments/moments.h"
+#include "moments/moments_control_view.h"
#include "common_conf.h"
#include "test.h"
@@ -1165,8 +1166,11 @@ void app_control(app_control_h service, void *data)
} else if (focused_page == main_info.clock_focus) {
if (moments_get_visible()) {
moments_hide();
- }
- else {
+ } else if (moments_control_get_do_not_disturb_popup_visible() == true) {
+ moments_control_do_not_disturb_popup_close();
+ } else if (moments_control_get_flight_mode_popup_visible() == true) {
+ moments_control_flight_mode_popup_close();
+ } else {
apps_show();
}
}
diff --git a/src/moments/moments_control_view.c b/src/moments/moments_control_view.c
index b2038e2..0801750 100755
--- a/src/moments/moments_control_view.c
+++ b/src/moments/moments_control_view.c
@@ -567,6 +567,21 @@ static Evas_Object *__do_not_disturb_popup_view_create()
return popup;
}
+bool moments_control_get_do_not_disturb_popup_visible(void)
+{
+ if (s_info.do_not_disturb_popup != NULL && evas_object_visible_get(s_info.do_not_disturb_popup) == true)
+ return true;
+
+ return false;
+}
+
+bool moments_control_get_flight_mode_popup_visible(void)
+{
+ if (s_info.flight_mode_popup != NULL && evas_object_visible_get(s_info.flight_mode_popup) == true)
+ return true;
+
+ return false;
+}
static void __do_not_disturb_pressed_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
@@ -597,6 +612,16 @@ static void __flight_mode_popup_cancel_cb(void *data, Evas_Object *obj, void *ev
}
}
+void moments_control_do_not_disturb_popup_close(void)
+{
+ __do_not_disturb_popup_cancel_cb(NULL, NULL, NULL);
+}
+
+void moments_control_flight_mode_popup_close(void)
+{
+ __flight_mode_popup_cancel_cb(NULL, NULL, NULL);
+}
+
static void __flight_mode_popup_ok_cb(void *data, Evas_Object *obj, void *event_info)
{
if (evas_object_visible_get(s_info.flight_mode_popup) == false) {