Diffstat (limited to 'noncore/settings/networksettings2/networksettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/networksettings.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/noncore/settings/networksettings2/networksettings.cpp b/noncore/settings/networksettings2/networksettings.cpp index 78b6cce..80dcb3d 100644 --- a/noncore/settings/networksettings2/networksettings.cpp +++ b/noncore/settings/networksettings2/networksettings.cpp | |||
@@ -65,8 +65,8 @@ NetworkSettings::NetworkSettings( QWidget *parent, | |||
65 | this, SLOT(SLOT_EditNode(QListBoxItem*)) ); | 65 | this, SLOT(SLOT_EditNode(QListBoxItem*)) ); |
66 | 66 | ||
67 | { Name2Connection_t & M = NSResources->connections(); | 67 | { Name2NetworkSetup_t & M = NSResources->networkSetups(); |
68 | NodeCollection * NC; | 68 | NetworkSetup * NC; |
69 | // for all connections | 69 | // for all NetworkSetups |
70 | for( QDictIterator<NodeCollection> it(M); | 70 | for( QDictIterator<NetworkSetup> it(M); |
71 | it.current(); | 71 | it.current(); |
72 | ++it ) { | 72 | ++it ) { |
@@ -82,5 +82,5 @@ NetworkSettings::NetworkSettings( QWidget *parent, | |||
82 | 82 | ||
83 | // if no profiles -> auto popup editing | 83 | // if no profiles -> auto popup editing |
84 | if( NSResources->connections().count() == 0 ) { | 84 | if( NSResources->networkSetups().count() == 0 ) { |
85 | QTimer::singleShot( 100, this, SLOT(SLOT_AddNode() ) ); | 85 | QTimer::singleShot( 100, this, SLOT(SLOT_AddNode() ) ); |
86 | } | 86 | } |
@@ -137,8 +137,8 @@ void NetworkSettings::SLOT_RefreshStates( void ) { | |||
137 | 137 | ||
138 | if( LBI ) { | 138 | if( LBI ) { |
139 | NodeCollection * NC; | 139 | NetworkSetup * NC; |
140 | NSResources->system().probeInterfaces(); | 140 | NSResources->system().probeInterfaces(); |
141 | // update current selection only | 141 | // update current selection only |
142 | NC = NSResources->findConnection( LBI->text() ); | 142 | NC = NSResources->findNetworkSetup( LBI->text() ); |
143 | if( NC ) { | 143 | if( NC ) { |
144 | State_t OldS = NC->state(); | 144 | State_t OldS = NC->state(); |
@@ -153,8 +153,8 @@ void NetworkSettings::SLOT_RefreshStates( void ) { | |||
153 | /* -> LATER !! | 153 | /* -> LATER !! |
154 | bool is; | 154 | bool is; |
155 | NodeCollection * NC; | 155 | NetworkSetup * NC; |
156 | 156 | ||
157 | for( unsigned int i = 0; i < Profiles_LB->count() ; i ++ ) { | 157 | for( unsigned int i = 0; i < Profiles_LB->count() ; i ++ ) { |
158 | NC = NSResources->findConnection( Profiles_LB->text(i) ); | 158 | NC = NSResources->findNetworkSetup( Profiles_LB->text(i) ); |
159 | if( NC ) { | 159 | if( NC ) { |
160 | State_t OldS = NC->state(); | 160 | State_t OldS = NC->state(); |
@@ -191,5 +191,5 @@ void NetworkSettings::SLOT_DeleteNode( void ) { | |||
191 | tr( "Remove selected profile ?" ), | 191 | tr( "Remove selected profile ?" ), |
192 | 1, 0 ) == 1 ) { | 192 | 1, 0 ) == 1 ) { |
193 | NSResources->removeConnection( LBI->text() ); | 193 | NSResources->removeNetworkSetup( LBI->text() ); |
194 | delete LBI; | 194 | delete LBI; |
195 | NSD.setModified( 1 ); | 195 | NSD.setModified( 1 ); |
@@ -200,13 +200,13 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) { | |||
200 | QString OldName = ""; | 200 | QString OldName = ""; |
201 | 201 | ||
202 | EditConnection EC( this ); | 202 | EditNetworkSetup EC( this ); |
203 | 203 | ||
204 | if( LBI ) { | 204 | if( LBI ) { |
205 | NodeCollection * NC = NSResources->findConnection( LBI->text() ); | 205 | NetworkSetup * NC = NSResources->findNetworkSetup( LBI->text() ); |
206 | if( ! NC ) { | 206 | if( ! NC ) { |
207 | return; | 207 | return; |
208 | } | 208 | } |
209 | OldName = NC->name(); | 209 | OldName = NC->name(); |
210 | EC.setConnection( NC ); | 210 | EC.setNetworkSetup( NC ); |
211 | } | 211 | } |
212 | 212 | ||
@@ -219,10 +219,10 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) { | |||
219 | if( EC.exec() == QDialog::Accepted ) { | 219 | if( EC.exec() == QDialog::Accepted ) { |
220 | // toplevel item -> store | 220 | // toplevel item -> store |
221 | NodeCollection * NC = EC.connection(); | 221 | NetworkSetup * NC = EC.networkSetup(); |
222 | if( NC->isModified() ) { | 222 | if( NC->isModified() ) { |
223 | if( LBI ) { | 223 | if( LBI ) { |
224 | if( NC->name() != OldName ) { | 224 | if( NC->name() != OldName ) { |
225 | // find if new name is free | 225 | // find if new name is free |
226 | NodeCollection * LCN = NSResources->findConnection( | 226 | NetworkSetup * LCN = NSResources->findNetworkSetup( |
227 | NC->name() ); | 227 | NC->name() ); |
228 | if( LCN ) { | 228 | if( LCN ) { |
@@ -235,6 +235,6 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) { | |||
235 | } // else new name | 235 | } // else new name |
236 | // new name -> remove item | 236 | // new name -> remove item |
237 | NSResources->removeConnection( OldName ); | 237 | NSResources->removeNetworkSetup( OldName ); |
238 | NSResources->addConnection( NC, 0 ); | 238 | NSResources->addNetworkSetup( NC, 0 ); |
239 | } // else not changed | 239 | } // else not changed |
240 | 240 | ||
@@ -247,6 +247,6 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) { | |||
247 | // new item | 247 | // new item |
248 | int ci = Profiles_LB->count(); | 248 | int ci = Profiles_LB->count(); |
249 | NSResources->addConnection( NC, 0 ); | 249 | NSResources->addNetworkSetup( NC, 0 ); |
250 | NC->setNumber( NSResources->assignConnectionNumber() ); | 250 | NC->setNumber( NSResources->assignNetworkSetupNumber() ); |
251 | Profiles_LB->insertItem( NC->devicePixmap(), NC->name() ); | 251 | Profiles_LB->insertItem( NC->devicePixmap(), NC->name() ); |
252 | Profiles_LB->setSelected( ci, TRUE ); | 252 | Profiles_LB->setSelected( ci, TRUE ); |
@@ -255,7 +255,7 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) { | |||
255 | } | 255 | } |
256 | } else { | 256 | } else { |
257 | // cancelled : reset connection | 257 | // cancelled : reset NetworkSetup |
258 | if( LBI ) { | 258 | if( LBI ) { |
259 | NodeCollection * NC = NSResources->findConnection( LBI->text() ); | 259 | NetworkSetup * NC = NSResources->findNetworkSetup( LBI->text() ); |
260 | NC->reassign(); | 260 | NC->reassign(); |
261 | } | 261 | } |
@@ -271,5 +271,5 @@ void NetworkSettings::SLOT_ShowNode( QListBoxItem * LBI ) { | |||
271 | return; | 271 | return; |
272 | 272 | ||
273 | NodeCollection * NC = NSResources->findConnection( LBI->text() ); | 273 | NetworkSetup * NC = NSResources->findNetworkSetup( LBI->text() ); |
274 | 274 | ||
275 | if( NC->description().isEmpty() ) { | 275 | if( NC->description().isEmpty() ) { |
@@ -354,5 +354,5 @@ void NetworkSettings::SLOT_Disable( bool T ) { | |||
354 | return; | 354 | return; |
355 | 355 | ||
356 | NodeCollection * NC = NSResources->findConnection( LBI->text() ); | 356 | NetworkSetup * NC = NSResources->findNetworkSetup( LBI->text() ); |
357 | 357 | ||
358 | Log(( "Prepare to %sable\n", (T) ? "en" : "dis" )); | 358 | Log(( "Prepare to %sable\n", (T) ? "en" : "dis" )); |
@@ -383,6 +383,6 @@ void NetworkSettings::SLOT_Up( void ) { | |||
383 | return; | 383 | return; |
384 | 384 | ||
385 | NodeCollection * NC = | 385 | NetworkSetup * NC = |
386 | NSResources->findConnection( LBI->text() ); | 386 | NSResources->findNetworkSetup( LBI->text() ); |
387 | 387 | ||
388 | switch( NC->state() ) { | 388 | switch( NC->state() ) { |
@@ -439,6 +439,6 @@ void NetworkSettings::SLOT_Down( void ) { | |||
439 | return; | 439 | return; |
440 | 440 | ||
441 | NodeCollection * NC = | 441 | NetworkSetup * NC = |
442 | NSResources->findConnection( LBI->text() ); | 442 | NSResources->findNetworkSetup( LBI->text() ); |
443 | 443 | ||
444 | switch( NC->state() ) { | 444 | switch( NC->state() ) { |