From d28ab58d6f0a24d66af7853df40750d64fe3e9fc Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Tue, 5 Apr 2016 17:08:36 +0900 Subject: [PATCH] [TSAM-1919, TSAM-1927, TSAM-1936] Fix jira issues - Add network privileges - Modify toggle buttons Change-Id: I810ce5638d427882f4767493cbe83bbb22b5568a Signed-off-by: Seonah Moon --- packaging/ug-setting-mobileap-efl.spec | 2 +- src/mh_view_main.c | 37 +++++++++------------------------- src/mh_view_wifi_setup.c | 15 ++------------ ug-setting-mobileap-efl.xml | 5 ++++- 4 files changed, 16 insertions(+), 43 deletions(-) diff --git a/packaging/ug-setting-mobileap-efl.spec b/packaging/ug-setting-mobileap-efl.spec index 5701c8b..e944317 100755 --- 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: 1.0.127 +Version: 1.0.128 Release: 1 Group: App/Network License: Flora-1.1 diff --git a/src/mh_view_main.c b/src/mh_view_main.c index 84b9c7d..35893b8 100755 --- a/src/mh_view_main.c +++ b/src/mh_view_main.c @@ -758,7 +758,6 @@ static Evas_Object *__get_wifi_icon(void *data, Evas_Object *obj, { mh_appdata_t *ad = (mh_appdata_t*)data; Evas_Object *btn = NULL; - Evas_Object *progressbar = NULL; Evas_Object *icon_layout = NULL; if (data == NULL) { @@ -767,28 +766,24 @@ static Evas_Object *__get_wifi_icon(void *data, Evas_Object *obj, } if (!strcmp("elm.swallow.end", part)) { - icon_layout = elm_layout_add(obj); - elm_layout_theme_set(icon_layout, "layout", "list/C/type.3", "default"); - if (ad->main.wifi_state == MH_STATE_PROCESS) { - progressbar = _create_progressbar(obj, "process_medium"); - elm_layout_content_set(icon_layout, "elm.swallow.content", progressbar); + btn = _create_progressbar(obj, "process_medium"); } else { btn = elm_check_add(obj); elm_object_style_set(btn, "on&off"); - evas_object_show(btn); - evas_object_pass_events_set(btn, EINA_TRUE); evas_object_propagate_events_set(btn, EINA_FALSE); + evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_check_state_set(btn, ad->main.hotspot_mode & VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI ? EINA_TRUE : EINA_FALSE); evas_object_smart_callback_add(btn, "changed", __wifi_onoff_changed_cb, ad); - elm_layout_content_set(icon_layout, "elm.swallow.content", btn); + evas_object_show(btn); } } - return icon_layout; + return btn; } static char *__get_bt_label(void *data, Evas_Object *obj, const char *part) @@ -804,8 +799,6 @@ static Evas_Object *__get_bt_icon(void *data, Evas_Object *obj, const char *part { mh_appdata_t *ad = (mh_appdata_t *)data; Evas_Object *btn = NULL; - Evas_Object *progressbar = NULL; - Evas_Object *icon_layout = NULL; if (data == NULL) { ERR("The param is NULL\n"); @@ -813,12 +806,8 @@ static Evas_Object *__get_bt_icon(void *data, Evas_Object *obj, const char *part } if (!strcmp("elm.swallow.end", part)) { - icon_layout = elm_layout_add(obj); - elm_layout_theme_set(icon_layout, "layout", "list/C/type.3", "default"); - if (ad->main.bt_state == MH_STATE_PROCESS) { - progressbar = _create_progressbar(obj, "process_medium"); - elm_layout_content_set(icon_layout, "elm.swallow.content", progressbar); + btn = _create_progressbar(obj, "process_medium"); } else { btn = elm_check_add(obj); if (btn == NULL) { @@ -832,11 +821,10 @@ static Evas_Object *__get_bt_icon(void *data, Evas_Object *obj, const char *part VCONFKEY_MOBILE_HOTSPOT_MODE_BT ? EINA_TRUE : EINA_FALSE); evas_object_show(btn); evas_object_smart_callback_add(btn, "changed", __bt_onoff_changed_cb, ad); - elm_layout_content_set(icon_layout, "elm.swallow.content", btn); } } - return icon_layout; + return btn; } static char *__get_usb_label(void *data, Evas_Object *obj, const char *part) @@ -853,8 +841,6 @@ static Evas_Object *__get_usb_icon(void *data, Evas_Object *obj, { mh_appdata_t *ad = (mh_appdata_t *)data; Evas_Object *btn = NULL; - Evas_Object *progressbar = NULL; - Evas_Object *icon_layout = NULL; if (data == NULL) { ERR("The param is NULL\n"); @@ -862,12 +848,8 @@ static Evas_Object *__get_usb_icon(void *data, Evas_Object *obj, } if (!strcmp("elm.swallow.end", part)) { - icon_layout = elm_layout_add(obj); - elm_layout_theme_set(icon_layout, "layout", "list/C/type.3", "default"); - if (ad->main.usb_state == MH_STATE_PROCESS) { - progressbar = _create_progressbar(obj, "process_medium"); - elm_layout_content_set(icon_layout, "elm.swallow.content", progressbar); + btn = _create_progressbar(obj, "process_medium"); } else { btn = elm_check_add(obj); if (btn == NULL) { @@ -881,11 +863,10 @@ static Evas_Object *__get_usb_icon(void *data, Evas_Object *obj, VCONFKEY_MOBILE_HOTSPOT_MODE_USB ? EINA_TRUE : EINA_FALSE); evas_object_show(btn); evas_object_smart_callback_add(btn, "changed", __usb_onoff_changed_cb, ad); - elm_layout_content_set(icon_layout, "elm.swallow.content", btn); } } - return icon_layout; + return btn; } static char *__get_help_label(void *data, Evas_Object *obj, const char *part) diff --git a/src/mh_view_wifi_setup.c b/src/mh_view_wifi_setup.c index 8541b8d..143b156 100755 --- a/src/mh_view_wifi_setup.c +++ b/src/mh_view_wifi_setup.c @@ -201,7 +201,6 @@ static Evas_Object *__gl_hide_icon_get(void *data, Evas_Object *obj, mh_appdata_t *ad = (mh_appdata_t *)data; Evas_Object *btn = NULL; - Evas_Object *icon_layout = NULL; if (data == NULL || obj == NULL || part == NULL) { ERR("Invalid param\n"); @@ -209,8 +208,6 @@ static Evas_Object *__gl_hide_icon_get(void *data, Evas_Object *obj, } if (!strcmp("elm.swallow.end", part)) { - icon_layout = elm_layout_add(obj); - elm_layout_theme_set(icon_layout, "layout", "list/C/type.3", "default"); btn = elm_check_add(obj); if (btn == NULL) { ERR("btn is NULL\n"); @@ -226,12 +223,10 @@ static Evas_Object *__gl_hide_icon_get(void *data, Evas_Object *obj, evas_object_smart_callback_add(btn, "changed", __hide_btn_changed_cb, (void *)ad); ad->setup.hide_btn = btn; - - elm_layout_content_set(icon_layout, "elm.swallow.content", btn); } __MOBILE_AP_FUNC_EXIT__; - return icon_layout; + return btn; } static Evas_Object *__gl_security_icon_get(void *data, Evas_Object *obj, @@ -241,7 +236,6 @@ static Evas_Object *__gl_security_icon_get(void *data, Evas_Object *obj, mh_appdata_t *ad = (mh_appdata_t *)data; Evas_Object *btn = NULL; - Evas_Object *icon_layout = NULL; if (data == NULL || obj == NULL || part == NULL) { ERR("Invalid param\n"); @@ -249,9 +243,6 @@ static Evas_Object *__gl_security_icon_get(void *data, Evas_Object *obj, } if (!strcmp("elm.swallow.end", part)) { - icon_layout = elm_layout_add(obj); - elm_layout_theme_set(icon_layout, "layout", "list/C/type.3", "default"); - btn = elm_check_add(obj); elm_object_style_set(btn, "on&off"); evas_object_show(btn); @@ -263,12 +254,10 @@ static Evas_Object *__gl_security_icon_get(void *data, Evas_Object *obj, evas_object_smart_callback_add(btn, "changed", __security_btn_changed_cb, (void *)ad); ad->setup.security_btn = btn; - - elm_layout_content_set(icon_layout, "elm.swallow.content", btn); } __MOBILE_AP_FUNC_EXIT__; - return icon_layout; + return btn; } static bool __save_wifi_passphrase(mh_appdata_t *ad) diff --git a/ug-setting-mobileap-efl.xml b/ug-setting-mobileap-efl.xml index cce9661..ec07710 100644 --- a/ug-setting-mobileap-efl.xml +++ b/ug-setting-mobileap-efl.xml @@ -1,5 +1,5 @@ - + Tethering UG @@ -62,5 +62,8 @@ http://tizen.org/privilege/tethering.admin + http://tizen.org/privilege/network.get + http://tizen.org/privilege/network.set + http://tizen.org/privilege/network.profile -- 2.7.4