author | wimpie <wimpie> | 2004-04-04 15:23:16 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-04 15:23:16 (UTC) |
commit | fd9146de7698a796659b68606429da490f817138 (patch) (unidiff) | |
tree | f026bf2a7adcaaa3a0dd0429e7474f536787253d /noncore/settings/networksettings2/network/network_NNI.cpp | |
parent | 5b52572e2ec9f0f6f39706aceb9ec1e98440fd3d (diff) | |
download | opie-fd9146de7698a796659b68606429da490f817138.zip opie-fd9146de7698a796659b68606429da490f817138.tar.gz opie-fd9146de7698a796659b68606429da490f817138.tar.bz2 |
Many changes
Diffstat (limited to 'noncore/settings/networksettings2/network/network_NNI.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/network/network_NNI.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/settings/networksettings2/network/network_NNI.cpp b/noncore/settings/networksettings2/network/network_NNI.cpp index eac2d66..054385a 100644 --- a/noncore/settings/networksettings2/network/network_NNI.cpp +++ b/noncore/settings/networksettings2/network/network_NNI.cpp | |||
@@ -90,27 +90,30 @@ QWidget * ANetwork::edit( QWidget * parent ) { | |||
90 | return GUI; | 90 | return GUI; |
91 | } | 91 | } |
92 | 92 | ||
93 | QString ANetwork::acceptable( void ) { | 93 | QString ANetwork::acceptable( void ) { |
94 | return ( GUI ) ? GUI->acceptable( ) : QString(); | 94 | return ( GUI ) ? GUI->acceptable( ) : QString(); |
95 | } | 95 | } |
96 | 96 | ||
97 | void ANetwork::commit( void ) { | 97 | void ANetwork::commit( void ) { |
98 | if( GUI && GUI->commit( Data ) ) | 98 | if( GUI && GUI->commit( Data ) ) |
99 | setModified( 1 ); | 99 | setModified( 1 ); |
100 | } | 100 | } |
101 | 101 | ||
102 | bool ANetwork::hasDataFor( const QString & S ) { | ||
103 | return S == "interfaces"; | ||
104 | } | ||
105 | |||
102 | bool ANetwork::generateDataForCommonFile( SystemFile & S, long DevNr ) { | 106 | bool ANetwork::generateDataForCommonFile( SystemFile & S, long DevNr ) { |
103 | AsDevice * Dev = runtime()->device(); | 107 | QString NIC = runtime()->device()->netNode()->nodeClass()->genNic( DevNr ); |
104 | QString NIC = Dev->genNic( DevNr ); | ||
105 | 108 | ||
106 | if( S.name() == "interfaces" ) { | 109 | if( S.name() == "interfaces" ) { |
107 | // we can safely call from here since device item is deeper | 110 | // we can safely call from here since device item is deeper |
108 | if( Data.UseDHCP ) { | 111 | if( Data.UseDHCP ) { |
109 | S << "iface " << NIC << "-c" << connection()->number() << | 112 | S << "iface " << NIC << "-c" << connection()->number() << |
110 | "-allowed inet dhcp" << endl; | 113 | "-allowed inet dhcp" << endl; |
111 | S << " up echo \"" << NIC << "\" > /tmp/profile-" << connection()->number() << | 114 | S << " up echo \"" << NIC << "\" > /tmp/profile-" << connection()->number() << |
112 | ".up" << Data.IPAddress << endl; | 115 | ".up" << Data.IPAddress << endl; |
113 | if( Data.SendHostname ) { | 116 | if( Data.SendHostname ) { |
114 | S << " hostname "<< Data.Hostname << endl; | 117 | S << " hostname "<< Data.Hostname << endl; |
115 | } | 118 | } |
116 | 119 | ||