Merge "P120829-5684" into 2.0_beta
[apps/core/preloaded/settings.git] / setting-network / src / setting-network.c
index c54cd99..1518342 100755 (executable)
@@ -399,10 +399,10 @@ void setting_tapi_set_band_cb(TapiHandle *handle, int result, void *data, void *
        SETTING_TRACE(" - result = 0x%x", result);
        ret_if(!user_data);
        SettingNetworkUG *ad = user_data;
+       ret_if(NULL == ad->data_net_mode);
 
        int err;
        if (result == TAPI_NETWORK_NO_ERR) {
-               ret_if(NULL == ad->data_net_mode);
                ad->net_mode = elm_radio_value_get(ad->data_net_mode->rgd);//get value from radio
                setting_set_int_slp_key(ad->data_net_mode->int_slp_setting_binded,
                                        ad->net_mode, &err);
@@ -634,7 +634,12 @@ void setting_tapi_search_network_cb(TapiHandle *handle, int result, void *data,
                FREE(pa_net_name);
 
                SETTING_TRACE("Found %d valid networks in total[%d]", valid_cnt, cnt);
-               setting_create_popup_without_btn(ad, ad->win_get, NULL, _(keyStr_Searched), NULL, POPUP_INTERVAL, FALSE, FALSE);
+               valid_cnt = 0;
+               if (valid_cnt > 0){
+                       setting_create_popup_without_btn(ad, ad->win_get, NULL, _(keyStr_Searched), NULL, POPUP_INTERVAL, FALSE, FALSE);
+               } else { //there is no invalid plmn nearby
+                       setting_create_popup_without_btn(ad, ad->win_get, NULL, _("There is no network nearby"), NULL, POPUP_INTERVAL, FALSE, FALSE);
+               }
        } else {
                setting_create_popup_without_btn(ad, ad->win_get, NULL, _(keyStr_Failed_Searched), NULL, POPUP_INTERVAL, FALSE, FALSE);
        }