change date and time menu for setup wizard
authorSunyeop Hwang <sunyeop.hwang@samsung.com>
Tue, 25 Jun 2013 06:29:13 +0000 (15:29 +0900)
committerSunyeop Hwang <sunyeop.hwang@samsung.com>
Tue, 25 Jun 2013 06:29:13 +0000 (15:29 +0900)
Change-Id: I4c374e62287950c47cf06b6d6ccbd1958dd556c6

setting-time/src/setting-time-main.c
setting-time/src/setting-time.c

index 5f83ac5..c29774d 100755 (executable)
@@ -647,28 +647,30 @@ static int setting_time_main_create(void *cb)
        SettingTimeUG *ad = (SettingTimeUG *) cb;
 
        char *l_btn = NULL;
-       char *r_btn = NULL;
+       //char *r_btn = NULL;
        char *title = _("IDS_ST_BODY_DATE_AND_TIME");
        char *caller = NULL;
        ad->is_datefield_selected = EINA_FALSE;
 
-       setting_call_back_func l_button_cb = NULL;
-       setting_call_back_func r_button_cb = NULL;
+       //setting_call_back_func l_button_cb = NULL;
+       //setting_call_back_func r_button_cb = NULL;
 
        service_h service = ad->bundle_data;
 
        service_get_extra_data(service, "caller", &caller);
-       service_get_extra_data(service, "lbutton", &l_btn);
-       if(l_btn)
-               l_button_cb = setting_time_main_click_softkey_caller_exist_left_cb;
+       //service_get_extra_data(service, "lbutton", &l_btn);
+       //if(l_btn)
+       //      l_button_cb = setting_time_main_click_softkey_caller_exist_left_cb;
        service_get_extra_data(service, "title", &title);
-       service_get_extra_data(service, "rbutton", &r_btn);
-       if(r_btn)
-               r_button_cb = setting_time_main_click_softkey_caller_exist_right_cb;
+       //service_get_extra_data(service, "rbutton", &r_btn);
+       //if(r_btn)
+       //      r_button_cb = setting_time_main_click_softkey_caller_exist_right_cb;
 
        Evas_Object *scroller;  /*  scroller is a genlist */
 
        ad->caller = caller;
+
+#if 0
        if (ad->caller) {
                /* for setup wizard */
                char *lbtn_str = (char *)g_strdup(l_btn);
@@ -709,7 +711,7 @@ static int setting_time_main_create(void *cb)
                        return SETTING_DRAW_ERR_FAIL_SCROLLER;
                elm_icon_file_set(licon_obj, IMG_PREVIOUS, NULL);
 
-               elm_object_style_set(lbtn_obj, "naviframe/toolbar/default");
+               elm_object_style_set(lbtn_obj, "naviframe/toolbar/left");
                elm_object_text_set(lbtn_obj, l_btn);
                elm_object_part_content_set(lbtn_obj, "elm.swallow.content", licon_obj);
                evas_object_smart_callback_add(lbtn_obj, "clicked", l_button_cb, ad);
@@ -724,7 +726,7 @@ static int setting_time_main_create(void *cb)
                        return SETTING_DRAW_ERR_FAIL_SCROLLER;
                elm_icon_file_set(ricon_obj, IMG_NEXT, NULL);
 
-               elm_object_style_set(rbtn_obj, "naviframe/toolbar/default");
+               elm_object_style_set(rbtn_obj, "naviframe/toolbar/right");
                elm_object_text_set(rbtn_obj, r_btn);
                elm_object_part_content_set(rbtn_obj, "elm.swallow.content", ricon_obj);
                evas_object_smart_callback_add(rbtn_obj, "clicked", r_button_cb, ad);
@@ -735,17 +737,18 @@ static int setting_time_main_create(void *cb)
                        elm_object_item_part_content_set(navi_it, "toolbar_button1", lbtn_obj);
                        elm_object_item_part_content_set(navi_it, "toolbar_button2", rbtn_obj);
                }
-       } else {
-               l_btn = _("IDS_COM_BODY_BACK");
-               title = _("IDS_ST_BODY_DATE_AND_TIME");
-               ad->ly_main =
-                   setting_create_layout_navi_bar_genlist(ad->win_main_layout,
-                                                          ad->win_get, title,
-                                                          l_btn, NULL,
-                                                          setting_time_main_click_softkey_left_cb,
-                                                          NULL, ad, &scroller,
-                                                          &ad->navi_bar);
-       }
+       } else {}
+#endif
+       l_btn = _("IDS_COM_BODY_BACK");
+       title = _("IDS_ST_BODY_DATE_AND_TIME");
+       ad->ly_main =
+               setting_create_layout_navi_bar_genlist(ad->win_main_layout,
+                               ad->win_get, title,
+                               l_btn, NULL,
+                               setting_time_main_click_softkey_left_cb,
+                               NULL, ad, &scroller,
+                               &ad->navi_bar);
+
        ad->scrl_main = scroller;
 
        int value;
@@ -1018,6 +1021,10 @@ static int setting_time_main_destroy(void *cb)
 
        SettingTimeUG *ad = (SettingTimeUG *) cb;
 
+//     __finalize_resource(ad);
+       if(ad->caller)
+               FREE(ad->caller);
+
        if (ad->update_timer) {
                ecore_timer_del(ad->update_timer);
                ad->update_timer = NULL;
index 115066f..cc884b5 100755 (executable)
@@ -201,6 +201,7 @@ static void setting_time_ug_on_key_event(ui_gadget_h ug,
        switch (event) {
        case UG_KEY_EVENT_END:
                {
+#if 0
                        if (0 == safeStrCmp(ad->caller, "pwlock")) {
                                /*  Create Bundle and send message */
 
@@ -213,6 +214,7 @@ static void setting_time_ug_on_key_event(ui_gadget_h ug,
 
                                service_destroy(svc);
                        }
+#endif
 
                        if (elm_naviframe_top_item_get(ad->navi_bar) ==
                           elm_naviframe_bottom_item_get(ad->navi_bar)) {