int CNetworkSetup::exec(CMenuTarget* parent, const std::string &actionKey) { int res = menu_return::RETURN_REPAINT; if (parent) parent->hide(); if(actionKey=="networkapply") { applyNetworkSettings(); readNetworkSettings(); backupNetworkSettings(); return res; } else if(actionKey=="networktest") { printf("[network setup] doing network test...\n"); #if 0 testNetworkSettings( networkConfig->address.c_str(), networkConfig->netmask.c_str(), networkConfig->broadcast.c_str(), networkConfig->gateway.c_str(), networkConfig->nameserver.c_str(), networkConfig->inet_static); #endif testNetworkSettings(); return res; } else if(actionKey=="networkshow") { dprintf(DEBUG_INFO, "show current network settings...\n"); showCurrentNetworkSettings(); return res; } else if(actionKey=="scanssid") { return showWlanList(); } else if(actionKey=="restore") { int result = ShowMsg(LOCALE_MAINSETTINGS_NETWORK, g_Locale->getText(LOCALE_NETWORKMENU_RESET_SETTINGS_NOW), CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo , NEUTRINO_ICON_QUESTION, width); if (result == CMessageBox::mbrYes) { restoreNetworkSettings(); } return res; } printf("[neutrino] init network setup...\n"); res = showNetworkSetup(); return res; }
int CNetworkSetup::exec(CMenuTarget* parent, const std::string &actionKey) { int res = menu_return::RETURN_REPAINT; if (parent) { parent->hide(); } if(actionKey=="networkapply") { applyNetworkSettings(); return res; } else if(actionKey=="networktest") { printf("[network setup] doing network test...\n"); testNetworkSettings(); return res; } else if(actionKey=="networkshow") { dprintf(DEBUG_INFO, "show current network settings...\n"); showCurrentNetworkSettings(); return res; } else if(actionKey=="networksave") { saveNetworkSettings(); return res; } printf("[neutrino] init network setup...\n"); res = showNetworkSetup(); return res; }