Fix the H/W back key & Set wifi setting title
authorHyunjee Kim <hj0426.kim@samsung.com>
Thu, 18 Jul 2013 09:08:01 +0000 (18:08 +0900)
committerHyunjee Kim <hj0426.kim@samsung.com>
Fri, 19 Jul 2013 08:57:51 +0000 (17:57 +0900)
Change-Id: Ic9e8fe296d1f6cce156db18a9c7f772d3371207b

CMakeLists.txt
packaging/ug-setting-mobileap-efl.spec
src/mh_common_utility.c
src/mh_view_main.c
src/mh_view_wifi_setup.c

index 3e719a6..8d85adf 100644 (file)
@@ -19,7 +19,7 @@ SET(SRCS
 
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
 
-SET(dependents "elementary evas ui-gadget-1 wifi-direct capi-network-tethering capi-network-connection capi-network-wifi capi-telephony-sim notification")
+SET(dependents "elementary efl-assist evas ui-gadget-1 wifi-direct capi-network-tethering capi-network-connection capi-network-wifi capi-telephony-sim notification")
 
 IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
        SET(CMAKE_BUILD_TYPE "Release")
index b2eb068..0dbf56b 100644 (file)
@@ -3,7 +3,7 @@
 
 Name:       ug-setting-mobileap-efl
 Summary:    Tethering UI Gadget Library
-Version:    0.1.167
+Version:    0.1.168
 Release:    1
 Group:      TO_BE/FILLED_IN
 License:    Flora License Version 1.0
@@ -13,6 +13,7 @@ BuildRequires: cmake
 BuildRequires: edje-bin
 BuildRequires: gettext-tools
 BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(efl-assist)
 BuildRequires: pkgconfig(evas)
 BuildRequires: pkgconfig(ui-gadget-1)
 BuildRequires: pkgconfig(wifi-direct)
index cd409ea..65f380d 100644 (file)
 *
 */
 
+#include <efl_assist.h>
+
 #include "mh_common_utility.h"
 #include "mobile_hotspot.h"
 
+//#define SK_BACK_SUPPORT
 static mh_popup_type_e popup_type = MH_POPUP_NONE;
 static Evas_Object *popup_content = NULL;
 static char *popup_string = NULL;
@@ -337,6 +340,11 @@ Eina_Bool _create_popup(mh_appdata_t *ad)
                evas_object_smart_callback_add(btn, "clicked",
                                __popup_resp_no, (void *)ad);
 
+#ifndef SK_BACK_SUPPORT
+               ea_object_event_callback_add(ad->popup, EA_CALLBACK_BACK,
+                               __popup_resp_no, (void *)ad);
+#endif
+
                evas_object_show(ad->popup);
                break;
 
@@ -364,6 +372,11 @@ Eina_Bool _create_popup(mh_appdata_t *ad)
                evas_object_smart_callback_add(btn, "clicked",
                                __popup_resp_no, (void *)ad);
 
+#ifndef SK_BACK_SUPPORT
+               ea_object_event_callback_add(ad->popup, EA_CALLBACK_BACK,
+                               __popup_resp_no, (void *)ad);
+#endif
+
                evas_object_show(ad->popup);
                break;
 
@@ -384,6 +397,11 @@ Eina_Bool _create_popup(mh_appdata_t *ad)
                evas_object_smart_callback_add(btn, "clicked",
                                __one_btn_popup_resp, (void *)ad);
 
+#ifndef SK_BACK_SUPPORT
+               ea_object_event_callback_add(ad->popup, EA_CALLBACK_BACK,
+                               __one_btn_popup_resp, (void *)ad);
+#endif
+
                evas_object_show(ad->popup);
                break;
 
@@ -411,6 +429,11 @@ Eina_Bool _create_popup(mh_appdata_t *ad)
                evas_object_smart_callback_add(btn, "clicked",
                                __popup_resp_no, (void *)ad);
 
+#ifndef SK_BACK_SUPPORT
+               ea_object_event_callback_add(ad->popup, EA_CALLBACK_BACK,
+                               __popup_resp_no, (void *)ad);
+#endif
+
                evas_object_show(ad->popup);
                break;
 
@@ -439,6 +462,11 @@ Eina_Bool _create_popup(mh_appdata_t *ad)
                evas_object_smart_callback_add(btn, "clicked",
                                __popup_resp_no, (void *)ad);
 
+#ifndef SK_BACK_SUPPORT
+               ea_object_event_callback_add(ad->popup, EA_CALLBACK_BACK,
+                               __popup_resp_no, (void *)ad);
+#endif
+
                evas_object_show(ad->popup);
                break;
 
@@ -459,6 +487,11 @@ Eina_Bool _create_popup(mh_appdata_t *ad)
                evas_object_smart_callback_add(btn, "clicked",
                                __one_btn_popup_resp, (void *)ad);
 
+#ifndef SK_BACK_SUPPORT
+               ea_object_event_callback_add(ad->popup, EA_CALLBACK_BACK,
+                               __one_btn_popup_resp, (void *)ad);
+#endif
+
                evas_object_show(ad->popup);
                break;
 
@@ -478,6 +511,10 @@ Eina_Bool _create_popup(mh_appdata_t *ad)
                evas_object_smart_callback_add(ad->popup, "block,clicked",
                                __alert_popup_resp, (void *)ad);
 
+#ifndef SK_BACK_SUPPORT
+               ea_object_event_callback_add(ad->popup, EA_CALLBACK_BACK,
+                               __alert_popup_resp, (void *)ad);
+#endif
                evas_object_show(ad->popup);
                break;
 
@@ -505,6 +542,11 @@ Eina_Bool _create_popup(mh_appdata_t *ad)
                evas_object_smart_callback_add(btn, "clicked",
                                __popup_resp_no, (void *)ad);
 
+#ifndef SK_BACK_SUPPORT
+               ea_object_event_callback_add(ad->popup, EA_CALLBACK_BACK,
+                               __popup_resp_no, (void *)ad);
+#endif
+
                evas_object_show(ad->popup);
                break;
        default:
@@ -728,4 +770,4 @@ Evas_Object *_create_slide_title(Evas_Object *parent, const char *text)
 
        elm_access_object_unregister(label);
        return label;
-}
\ No newline at end of file
+}
index af55b39..61e5ac4 100644 (file)
 */
 
 #include <time.h>
+#include <efl_assist.h>
+
 #include "mh_view_main.h"
 
+// #define SK_BACK_SUPPORT
+
 static void _gl_device_item_sel(void *data, Evas_Object *obj, void *event_info);
 static void _gl_exp(void *data, Evas_Object *obj, void *event_info);
 static void _gl_con(void *data, Evas_Object *obj, void *event_info);
@@ -1505,7 +1509,7 @@ void ap_update_data_onoff(void* data)
 void ap_draw_contents(mh_appdata_t *ad)
 {
        __MOBILE_AP_FUNC_ENTER__;
-
+#ifdef SK_BACK_SUPPORT
        __create_inner_contents(ad);
 
        ad->main.back_btn = elm_button_add(ad->naviframe);
@@ -1526,7 +1530,19 @@ void ap_draw_contents(mh_appdata_t *ad)
        elm_naviframe_item_push(ad->naviframe,
                        _("IDS_MOBILEAP_BODY_TETHERING"),
                        ad->main.back_btn, NULL, ad->main.genlist, NULL);
+#else
+       Elm_Object_Item *navi_item;
+
+       __create_inner_contents(ad);
+
+       ea_object_event_callback_add(ad->naviframe, EA_CALLBACK_BACK, ea_naviframe_back_cb, NULL);
+
+       navi_item = elm_naviframe_item_push(ad->naviframe,
+                        _("IDS_MOBILEAP_BODY_TETHERING"),
+                        ad->main.back_btn, NULL, ad->main.genlist, NULL);
 
+       elm_naviframe_item_pop_cb_set(navi_item, __back_btn_cb, (void *)ad);
+#endif
        __MOBILE_AP_FUNC_EXIT__;
        return;
 }
index fa8ed83..ba30a57 100644 (file)
@@ -19,6 +19,7 @@
 #include <notification.h>
 #include "mh_view_wifi_setup.h"
 
+//#define SK_BACK_SUPPORT
 static void __back_btn_cb(void *data, Evas_Object *obj, void *event_info);
 static void __gl_realized(void *data, Evas_Object *obj, void *event_info);
 
@@ -986,11 +987,16 @@ void mh_draw_wifi_setup_view(mh_appdata_t *ad)
        elm_object_focus_allow_set(st->back_btn, EINA_FALSE);
 
        st->navi_it = elm_naviframe_item_push(ad->naviframe,
-                       NULL,
+                       _("IDS_MOBILEAP_MBODY_WI_FI_TETHERING_SETTINGS"),
                        st->back_btn, NULL, st->genlist, NULL);
 
+#ifndef SK_BACK_SUPPORT
+       elm_naviframe_item_pop_cb_set(st->navi_it, __back_btn_cb, (void *)ad);
+#endif
+
        /* Slide title */
        label = _create_slide_title(ad->naviframe, _("IDS_MOBILEAP_MBODY_WI_FI_TETHERING_SETTINGS"));
+
        elm_object_item_part_content_set(st->navi_it, "elm.swallow.title", label);
        evas_object_smart_callback_add(ad->naviframe, "title,clicked", __title_clicked_cb, NULL);