mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
network_setup: implement ShowHintS for apply settings
This commit is contained in:
@@ -102,8 +102,8 @@ int CNetworkSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
if(actionKey=="networkapply")
|
if(actionKey=="networkapply")
|
||||||
{
|
{
|
||||||
applyNetworkSettings();
|
applyNetworkSettings();
|
||||||
readNetworkSettings();
|
ShowHintS("Read settings...", (sigc::mem_fun(*this, &CNetworkSetup::readNetworkSettings)));
|
||||||
backupNetworkSettings();
|
ShowHintS("Backup settings...", (sigc::mem_fun(*this, &CNetworkSetup::backupNetworkSettings)));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
else if(actionKey=="networktest")
|
else if(actionKey=="networktest")
|
||||||
@@ -558,18 +558,14 @@ void CNetworkSetup::saveNetworkSettings()
|
|||||||
void CNetworkSetup::applyNetworkSettings()
|
void CNetworkSetup::applyNetworkSettings()
|
||||||
{
|
{
|
||||||
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], apply network settings...\n", __func__, __LINE__);
|
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], apply network settings...\n", __func__, __LINE__);
|
||||||
|
ShowHintS(LOCALE_NETWORKMENU_APPLY_SETTINGS, 1);
|
||||||
|
|
||||||
if (!checkForIP())
|
if (!checkForIP())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_NETWORKMENU_APPLY_SETTINGS)); // UTF-8
|
ShowHintS("Stopping network...", (sigc::mem_fun(networkConfig, &CNetworkConfig::stopNetwork)));
|
||||||
hintBox.paint();
|
ShowHintS("Save network settings...", (sigc::mem_fun(*this, &CNetworkSetup::saveNetworkSettings)));
|
||||||
|
ShowHintS("Starting network...", (sigc::mem_fun(networkConfig, &CNetworkConfig::startNetwork)));
|
||||||
networkConfig->stopNetwork();
|
|
||||||
saveNetworkSettings();
|
|
||||||
networkConfig->startNetwork();
|
|
||||||
|
|
||||||
hintBox.hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//open a message dialog with buttons,
|
//open a message dialog with buttons,
|
||||||
@@ -697,6 +693,8 @@ const char * CNetworkSetup::mypinghost(std::string &host)
|
|||||||
void CNetworkSetup::testNetworkSettings()
|
void CNetworkSetup::testNetworkSettings()
|
||||||
{
|
{
|
||||||
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], doing network test...\n", __func__, __LINE__);
|
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], doing network test...\n", __func__, __LINE__);
|
||||||
|
ShowHintS(LOCALE_NETWORKMENU_TEST, 1);
|
||||||
|
|
||||||
std::string our_ip, our_mask, our_broadcast, our_gateway, our_nameserver;
|
std::string our_ip, our_mask, our_broadcast, our_gateway, our_nameserver;
|
||||||
|
|
||||||
std::string text, testsite, offset = " ";
|
std::string text, testsite, offset = " ";
|
||||||
|
Reference in New Issue
Block a user