mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +02:00
network setup: allow to change hostname when static ip is set
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1773 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 918fc08ab7
Author: gixxpunk <thomas.harfmann@gmail.com>
Date: 2011-10-23 (Sun, 23 Oct 2011)
Origin message was:
------------------
- network setup: allow to change hostname when static ip is set
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1773 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -236,14 +236,14 @@ void CNetworkSetup::showNetworkSetup()
|
||||
CMenuForwarder *m3 = new CMenuForwarder(LOCALE_NETWORKMENU_BROADCAST , networkConfig->inet_static, network_broadcast , networkSettings_Broadcast );
|
||||
CMenuForwarder *m4 = new CMenuForwarder(LOCALE_NETWORKMENU_GATEWAY , networkConfig->inet_static, network_gateway , networkSettings_Gateway );
|
||||
CMenuForwarder *m5 = new CMenuForwarder(LOCALE_NETWORKMENU_NAMESERVER, networkConfig->inet_static, network_nameserver, networkSettings_NameServer);
|
||||
CMenuForwarder *m8 = new CMenuForwarder(LOCALE_NETWORKMENU_HOSTNAME , !networkConfig->inet_static, network_hostname , networkSettings_Hostname );
|
||||
CMenuForwarder *m8 = new CMenuForwarder(LOCALE_NETWORKMENU_HOSTNAME , networkConfig->inet_static, network_hostname , networkSettings_Hostname );
|
||||
|
||||
dhcpDisable[0] = m1;
|
||||
dhcpDisable[1] = m2;
|
||||
dhcpDisable[2] = m3;
|
||||
dhcpDisable[3] = m4;
|
||||
dhcpDisable[4] = m5;
|
||||
dhcpEnable[0] = m8;
|
||||
dhcpDisable[5] = m8;
|
||||
|
||||
CMenuOptionChooser* o2 = new CMenuOptionChooser(LOCALE_NETWORKMENU_DHCP, &network_dhcp, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this);
|
||||
|
||||
@@ -589,10 +589,6 @@ bool CNetworkSetup::changeNotify(const neutrino_locale_t locale, void * Data)
|
||||
|
||||
for(int i = 0; i < ecnt; i++)
|
||||
dhcpDisable[i]->setActive(CNetworkConfig::getInstance()->inet_static);
|
||||
ecnt = sizeof(dhcpEnable) / sizeof(CMenuForwarder*);
|
||||
|
||||
for(int i = 0; i < ecnt; i++)
|
||||
dhcpEnable[i]->setActive(!CNetworkConfig::getInstance()->inet_static);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@@ -75,8 +75,7 @@ class CNetworkSetup : public CMenuTarget, CChangeObserver
|
||||
std::string old_mac_addr;
|
||||
|
||||
|
||||
CMenuForwarder* dhcpDisable[5];
|
||||
CMenuForwarder* dhcpEnable[1];
|
||||
CMenuForwarder* dhcpDisable[6];
|
||||
CMenuForwarder* wlanEnable[2];
|
||||
|
||||
void restoreNetworkSettings();
|
||||
|
Reference in New Issue
Block a user