author | benmeyer <benmeyer> | 2002-10-17 15:03:35 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-17 15:03:35 (UTC) |
commit | 1fa7ebd9512ac0497c3ede198621899a10e961af (patch) (unidiff) | |
tree | 45be4e45b5408f46c3f2e59b1241aebf9a9bf869 /noncore/net/networksetup/mainwindowimp.cpp | |
parent | 6c8ae3c8af454c87f5f467fe17cbdffe4c8f5494 (diff) | |
download | opie-1fa7ebd9512ac0497c3ede198621899a10e961af.zip opie-1fa7ebd9512ac0497c3ede198621899a10e961af.tar.gz opie-1fa7ebd9512ac0497c3ede198621899a10e961af.tar.bz2 |
added interface listing
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 | |||
@@ -2,6 +2,8 @@ | |||
2 | #include "addconnectionimp.h" | 2 | #include "addconnectionimp.h" |
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 | ||
7 | #include "kprocess.h" | 9 | #include "kprocess.h" |
@@ -332,6 +334,23 @@ void MainWindowImp::jobDone(KProcess *process){ | |||
332 | } | 334 | } |
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 | ||
337 | /** | 356 | /** |
@@ -366,6 +385,9 @@ void MainWindowImp::updateInterface(Interface *i){ | |||
366 | typeName = "irda"; | 385 | typeName = "irda"; |
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) |
371 | typeName = i->getModuleOwner()->getPixmapName(i); | 393 | typeName = i->getModuleOwner()->getPixmapName(i); |