-rw-r--r-- | noncore/net/networksetup/interface.cpp | 2 | ||||
-rw-r--r-- | noncore/net/networksetup/interfaceinformationimp.h | 2 | ||||
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 15 | ||||
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.h | 9 | ||||
-rw-r--r-- | noncore/settings/networksettings/interface.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/interfaceinformationimp.h | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 15 | ||||
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.h | 9 |
8 files changed, 42 insertions, 14 deletions
diff --git a/noncore/net/networksetup/interface.cpp b/noncore/net/networksetup/interface.cpp index b9b09ad..f6eed00 100644 --- a/noncore/net/networksetup/interface.cpp +++ b/noncore/net/networksetup/interface.cpp @@ -197,3 +197,3 @@ bool Interface::refresh(){ // pid com state ppid pgrp session tty_nr tpgid flags - int r = sscanf(line.latin1(), "%*d %*s %*c %*d %*d %*d %*d %*d %*u " + sscanf(line.latin1(), "%*d %*s %*c %*d %*d %*d %*d %*d %*u " // minflt cminflt majflt cmajflt utime stime cutime cstime priority diff --git a/noncore/net/networksetup/interfaceinformationimp.h b/noncore/net/networksetup/interfaceinformationimp.h index 6fc2384..c8a478e 100644 --- a/noncore/net/networksetup/interfaceinformationimp.h +++ b/noncore/net/networksetup/interfaceinformationimp.h @@ -20,5 +20,5 @@ private slots: void advanced(); - Interface *interface; private: + Interface *interface; void updateInterface(); 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 @@ -4,2 +4,5 @@ #include "interfacesetupimp.h"
+#include "interface.h"
+#include "kprocess.h"
+#include "module.h"
@@ -52,2 +55,6 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par serviceList->header()->hide();
+
+
+ Config cfg("NetworkSetup");
+ profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All"));
}
@@ -55,5 +62,9 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par /**
- * Deconstructor. Unload libraries and save.
+ * Deconstructor. Unload libraries and save profile list.
*/
MainWindowImp::~MainWindowImp(){
+ if(profiles.count() > 1){
+ Config cfg("NetworkSetup");
+ cfg.writeEntry("Profiles", profiles.join(" "));
+ }
}
@@ -254,3 +265,3 @@ void MainWindowImp::jobDone(KProcess *process){ if(hardwareName != -1)
- i->setHardwareName(line.mid(hardwareName+11, macAddress-(hardwareName+11)));
+ i->setHardwareName(line.mid(hardwareName+11, macAddress-(hardwareName+11)) + QString(" (%1)").arg(i->getInterfaceName()));
// We have found an interface
diff --git a/noncore/net/networksetup/mainwindowimp.h b/noncore/net/networksetup/mainwindowimp.h index 95ec2a1..0618dd2 100644 --- a/noncore/net/networksetup/mainwindowimp.h +++ b/noncore/net/networksetup/mainwindowimp.h @@ -4,8 +4,9 @@ #include "mainwindow.h"
-#include "module.h"
-#include "interface.h"
-#include "kprocess.h"
#include <qmap.h>
+#include <qstringlist.h>
+class Module;
+class Interface;
class QLibrary;
+class KProcess;
@@ -47,2 +48,4 @@ private: QMap<KProcess*, QString> threads;
+ QStringList profiles;
+
};
diff --git a/noncore/settings/networksettings/interface.cpp b/noncore/settings/networksettings/interface.cpp index b9b09ad..f6eed00 100644 --- a/noncore/settings/networksettings/interface.cpp +++ b/noncore/settings/networksettings/interface.cpp @@ -197,3 +197,3 @@ bool Interface::refresh(){ // pid com state ppid pgrp session tty_nr tpgid flags - int r = sscanf(line.latin1(), "%*d %*s %*c %*d %*d %*d %*d %*d %*u " + sscanf(line.latin1(), "%*d %*s %*c %*d %*d %*d %*d %*d %*u " // minflt cminflt majflt cmajflt utime stime cutime cstime priority diff --git a/noncore/settings/networksettings/interfaceinformationimp.h b/noncore/settings/networksettings/interfaceinformationimp.h index 6fc2384..c8a478e 100644 --- a/noncore/settings/networksettings/interfaceinformationimp.h +++ b/noncore/settings/networksettings/interfaceinformationimp.h @@ -20,5 +20,5 @@ private slots: void advanced(); - Interface *interface; private: + Interface *interface; void updateInterface(); diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 3c13143..ad9362f 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp @@ -4,2 +4,5 @@ #include "interfacesetupimp.h"
+#include "interface.h"
+#include "kprocess.h"
+#include "module.h"
@@ -52,2 +55,6 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par serviceList->header()->hide();
+
+
+ Config cfg("NetworkSetup");
+ profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All"));
}
@@ -55,5 +62,9 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par /**
- * Deconstructor. Unload libraries and save.
+ * Deconstructor. Unload libraries and save profile list.
*/
MainWindowImp::~MainWindowImp(){
+ if(profiles.count() > 1){
+ Config cfg("NetworkSetup");
+ cfg.writeEntry("Profiles", profiles.join(" "));
+ }
}
@@ -254,3 +265,3 @@ void MainWindowImp::jobDone(KProcess *process){ if(hardwareName != -1)
- i->setHardwareName(line.mid(hardwareName+11, macAddress-(hardwareName+11)));
+ i->setHardwareName(line.mid(hardwareName+11, macAddress-(hardwareName+11)) + QString(" (%1)").arg(i->getInterfaceName()));
// We have found an interface
diff --git a/noncore/settings/networksettings/mainwindowimp.h b/noncore/settings/networksettings/mainwindowimp.h index 95ec2a1..0618dd2 100644 --- a/noncore/settings/networksettings/mainwindowimp.h +++ b/noncore/settings/networksettings/mainwindowimp.h @@ -4,8 +4,9 @@ #include "mainwindow.h"
-#include "module.h"
-#include "interface.h"
-#include "kprocess.h"
#include <qmap.h>
+#include <qstringlist.h>
+class Module;
+class Interface;
class QLibrary;
+class KProcess;
@@ -47,2 +48,4 @@ private: QMap<KProcess*, QString> threads;
+ QStringList profiles;
+
};
|