author | benmeyer <benmeyer> | 2002-10-30 15:36:45 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-30 15:36:45 (UTC) |
commit | a22f8dd98789f4638ab241d281d4319e0ed911ba (patch) (unidiff) | |
tree | 93131daa22042c2c3fbd52f52a90edb1e8fae92c | |
parent | bc95eea1eda31b458e5342695b3ffe246d5ab006 (diff) | |
download | opie-a22f8dd98789f4638ab241d281d4319e0ed911ba.zip opie-a22f8dd98789f4638ab241d281d4319e0ed911ba.tar.gz opie-a22f8dd98789f4638ab241d281d4319e0ed911ba.tar.bz2 |
Re-added profile information which makes interfaces work again
19 files changed, 59 insertions, 47 deletions
diff --git a/noncore/net/networksetup/TODO b/noncore/net/networksetup/TODO index 0584f81..ec6d2c6 100644 --- a/noncore/net/networksetup/TODO +++ b/noncore/net/networksetup/TODO | |||
@@ -6,11 +6,11 @@ Write dns script | |||
6 | 6 | ||
7 | |||
8 | WLAN needs to be re-written to not use Config | 7 | WLAN needs to be re-written to not use Config |
9 | WHERE Is DHCP info stored??? | ||
10 | |||
11 | PPP module needs to be written | ||
12 | 8 | ||
13 | Write a class that parses /proc and not ifconfig | 9 | Write a class that parses /proc and not ifconfig |
10 | udchcp needs to output the dhcp information | ||
11 | |||
12 | Possible other modules to write: ppp, ipsec, bluetooth, ipchains | ||
13 | |||
14 | PPP module needs to scan pppd.tdb to see what is currently active | ||
14 | 15 | ||
15 | Possible other modules: ipsec, bluetooth, ipchains | ||
16 | 16 | ||
diff --git a/noncore/net/networksetup/interfaces/interfacesetupimp.cpp b/noncore/net/networksetup/interfaces/interfacesetupimp.cpp index 97c05cc..d42b45d 100644 --- a/noncore/net/networksetup/interfaces/interfacesetupimp.cpp +++ b/noncore/net/networksetup/interfaces/interfacesetupimp.cpp | |||
@@ -95,2 +95,3 @@ void InterfaceSetupImp::setProfile(const QString &profile){ | |||
95 | newInterfaceName += "_" + profile; | 95 | newInterfaceName += "_" + profile; |
96 | qDebug("InterfaceSetupImp::setProfile"); | ||
96 | // See if we have to make a interface. | 97 | // See if we have to make a interface. |
diff --git a/noncore/net/networksetup/interfaces/interfacesetupimp.h b/noncore/net/networksetup/interfaces/interfacesetupimp.h index 936f2be..3bbf34e 100644 --- a/noncore/net/networksetup/interfaces/interfacesetupimp.h +++ b/noncore/net/networksetup/interfaces/interfacesetupimp.h | |||
@@ -31,3 +31,3 @@ Q_OBJECT | |||
31 | 31 | ||
32 | public: | 32 | public: |
33 | InterfaceSetupImpDialog(QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = false, WFlags fl = 0) : QDialog(parent, name, modal, fl){ | 33 | InterfaceSetupImpDialog(QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = false, WFlags fl = 0) : QDialog(parent, name, modal, fl){ |
@@ -38,7 +38,13 @@ Q_OBJECT | |||
38 | }; | 38 | }; |
39 | void setProfile(QString &profile){ interfaceSetup->setProfile(profile);}; | ||
39 | 40 | ||
41 | private: | ||
40 | InterfaceSetupImp *interfaceSetup; | 42 | InterfaceSetupImp *interfaceSetup; |
41 | 43 | ||
42 | protected slots: | 44 | protected slots: |
43 | void accept(){ interfaceSetup->saveChanges(); }; | 45 | void accept(){ |
46 | interfaceSetup->saveChanges(); | ||
47 | QDialog::accept(); | ||
48 | }; | ||
49 | |||
44 | }; | 50 | }; |
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp index b9fff56..6440bd4 100644 --- a/noncore/net/networksetup/mainwindowimp.cpp +++ b/noncore/net/networksetup/mainwindowimp.cpp | |||
@@ -232,10 +232,4 @@ void MainWindowImp::configureClicked(){ | |||
232 | 232 | ||
233 | QString currentProfile = currentProfileLabel->text(); | ||
234 | if(profilesList->count() <= 1 || currentProfile == "All"){ | ||
235 | currentProfile = ""; | ||
236 | } | ||
237 | |||
238 | Interface *i = interfaceItems[item]; | 233 | Interface *i = interfaceItems[item]; |
239 | if(i->getModuleOwner()){ | 234 | if(i->getModuleOwner()){ |
240 | i->getModuleOwner()->setProfile(currentProfile); | ||
241 | QWidget *moduleConfigure = i->getModuleOwner()->configure(i); | 235 | QWidget *moduleConfigure = i->getModuleOwner()->configure(i); |
@@ -249,3 +243,6 @@ void MainWindowImp::configureClicked(){ | |||
249 | InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(0, "InterfaceSetupImp", i, true, Qt::WDestructiveClose); | 243 | InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(0, "InterfaceSetupImp", i, true, Qt::WDestructiveClose); |
250 | //configure->setProfile(currentProfile); | 244 | QString currentProfileText = currentProfileLabel->text(); |
245 | if(currentProfileText.upper() == "ALL"); | ||
246 | currentProfileText = ""; | ||
247 | configure->setProfile(currentProfileText); | ||
251 | configure->showMaximized(); | 248 | configure->showMaximized(); |
@@ -272,7 +269,2 @@ void MainWindowImp::informationClicked(){ | |||
272 | 269 | ||
273 | QStringList list; | ||
274 | for(uint i = 0; i < profilesList->count(); i++){ | ||
275 | list.append(profilesList->text(i)); | ||
276 | } | ||
277 | |||
278 | if(i->getModuleOwner()){ | 270 | if(i->getModuleOwner()){ |
@@ -540,2 +532,3 @@ void MainWindowImp::changeProfile(){ | |||
540 | } | 532 | } |
533 | // TODO change the profile in the modules | ||
541 | } | 534 | } |
diff --git a/noncore/net/networksetup/networksetup.pro b/noncore/net/networksetup/networksetup.pro index 1719a35..5666a42 100644 --- a/noncore/net/networksetup/networksetup.pro +++ b/noncore/net/networksetup/networksetup.pro | |||
@@ -1,2 +1,2 @@ | |||
1 | DESTDIR = $(OPIEDIR)/bin | 1 | #DESTDIR = $(OPIEDIR)/bin |
2 | TEMPLATE = app | 2 | TEMPLATE = app |
@@ -8,3 +8,3 @@ INCLUDEPATH += $(OPIEDIR)/include interfaces/ | |||
8 | DEPENDPATH += $(OPIEDIR)/include interfaces/ wlan | 8 | DEPENDPATH += $(OPIEDIR)/include interfaces/ wlan |
9 | LIBS += -lqpe -L$(OPIEDIR)/plugins/networksetup -linterfaces | 9 | LIBS += -lqpe -L$(OPIEDIR)/plugins/networksetup -Linterfaces/ -linterfaces |
10 | INTERFACES = mainwindow.ui addconnection.ui | 10 | INTERFACES = mainwindow.ui addconnection.ui |
diff --git a/noncore/net/networksetup/opie-networksetup.control b/noncore/net/networksetup/opie-networksetup.control index 35bac52..d14e2d1 100644 --- a/noncore/net/networksetup/opie-networksetup.control +++ b/noncore/net/networksetup/opie-networksetup.control | |||
@@ -1,2 +1,2 @@ | |||
1 | Files: bin/networksetup apps/Settings/networksetup.desktop pics/Network plugins/networksetup/* pics/networksetup $QTDIR/lib/libinterfaces.so.1.0.0 $QTDIR/lib/libinterfaces.so.1.0 $QTDIR/lib/libinterfaces.so.1 | 1 | Files: bin/networksetup apps/Settings/networksetup.desktop pics/Network plugins/networksetup/* pics/networksetup $QTDIR/lib/libinterfaces.so.1.0.0 $QTDIR/lib/libinterfaces.so.1.0 $QTDIR/lib/libinterfaces.so.1 $OPIEDIR/bin/changedns.sh $OPIEDIR/bin/getprofile.sh |
2 | Priority: optional | 2 | Priority: optional |
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp index a466020..74bf390 100644 --- a/noncore/net/networksetup/wlan/wlanimp.cpp +++ b/noncore/net/networksetup/wlan/wlanimp.cpp | |||
@@ -35,2 +35,6 @@ WLANImp::~WLANImp( ){ | |||
35 | 35 | ||
36 | void WLANImp::setProfile(QString &profile){ | ||
37 | interfaceSetup->setProfile(profile); | ||
38 | } | ||
39 | |||
36 | void WLANImp::readConfig() | 40 | void WLANImp::readConfig() |
diff --git a/noncore/net/networksetup/wlan/wlanimp.h b/noncore/net/networksetup/wlan/wlanimp.h index 608d681..faa1674 100644 --- a/noncore/net/networksetup/wlan/wlanimp.h +++ b/noncore/net/networksetup/wlan/wlanimp.h | |||
@@ -15,2 +15,3 @@ public: | |||
15 | ~WLANImp( ); | 15 | ~WLANImp( ); |
16 | void setProfile(QString &profile); | ||
16 | 17 | ||
diff --git a/noncore/net/networksetup/wlan/wlanmodule.cpp b/noncore/net/networksetup/wlan/wlanmodule.cpp index c8becb0..b14fc0a 100644 --- a/noncore/net/networksetup/wlan/wlanmodule.cpp +++ b/noncore/net/networksetup/wlan/wlanmodule.cpp | |||
@@ -62,2 +62,3 @@ QWidget *WLANModule::configure(Interface *i){ | |||
62 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, false, Qt::WDestructiveClose); | 62 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, false, Qt::WDestructiveClose); |
63 | wlanconfig->setProfile(profile); | ||
63 | return wlanconfig; | 64 | return wlanconfig; |
diff --git a/noncore/settings/networksettings/TODO b/noncore/settings/networksettings/TODO index 0584f81..ec6d2c6 100644 --- a/noncore/settings/networksettings/TODO +++ b/noncore/settings/networksettings/TODO | |||
@@ -6,11 +6,11 @@ Write dns script | |||
6 | 6 | ||
7 | |||
8 | WLAN needs to be re-written to not use Config | 7 | WLAN needs to be re-written to not use Config |
9 | WHERE Is DHCP info stored??? | ||
10 | |||
11 | PPP module needs to be written | ||
12 | 8 | ||
13 | Write a class that parses /proc and not ifconfig | 9 | Write a class that parses /proc and not ifconfig |
10 | udchcp needs to output the dhcp information | ||
11 | |||
12 | Possible other modules to write: ppp, ipsec, bluetooth, ipchains | ||
13 | |||
14 | PPP module needs to scan pppd.tdb to see what is currently active | ||
14 | 15 | ||
15 | Possible other modules: ipsec, bluetooth, ipchains | ||
16 | 16 | ||
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp index 97c05cc..d42b45d 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp | |||
@@ -95,2 +95,3 @@ void InterfaceSetupImp::setProfile(const QString &profile){ | |||
95 | newInterfaceName += "_" + profile; | 95 | newInterfaceName += "_" + profile; |
96 | qDebug("InterfaceSetupImp::setProfile"); | ||
96 | // See if we have to make a interface. | 97 | // See if we have to make a interface. |
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.h b/noncore/settings/networksettings/interfaces/interfacesetupimp.h index 936f2be..3bbf34e 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.h +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.h | |||
@@ -31,3 +31,3 @@ Q_OBJECT | |||
31 | 31 | ||
32 | public: | 32 | public: |
33 | InterfaceSetupImpDialog(QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = false, WFlags fl = 0) : QDialog(parent, name, modal, fl){ | 33 | InterfaceSetupImpDialog(QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = false, WFlags fl = 0) : QDialog(parent, name, modal, fl){ |
@@ -38,7 +38,13 @@ Q_OBJECT | |||
38 | }; | 38 | }; |
39 | void setProfile(QString &profile){ interfaceSetup->setProfile(profile);}; | ||
39 | 40 | ||
41 | private: | ||
40 | InterfaceSetupImp *interfaceSetup; | 42 | InterfaceSetupImp *interfaceSetup; |
41 | 43 | ||
42 | protected slots: | 44 | protected slots: |
43 | void accept(){ interfaceSetup->saveChanges(); }; | 45 | void accept(){ |
46 | interfaceSetup->saveChanges(); | ||
47 | QDialog::accept(); | ||
48 | }; | ||
49 | |||
44 | }; | 50 | }; |
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index b9fff56..6440bd4 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -232,10 +232,4 @@ void MainWindowImp::configureClicked(){ | |||
232 | 232 | ||
233 | QString currentProfile = currentProfileLabel->text(); | ||
234 | if(profilesList->count() <= 1 || currentProfile == "All"){ | ||
235 | currentProfile = ""; | ||
236 | } | ||
237 | |||
238 | Interface *i = interfaceItems[item]; | 233 | Interface *i = interfaceItems[item]; |
239 | if(i->getModuleOwner()){ | 234 | if(i->getModuleOwner()){ |
240 | i->getModuleOwner()->setProfile(currentProfile); | ||
241 | QWidget *moduleConfigure = i->getModuleOwner()->configure(i); | 235 | QWidget *moduleConfigure = i->getModuleOwner()->configure(i); |
@@ -249,3 +243,6 @@ void MainWindowImp::configureClicked(){ | |||
249 | InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(0, "InterfaceSetupImp", i, true, Qt::WDestructiveClose); | 243 | InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(0, "InterfaceSetupImp", i, true, Qt::WDestructiveClose); |
250 | //configure->setProfile(currentProfile); | 244 | QString currentProfileText = currentProfileLabel->text(); |
245 | if(currentProfileText.upper() == "ALL"); | ||
246 | currentProfileText = ""; | ||
247 | configure->setProfile(currentProfileText); | ||
251 | configure->showMaximized(); | 248 | configure->showMaximized(); |
@@ -272,7 +269,2 @@ void MainWindowImp::informationClicked(){ | |||
272 | 269 | ||
273 | QStringList list; | ||
274 | for(uint i = 0; i < profilesList->count(); i++){ | ||
275 | list.append(profilesList->text(i)); | ||
276 | } | ||
277 | |||
278 | if(i->getModuleOwner()){ | 270 | if(i->getModuleOwner()){ |
@@ -540,2 +532,3 @@ void MainWindowImp::changeProfile(){ | |||
540 | } | 532 | } |
533 | // TODO change the profile in the modules | ||
541 | } | 534 | } |
diff --git a/noncore/settings/networksettings/networksetup.pro b/noncore/settings/networksettings/networksetup.pro index 1719a35..5666a42 100644 --- a/noncore/settings/networksettings/networksetup.pro +++ b/noncore/settings/networksettings/networksetup.pro | |||
@@ -1,2 +1,2 @@ | |||
1 | DESTDIR = $(OPIEDIR)/bin | 1 | #DESTDIR = $(OPIEDIR)/bin |
2 | TEMPLATE = app | 2 | TEMPLATE = app |
@@ -8,3 +8,3 @@ INCLUDEPATH += $(OPIEDIR)/include interfaces/ | |||
8 | DEPENDPATH += $(OPIEDIR)/include interfaces/ wlan | 8 | DEPENDPATH += $(OPIEDIR)/include interfaces/ wlan |
9 | LIBS += -lqpe -L$(OPIEDIR)/plugins/networksetup -linterfaces | 9 | LIBS += -lqpe -L$(OPIEDIR)/plugins/networksetup -Linterfaces/ -linterfaces |
10 | INTERFACES = mainwindow.ui addconnection.ui | 10 | INTERFACES = mainwindow.ui addconnection.ui |
diff --git a/noncore/settings/networksettings/opie-networksettings.control b/noncore/settings/networksettings/opie-networksettings.control index 35bac52..d14e2d1 100644 --- a/noncore/settings/networksettings/opie-networksettings.control +++ b/noncore/settings/networksettings/opie-networksettings.control | |||
@@ -1,2 +1,2 @@ | |||
1 | Files: bin/networksetup apps/Settings/networksetup.desktop pics/Network plugins/networksetup/* pics/networksetup $QTDIR/lib/libinterfaces.so.1.0.0 $QTDIR/lib/libinterfaces.so.1.0 $QTDIR/lib/libinterfaces.so.1 | 1 | Files: bin/networksetup apps/Settings/networksetup.desktop pics/Network plugins/networksetup/* pics/networksetup $QTDIR/lib/libinterfaces.so.1.0.0 $QTDIR/lib/libinterfaces.so.1.0 $QTDIR/lib/libinterfaces.so.1 $OPIEDIR/bin/changedns.sh $OPIEDIR/bin/getprofile.sh |
2 | Priority: optional | 2 | Priority: optional |
diff --git a/noncore/settings/networksettings/opie-networksetup.control b/noncore/settings/networksettings/opie-networksetup.control index 35bac52..d14e2d1 100644 --- a/noncore/settings/networksettings/opie-networksetup.control +++ b/noncore/settings/networksettings/opie-networksetup.control | |||
@@ -1,2 +1,2 @@ | |||
1 | Files: bin/networksetup apps/Settings/networksetup.desktop pics/Network plugins/networksetup/* pics/networksetup $QTDIR/lib/libinterfaces.so.1.0.0 $QTDIR/lib/libinterfaces.so.1.0 $QTDIR/lib/libinterfaces.so.1 | 1 | Files: bin/networksetup apps/Settings/networksetup.desktop pics/Network plugins/networksetup/* pics/networksetup $QTDIR/lib/libinterfaces.so.1.0.0 $QTDIR/lib/libinterfaces.so.1.0 $QTDIR/lib/libinterfaces.so.1 $OPIEDIR/bin/changedns.sh $OPIEDIR/bin/getprofile.sh |
2 | Priority: optional | 2 | Priority: optional |
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index a466020..74bf390 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp | |||
@@ -35,2 +35,6 @@ WLANImp::~WLANImp( ){ | |||
35 | 35 | ||
36 | void WLANImp::setProfile(QString &profile){ | ||
37 | interfaceSetup->setProfile(profile); | ||
38 | } | ||
39 | |||
36 | void WLANImp::readConfig() | 40 | void WLANImp::readConfig() |
diff --git a/noncore/settings/networksettings/wlan/wlanimp.h b/noncore/settings/networksettings/wlan/wlanimp.h index 608d681..faa1674 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.h +++ b/noncore/settings/networksettings/wlan/wlanimp.h | |||
@@ -15,2 +15,3 @@ public: | |||
15 | ~WLANImp( ); | 15 | ~WLANImp( ); |
16 | void setProfile(QString &profile); | ||
16 | 17 | ||
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index c8becb0..b14fc0a 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp | |||
@@ -62,2 +62,3 @@ QWidget *WLANModule::configure(Interface *i){ | |||
62 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, false, Qt::WDestructiveClose); | 62 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, false, Qt::WDestructiveClose); |
63 | wlanconfig->setProfile(profile); | ||
63 | return wlanconfig; | 64 | return wlanconfig; |