diff --git a/src/gui/network_setup.cpp b/src/gui/network_setup.cpp index 0a467931e..85338fb35 100644 --- a/src/gui/network_setup.cpp +++ b/src/gui/network_setup.cpp @@ -121,7 +121,7 @@ int CNetworkSetup::exec(CMenuTarget* parent, const std::string &actionKey) } printf("[neutrino] init network setup...\n"); - showNetworkSetup(); + res = showNetworkSetup(); return res; } @@ -175,7 +175,7 @@ static int my_filter(const struct dirent * dent) return 1; } -void CNetworkSetup::showNetworkSetup() +int CNetworkSetup::showNetworkSetup() { struct dirent **namelist; @@ -308,9 +308,10 @@ void CNetworkSetup::showNetworkSetup() //proxyserver submenu networkSettings->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYSERVER_SEP, true, NULL, new CProxySetup(LOCALE_MAINSETTINGS_NETWORK), NULL, CRCInput::RC_0, NEUTRINO_ICON_BUTTON_0)); + int ret = 0; while(true) { int res = menu_return::RETURN_EXIT; - networkSettings->exec(NULL, ""); + ret = networkSettings->exec(NULL, ""); networkSettings->hide(); if (settingsChanged()) @@ -320,6 +321,7 @@ void CNetworkSetup::showNetworkSetup() } selected = networkSettings->getSelected(); delete networkSettings; + return ret; } void CNetworkSetup::showNetworkNTPSetup(CMenuWidget *menu_ntp) diff --git a/src/gui/network_setup.h b/src/gui/network_setup.h index 299900b33..f79f08da8 100644 --- a/src/gui/network_setup.h +++ b/src/gui/network_setup.h @@ -82,7 +82,7 @@ class CNetworkSetup : public CMenuTarget, CChangeObserver void prepareSettings(); void readNetworkSettings(); void backupNetworkSettings(); - void showNetworkSetup(); + int showNetworkSetup(); void showNetworkNTPSetup(CMenuWidget *menu_ntp); void showNetworkNFSMounts(CMenuWidget *menu_nfs); int saveChangesDialog(); diff --git a/src/gui/proxyserver_setup.cpp b/src/gui/proxyserver_setup.cpp index f0ea32eaa..8e2a2fb17 100644 --- a/src/gui/proxyserver_setup.cpp +++ b/src/gui/proxyserver_setup.cpp @@ -66,14 +66,13 @@ int CProxySetup::exec(CMenuTarget* parent, const std::string &/*actionKey*/) parent->hide(); } - showProxySetup(); - + res = showProxySetup(); return res; } /* shows entries for proxy settings */ -void CProxySetup::showProxySetup() +int CProxySetup::showProxySetup() { //init CMenuWidget * mn = new CMenuWidget(menue_title, menue_icon, width); @@ -90,8 +89,9 @@ void CProxySetup::showProxySetup() CStringInputSMS * softUpdate_proxypass = new CStringInputSMS(LOCALE_FLASHUPDATE_PROXYPASSWORD, g_settings.softupdate_proxypassword, 20, LOCALE_FLASHUPDATE_PROXYPASSWORD_HINT1, LOCALE_FLASHUPDATE_PROXYPASSWORD_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789!""ยง$%&/()=?-. "); mn->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYPASSWORD, true, g_settings.softupdate_proxypassword, softUpdate_proxypass, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); - mn->exec(NULL, ""); + int res = mn->exec(NULL, ""); mn->hide(); delete mn; + return res; } diff --git a/src/gui/proxyserver_setup.h b/src/gui/proxyserver_setup.h index b2978989e..d7027e8a2 100644 --- a/src/gui/proxyserver_setup.h +++ b/src/gui/proxyserver_setup.h @@ -44,7 +44,7 @@ class CProxySetup : public CMenuTarget neutrino_locale_t menue_title; std::string menue_icon; - void showProxySetup(); + int showProxySetup(); public: CProxySetup(const neutrino_locale_t title = LOCALE_FLASHUPDATE_PROXYSERVER_SEP, const char * const IconName = NEUTRINO_ICON_SETTINGS);