diff options
author | Hyunjee Kim <hj0426.kim@samsung.com> | 2013-07-18 18:08:01 +0900 |
---|---|---|
committer | Hyunjee Kim <hj0426.kim@samsung.com> | 2013-07-19 17:57:51 +0900 |
commit | 58028be4bfb0fe1a70bd0b39855dd610a4237089 (patch) | |
tree | 352f575a58cacb624424cfa2130cf25bb497b6fd | |
parent | 334fa89a0b4af6caa537cb07efc904b5dadadd07 (diff) | |
download | ug-mobile-ap-58028be4bfb0fe1a70bd0b39855dd610a4237089.tar.gz ug-mobile-ap-58028be4bfb0fe1a70bd0b39855dd610a4237089.tar.bz2 ug-mobile-ap-58028be4bfb0fe1a70bd0b39855dd610a4237089.zip |
Fix the H/W back key & Set wifi setting title
Change-Id: Ic9e8fe296d1f6cce156db18a9c7f772d3371207b
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | packaging/ug-setting-mobileap-efl.spec | 3 | ||||
-rw-r--r-- | src/mh_common_utility.c | 44 | ||||
-rw-r--r-- | src/mh_view_main.c | 18 | ||||
-rw-r--r-- | src/mh_view_wifi_setup.c | 8 |
5 files changed, 70 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e719a6..8d85adf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/packaging/ug-setting-mobileap-efl.spec b/packaging/ug-setting-mobileap-efl.spec index b2eb068..0dbf56b 100644 --- a/packaging/ug-setting-mobileap-efl.spec +++ b/packaging/ug-setting-mobileap-efl.spec @@ -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) diff --git a/src/mh_common_utility.c b/src/mh_common_utility.c index cd409ea..65f380d 100644 --- a/src/mh_common_utility.c +++ b/src/mh_common_utility.c @@ -17,9 +17,12 @@ * */ +#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 +} diff --git a/src/mh_view_main.c b/src/mh_view_main.c index af55b39..61e5ac4 100644 --- a/src/mh_view_main.c +++ b/src/mh_view_main.c @@ -18,8 +18,12 @@ */ #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; } diff --git a/src/mh_view_wifi_setup.c b/src/mh_view_wifi_setup.c index fa8ed83..ba30a57 100644 --- a/src/mh_view_wifi_setup.c +++ b/src/mh_view_wifi_setup.c @@ -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); |