Diffstat (limited to 'noncore/net/networksetup/mainwindowimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp index 3c13143..ad9362f 100644 --- a/noncore/net/networksetup/mainwindowimp.cpp +++ b/noncore/net/networksetup/mainwindowimp.cpp | |||
@@ -2,6 +2,9 @@ | |||
2 | #include "addserviceimp.h" | 2 | #include "addserviceimp.h" |
3 | #include "interfaceinformationimp.h" | 3 | #include "interfaceinformationimp.h" |
4 | #include "interfacesetupimp.h" | 4 | #include "interfacesetupimp.h" |
5 | #include "interface.h" | ||
6 | #include "kprocess.h" | ||
7 | #include "module.h" | ||
5 | 8 | ||
6 | #include <qpushbutton.h> | 9 | #include <qpushbutton.h> |
7 | #include <qdir.h> | 10 | #include <qdir.h> |
@@ -50,12 +53,20 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par | |||
50 | loadModules(path); | 53 | loadModules(path); |
51 | getInterfaceList(); | 54 | getInterfaceList(); |
52 | serviceList->header()->hide(); | 55 | serviceList->header()->hide(); |
56 | |||
57 | |||
58 | Config cfg("NetworkSetup"); | ||
59 | profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); | ||
53 | } | 60 | } |
54 | 61 | ||
55 | /** | 62 | /** |
56 | * Deconstructor. Unload libraries and save. | 63 | * Deconstructor. Unload libraries and save profile list. |
57 | */ | 64 | */ |
58 | MainWindowImp::~MainWindowImp(){ | 65 | MainWindowImp::~MainWindowImp(){ |
66 | if(profiles.count() > 1){ | ||
67 | Config cfg("NetworkSetup"); | ||
68 | cfg.writeEntry("Profiles", profiles.join(" ")); | ||
69 | } | ||
59 | } | 70 | } |
60 | 71 | ||
61 | void MainWindowImp::loadModules(QString path){ | 72 | void MainWindowImp::loadModules(QString path){ |
@@ -252,7 +263,7 @@ void MainWindowImp::jobDone(KProcess *process){ | |||
252 | if(macAddress == -1) | 263 | if(macAddress == -1) |
253 | macAddress = line.length(); | 264 | macAddress = line.length(); |
254 | if(hardwareName != -1) | 265 | if(hardwareName != -1) |
255 | i->setHardwareName(line.mid(hardwareName+11, macAddress-(hardwareName+11))); | 266 | i->setHardwareName(line.mid(hardwareName+11, macAddress-(hardwareName+11)) + QString(" (%1)").arg(i->getInterfaceName())); |
256 | // We have found an interface | 267 | // We have found an interface |
257 | //qDebug(QString("MainWindowImp: Found Interface: %1").arg(line).latin1()); | 268 | //qDebug(QString("MainWindowImp: Found Interface: %1").arg(line).latin1()); |
258 | interfaceNames.insert(i->getInterfaceName(), i); | 269 | interfaceNames.insert(i->getInterfaceName(), i); |