Fix wifi list and popup issue 51/54951/1
authorJiwan Kim <ji-wan.kim@samsung.com>
Tue, 15 Dec 2015 07:58:27 +0000 (16:58 +0900)
committerJiwan Kim <ji-wan.kim@samsung.com>
Mon, 21 Dec 2015 03:00:11 +0000 (12:00 +0900)
 - If menu is changed while searching wifi list,
   list is not shown when search is finished.
 - Add 'return' key callback on wifi password popup window.
 - Remove invalid 'connected' check icon.
 - Remove 'connecting' icon when failed.

Change-Id: Ic2f82bb12c15d01591c474a9faecaaf3aab33413

res/widget/gengrid.edc
src/data/data_wireless.c
src/layout/layout_network.c

index 1febeab..bd98a04 100644 (file)
@@ -529,6 +529,15 @@ group {
                }
 
                program {
+                       signal, "elm,state,part_state_check,*";
+                       source, SRC_ELM;
+                       script {
+                               set_int(check_state, STATE_NORMAL);
+                               set_state(PART:"part.check.icon", "unfocused.unchecked", 0.0);
+                       }
+               }
+
+               program {
                        signal, "elm,state,selected";
                        source, SRC_ELM;
                        action, STATE_SET "selected" 0.0;
index 0d11a7d..b68a320 100644 (file)
@@ -123,6 +123,9 @@ static void _wifi_connection_state_changed_cb(wifi_connection_state_e state,
        r = wifi_ap_get_connection_state(ap, &connection_state);
        if (r != WIFI_ERROR_NONE) {
                _ERR("wifi_ap_get_connection_state failed.");
+               if (priv && priv->event_cb) {
+                       priv->event_cb(EVENT_DATA_SELECT_FAIL, priv->cb_data);
+               }
                return;
        }
 
index 8b4a389..cba0b11 100644 (file)
@@ -308,6 +308,9 @@ static void _data_event_cb(enum event_type type, void *data)
 
        case EVENT_DATA_SELECT_FAIL:
                /* FIXME: It will be implemeted later as follinw GUI guide. */
+               _DBG("Failed to connect");
+               elm_object_item_signal_emit(priv->selected_wireless_item,
+                               SIG_LOADING_STOP, SRC_ELM);
                break;
 
        default:
@@ -391,6 +394,16 @@ static input_handler _popup_input_handler = {
        .key_down = _popup_key_down_cb
 };
 
+static void _popup_entry_key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       Evas_Object *btn_ok = (Evas_Object*)data;
+       Evas_Event_Key_Down *ev = (Evas_Event_Key_Down*)event_info;
+
+       if (ev && !strcmp(ev->keyname, KEY_ENTER)) {
+               elm_object_focus_set(btn_ok, EINA_TRUE);
+       }
+}
+
 static bool _draw_wifi_passcode_popup(struct _priv *priv, char *wifi_name)
 {
        Evas_Object *popup, *ly, *entry, *btn1, *btn2;
@@ -441,6 +454,9 @@ static bool _draw_wifi_passcode_popup(struct _priv *priv, char *wifi_name)
        inputmgr_add_callback(btn1, EO_BTN_CANCEL, &_popup_input_handler, priv);
        inputmgr_add_callback(btn2, EO_BTN_OK, &_popup_input_handler, priv);
 
+       evas_object_event_callback_add(entry, EVAS_CALLBACK_KEY_DOWN,
+                       _popup_entry_key_down_cb, btn2);
+
        elm_object_focus_set(priv->passcode_entry, EINA_TRUE);
 
        return true;
@@ -614,7 +630,7 @@ static void _show(void *layout_data)
        if (priv->ly) {
                if (!datamgr_update(priv->wirelessmgr)) {
                        _ERR("Unavailable status for updating list.");
-                       return;
+                       /* Do not return here unless entire layout would not shown */
                }
 
                evas_object_show(priv->ly);