Diffstat (limited to 'noncore/net/networksetup/mainwindowimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp index 36f12e0..24af1ec 100644 --- a/noncore/net/networksetup/mainwindowimp.cpp +++ b/noncore/net/networksetup/mainwindowimp.cpp | |||
@@ -3,4 +3,6 @@ | |||
3 | #include "interfaceinformationimp.h" | 3 | #include "interfaceinformationimp.h" |
4 | #include "interfacesetupimp.h" | 4 | #include "interfacesetupimp.h" |
5 | #include "interfaces.h" | ||
6 | |||
5 | #include "module.h" | 7 | #include "module.h" |
6 | 8 | ||
@@ -333,4 +335,21 @@ void MainWindowImp::jobDone(KProcess *process){ | |||
333 | file.close(); | 335 | file.close(); |
334 | QFile::remove(fileName); | 336 | QFile::remove(fileName); |
337 | if(threads.count() == 0){ | ||
338 | Interfaces i; | ||
339 | QStringList list = i.getInterfaceList(); | ||
340 | QMap<QString, Interface*>::Iterator it; | ||
341 | for ( QStringList::Iterator ni = list.begin(); ni != list.end(); ++ni ) { | ||
342 | for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it ){ | ||
343 | if(it.key() == (*ni)){ | ||
344 | Interface *i = new Interface(*ni, false); | ||
345 | i->setAttached(false); | ||
346 | i->setHardwareName(QString("Disconnected (%1)").arg(*ni)); | ||
347 | i->setInterfaceName(*ni); | ||
348 | interfaceNames.insert(i->getInterfaceName(), i); | ||
349 | updateInterface(i); | ||
350 | } | ||
351 | } | ||
352 | } | ||
353 | } | ||
335 | } | 354 | } |
336 | 355 | ||
@@ -367,4 +386,7 @@ void MainWindowImp::updateInterface(Interface *i){ | |||
367 | if(i->getInterfaceName().contains("wlan")) | 386 | if(i->getInterfaceName().contains("wlan")) |
368 | typeName = "wlan"; | 387 | typeName = "wlan"; |
388 | |||
389 | if(!i->isAttached()) | ||
390 | typeName = "connect_no"; | ||
369 | // Actually try to use the Module | 391 | // Actually try to use the Module |
370 | if(i->getModuleOwner() != NULL) | 392 | if(i->getModuleOwner() != NULL) |