From e88d665630fd623fc79ec96c0ecfbd3168a951af Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Mon, 24 Oct 2016 18:18:27 +0900 Subject: [PATCH] [TSAM-9313/TSAM-9285] Fixed some bugs - Use "ELM_INPUT_PANEL_LAYOUT_NUMBERONLY" option for proxy entry - Check Wi-Fi security type before showing detail layout Change-Id: I2fe93e86501ce4b4ae7201dce5053af724883417 Signed-off-by: Seonah Moon --- packaging/wifi-efl-ug.spec | 2 +- sources/wearable/res/wearable-circle/edje/wifi.edc | 55 ++++++++++++++++++---- sources/wearable/src/net/wifi_manager.c | 14 +++++- sources/wearable/src/wearable-circle/app_main.c | 2 +- .../src/wearable-circle/view/popup_change_ap.c | 2 +- 5 files changed, 63 insertions(+), 12 deletions(-) diff --git a/packaging/wifi-efl-ug.spec b/packaging/wifi-efl-ug.spec index 14e79a8..e9b2fa5 100644 --- a/packaging/wifi-efl-ug.spec +++ b/packaging/wifi-efl-ug.spec @@ -1,7 +1,7 @@ %define _unpackaged_files_terminate_build 0 Name: wifi-efl-ug Summary: Wi-Fi UI Gadget for TIZEN -Version: 1.0.207 +Version: 1.0.208 Release: 1 Group: App/Network License: Flora-1.1 diff --git a/sources/wearable/res/wearable-circle/edje/wifi.edc b/sources/wearable/res/wearable-circle/edje/wifi.edc index c535ad9..184b9f8 100755 --- a/sources/wearable/res/wearable-circle/edje/wifi.edc +++ b/sources/wearable/res/wearable-circle/edje/wifi.edc @@ -26,6 +26,11 @@ #define POPUP_ENTRY_H 66 #define POPUP_PADDING_H 32 #define POPUP_ENTRY_HIDDEN_AP_MIN 0 325 +#define POPUP_BASE_DEFAULT_WIDTH 360 +#define POPUP_LEFT_RIGHT_PADDING_WIDTH 16 +#define POPUP_TITLE_BOTTOM_PADDING_HEIGHT 8 +#define POPUP_BODY_BUTTON_WIDTH_INC 160 +#define POPUP_BODY_BUTTON_HEIGHT_INC 160 collections { base_scale: 1.3; @@ -97,14 +102,14 @@ collections { type: SPACER; scale: 1; description { state: "default" 0.0; - min: 360 0; + min: POPUP_BASE_DEFAULT_WIDTH 0; } } part { name: "top_left_pad"; type: SPACER; scale: 1; description { state: "default" 0.0; - min: 68 76; + min: POPUP_LEFT_RIGHT_PADDING_WIDTH 0; rel1.to: "base"; rel2 { to: "base"; @@ -118,7 +123,7 @@ collections { type: SPACER; scale: 1; description { state: "default" 0.0; - min: 68 42; + min: POPUP_LEFT_RIGHT_PADDING_WIDTH 0; rel1 { to: "base"; relative: 1.0 1.0; @@ -128,21 +133,55 @@ collections { fixed: 1 1; } } + part { name: "elm.text.title"; + type: TEXTBLOCK; + scale: 1; + description { state: "default" 0.0; + rel1 { + to: "top_left_pad"; + relative: 1.0 1.0; + } + rel2 { + to_x: "bottom_right_pad"; + to_y: "top_left_pad"; + relative: 0.0 1.0; + } + align: 0.5 0.0; + fixed: 0 1; + text { + style: "textblock_popup_title"; + min: 0 1; + } + } + } + part { name: "title_bottom_padding"; + type: SPACER; + scale: 1; + description { state: "default" 0.0; + min: 0 POPUP_TITLE_BOTTOM_PADDING_HEIGHT; + rel1 { + to: "elm.text.title"; + relative: 0.0 1.0; + } + rel2.to: "elm.text.title"; + align: 0.5 0.0; + fixed: 0 1; + } + } part { name: "elm.text.content"; type: TEXTBLOCK; scale: 1; description { state: "default" 0.0; max: -1 3703; // 4000(max height) - (76 + 42 + 19 + 160) rel1 { - to: "top_left_pad"; - relative: 1.0 1.0; + to: "title_bottom_padding"; + relative: 0.0 1.0; } rel2 { to_x: "bottom_right_pad"; - to_y: "top_left_pad"; - relative: 0.0 1.0; + relative: 0.0 0.0; } - align: 0.5 0.0; + align: 0.0 0.0; fixed: 0 1; text { style: "textblock_popup_body"; diff --git a/sources/wearable/src/net/wifi_manager.c b/sources/wearable/src/net/wifi_manager.c index 73c0025..dce17da 100755 --- a/sources/wearable/src/net/wifi_manager.c +++ b/sources/wearable/src/net/wifi_manager.c @@ -195,6 +195,18 @@ static void _update_wifi_config_list(wifi_manager_object *manager) __WIFI_FUNC_EXIT__; } +static bool __compare_wifi_security_type(wifi_security_type_e sec_type1, wifi_security_type_e sec_type2) +{ + if (sec_type1 == sec_type2) + return true; + + if ((sec_type1 == WIFI_SECURITY_TYPE_WPA_PSK || sec_type1 == WIFI_SECURITY_TYPE_WPA2_PSK) + && (sec_type1 == WIFI_SECURITY_TYPE_WPA_PSK || sec_type1 == WIFI_SECURITY_TYPE_WPA2_PSK)) + return true; + + return false; +} + static wifi_config_object *_find_wifi_config_by_wifi_ap(wifi_manager_object *manager, wifi_ap_object *ap) { @@ -211,7 +223,7 @@ static wifi_config_object *_find_wifi_config_by_wifi_ap(wifi_manager_object *man config_list = manager->config_list; while (config_list) { wifi_config_object *config = config_list->data; - if (!g_strcmp0(config->name, ssid) && (config->security_type == sec_type)) { + if (!g_strcmp0(config->name, ssid) && __compare_wifi_security_type(config->security_type, sec_type)) { g_free(ssid); return config; } diff --git a/sources/wearable/src/wearable-circle/app_main.c b/sources/wearable/src/wearable-circle/app_main.c index d987c98..f8eaa12 100755 --- a/sources/wearable/src/wearable-circle/app_main.c +++ b/sources/wearable/src/wearable-circle/app_main.c @@ -3282,7 +3282,7 @@ static void __proxy_setting_menu_tap_cb(void *data, Evas_Object *obj, void *even break; case PROXY_SETTING_ITEM_PORT: - input_type = ELM_INPUT_PANEL_LAYOUT_NUMBER; + input_type = ELM_INPUT_PANEL_LAYOUT_NUMBERONLY; is_guide_text = _is_default_proxy_port(proxy_text); break; diff --git a/sources/wearable/src/wearable-circle/view/popup_change_ap.c b/sources/wearable/src/wearable-circle/view/popup_change_ap.c index ae8f493..889eda9 100755 --- a/sources/wearable/src/wearable-circle/view/popup_change_ap.c +++ b/sources/wearable/src/wearable-circle/view/popup_change_ap.c @@ -154,7 +154,7 @@ static Evas_Object *_create_forget_button(popup_change_ap_object *self, Evas_Obj Evas_Object *forget_button = elm_button_add(parent); WIFI_RET_VAL_IF_FAIL(forget_button, NULL); - elm_object_style_set(forget_button, "popup/circle/body"); + elm_object_style_set(forget_button, "default"); elm_object_text_set(forget_button, STR_FORGET); evas_object_size_hint_weight_set(forget_button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(forget_button, EVAS_HINT_FILL, EVAS_HINT_FILL); -- 2.7.4