From a6d551226c22f5d6dd2d2c31df29e1a3d50e34cb Mon Sep 17 00:00:00 2001 From: Priya Kohli Date: Thu, 11 May 2017 16:41:52 +0530 Subject: [PATCH] Changes to hide Wi-Fi List Popup when Passcode popup appears. Change-Id: Ib33ec990d442fa2f16a9fdd414c814f70edb33a2 Signed-off-by: Priya Kohli --- src/layout/layout_network.c | 11 ++++++++--- src/view/network/view_wireless_list.c | 12 ++---------- src/view/network/view_wireless_scanning.c | 6 ------ 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/layout/layout_network.c b/src/layout/layout_network.c index 9cd41a1..c312c92 100644 --- a/src/layout/layout_network.c +++ b/src/layout/layout_network.c @@ -961,6 +961,10 @@ void _wireless_selected_cb(Elm_Object_Item *it, void *data) if (!wifi_name) return; + if (!viewmgr_remove_view(VIEW_WIRELESS_LIST)) { + _ERR("Remove view failed"); + } + if (!_draw_wifi_passcode_popup(priv, wifi_name, false)) { _ERR("Draw passcode popup failed."); return; @@ -1610,9 +1614,9 @@ static bool _draw_wifi_passcode_popup(struct _priv *priv, char *wifi_name, /* Handle special button events */ ctx = (Ecore_IMF_Context*)elm_entry_imf_context_get(entry); ecore_imf_context_event_callback_add(ctx, - ECORE_IMF_CALLBACK_COMMIT, _imf_commit_event_cb, priv); + ECORE_IMF_CALLBACK_COMMIT, _imf_commit_event_cb, priv); ecore_imf_context_event_callback_add(ctx, - ECORE_IMF_CALLBACK_DELETE_SURROUNDING, _imf_delete_event_cb, priv); + ECORE_IMF_CALLBACK_DELETE_SURROUNDING, _imf_delete_event_cb, priv); elm_object_disabled_set(priv->popup_btn2, EINA_TRUE); /* Set focus into entry */ @@ -1621,7 +1625,8 @@ static bool _draw_wifi_passcode_popup(struct _priv *priv, char *wifi_name, if (isReconnect) elm_object_part_text_set(ly, PART_WIFI_POPUP_ERROR_MSG, STR_WIRELESS_WRONG_PWD); - evas_object_show(popup); + evas_object_show(priv->passcode_popup); + elm_object_focus_set(entry, EINA_TRUE); return true; } diff --git a/src/view/network/view_wireless_list.c b/src/view/network/view_wireless_list.c index d5ccde8..7ba73f6 100644 --- a/src/view/network/view_wireless_list.c +++ b/src/view/network/view_wireless_list.c @@ -48,7 +48,6 @@ static void widget_min_set(Evas_Object *table, Evas_Object *obj, Evas_Coord w, E { Evas_Object *rect; - rect = evas_object_rectangle_add(evas_object_evas_get(table)); evas_object_size_hint_min_set(rect, w, h); evas_object_size_hint_weight_set(rect , EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); @@ -58,8 +57,6 @@ static void widget_min_set(Evas_Object *table, Evas_Object *obj, Evas_Coord w, E evas_object_size_hint_weight_set(obj , EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_table_pack(table, obj, 0, 0, 1, 1); - -// return table; } static void _destroy_list_type_popup(struct _priv *priv) @@ -120,7 +117,7 @@ static Evas_Object *_create(Evas_Object *win, void *data) return NULL; } evas_object_event_callback_add(wifi_list_popup, EVAS_CALLBACK_KEY_DOWN, - _popup_list_key_down_cb, priv); + _popup_list_key_down_cb, priv); list = datamgr_get_data(priv->wirelessmgr); if (!list) { @@ -160,19 +157,16 @@ static Evas_Object *_create(Evas_Object *win, void *data) layoutmgr_add_grid_cb(priv->listmgr, LIST_WIRELESS, priv); - if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) _ERR("Listmgr update list failed."); datamgr_update(priv->wirelessmgr, WIRELESS_ACTIVATE); list = datamgr_get_data(priv->wirelessmgr); if (!list) { - //_draw_no_contents_message(priv); return NULL; } if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) _ERR("Listmgr update list failed."); - elm_object_focus_allow_set(wifi_list_popup, EINA_TRUE); elm_object_content_set(wifi_list_popup, ly); @@ -197,8 +191,6 @@ static void _show(void *data) } evas_object_show(priv->base); - - } static void _hide(void *data) @@ -210,7 +202,7 @@ static void _hide(void *data) return; } - evas_object_hide(priv->base); + evas_object_hide(wifi_list_popup); } static void _update(void *layout_data, int update_type, void *data) diff --git a/src/view/network/view_wireless_scanning.c b/src/view/network/view_wireless_scanning.c index 7c1cf00..cb936d2 100644 --- a/src/view/network/view_wireless_scanning.c +++ b/src/view/network/view_wireless_scanning.c @@ -183,14 +183,11 @@ static Evas_Object *_create(Evas_Object *win, void *data) } table = elm_table_add(wifi_scan_popup); -// elm_table_homogeneous_set(table, EINA_TRUE); -// elm_table_padding_set(table, 0, 0); evas_object_size_hint_weight_set(table, 0, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(ly, PART_WIRELESS_LIST, table); if (!table) { @@ -216,12 +213,9 @@ static Evas_Object *_create(Evas_Object *win, void *data) listmgr_add_inner_grid_cb(priv->listmgr, LIST_WIRELESS, &_grid_input_handler, priv); - if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) _ERR("Listmgr update list failed."); -// list = datamgr_get_data(priv->wirelessmgr); if (!list) { - //_draw_no_contents_message(priv); return NULL; } if (!listmgr_update_grid(priv->listmgr, LIST_WIRELESS)) -- 2.7.4