Add square view launch 55/45555/1
authorjinwoo.shin <jw0227.shin@samsung.com>
Fri, 7 Aug 2015 09:33:31 +0000 (18:33 +0900)
committerjinwoo.shin <jw0227.shin@samsung.com>
Fri, 7 Aug 2015 09:33:31 +0000 (18:33 +0900)
Change-Id: Idfb4a2e6db6f3d3f95a5f88ba843938f4fc467e8
Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
src/main.c

index d854735..ea9344a 100644 (file)
@@ -23,6 +23,9 @@
 #include "notification_view.h"
 #include "square_view.h"
 
+#define KEY_LAUNCH_TYPE "launch_type"
+#define TYPE_SQUARE "infosquare"
+
 SET_TAG(PACKAGE)
 
 struct _appdata {
@@ -115,6 +118,8 @@ static void _terminate(void *data)
 static void _control(app_control_h control, void *data)
 {
        struct _appdata *ad;
+       int r;
+       char *type = NULL;
 
        if (!data) {
                _ERR("failed to get data");
@@ -126,7 +131,12 @@ static void _control(app_control_h control, void *data)
        if (ad->win)
                elm_win_activate(ad->win);
 
-       viewmgr_push_view(NOTIFICATION_VIEW);
+       r = app_control_get_extra_data(control, KEY_LAUNCH_TYPE, &type);
+       if (r == SERVICE_ERROR_NONE &&
+                       type && !strcmp(type, TYPE_SQUARE))
+               viewmgr_push_view(SQUARE_VIEW);
+       else
+               viewmgr_push_view(NOTIFICATION_VIEW);
 }
 
 int main(int argc, char *argv[])