summaryrefslogtreecommitdiff
authordrw <drw>2004-02-22 17:06:57 (UTC)
committer drw <drw>2004-02-22 17:06:57 (UTC)
commit68bd0ee2c7806b8fb35caf796e1d623e3d1f6011 (patch) (unidiff)
treebaee9d67d1134d1af933dfc21867c2607103813e
parenta607c211c7ad47f1083fa820da5632a1d2110e44 (diff)
downloadopie-68bd0ee2c7806b8fb35caf796e1d623e3d1f6011.zip
opie-68bd0ee2c7806b8fb35caf796e1d623e3d1f6011.tar.gz
opie-68bd0ee2c7806b8fb35caf796e1d623e3d1f6011.tar.bz2
Network Settings: libopie->libopie2
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/config.in4
-rw-r--r--noncore/settings/networksettings/interfaces/.cvsignore3
-rw-r--r--noncore/settings/networksettings/interfaces/config.in2
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp6
-rw-r--r--noncore/settings/networksettings/main.cpp2
-rw-r--r--noncore/settings/networksettings/networksettings.pro2
-rw-r--r--noncore/settings/networksettings/opie-networksettings.control2
-rw-r--r--noncore/settings/networksettings/wlan/.cvsignore2
-rw-r--r--noncore/settings/networksettings/wlan/config.in4
-rw-r--r--noncore/settings/networksettings/wlan/opie-networksettingsplugin-wlan.control4
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp.cpp96
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.cpp18
12 files changed, 74 insertions, 71 deletions
diff --git a/noncore/settings/networksettings/config.in b/noncore/settings/networksettings/config.in
index 4965a6e..e23e96a 100644
--- a/noncore/settings/networksettings/config.in
+++ b/noncore/settings/networksettings/config.in
@@ -1,13 +1,13 @@
1config NETWORKSETUP 1config NETWORKSETUP
2 boolean "opie-networksettings (TCP/IP network settings)" 2 boolean "opie-networksettings (TCP/IP network settings)"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && LIBOPIE2NET 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2NET
5 5
6config NETWORKSETUP-CORE 6config NETWORKSETUP-CORE
7 boolean 7 boolean
8 default "y" if NETWORKSETUP 8 default "y" if NETWORKSETUP
9 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && NETWORKSETUP && INTERFACES 9 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && NETWORKSETUP && INTERFACES
10 10
11 source noncore/settings/networksettings/ppp/config.in 11 source noncore/settings/networksettings/ppp/config.in
12 source noncore/settings/networksettings/wlan/config.in 12 source noncore/settings/networksettings/wlan/config.in
13 source noncore/settings/networksettings/interfaces/config.in 13 source noncore/settings/networksettings/interfaces/config.in
diff --git a/noncore/settings/networksettings/interfaces/.cvsignore b/noncore/settings/networksettings/interfaces/.cvsignore
index 1655b12..0b2d203 100644
--- a/noncore/settings/networksettings/interfaces/.cvsignore
+++ b/noncore/settings/networksettings/interfaces/.cvsignore
@@ -1,5 +1,4 @@
1
2Makefile 1Makefile
3Makefile.in 2Makefile.in
4interfaceadvanced.cpp 3interfaceadvanced.cpp
5interfaceadvanced.h 4interfaceadvanced.h
@@ -8,4 +7,6 @@ interfaceinformation.h
8interfacesetup.cpp 7interfacesetup.cpp
9interfacesetup.h 8interfacesetup.h
10lib*.so* 9lib*.so*
11moc* 10moc*
11.moc
12.obj \ No newline at end of file
diff --git a/noncore/settings/networksettings/interfaces/config.in b/noncore/settings/networksettings/interfaces/config.in
index 6c21aeb..d84cd24 100644
--- a/noncore/settings/networksettings/interfaces/config.in
+++ b/noncore/settings/networksettings/interfaces/config.in
@@ -1,4 +1,4 @@
1 config INTERFACES 1 config INTERFACES
2 boolean 2 boolean
3 default "y" if NETWORKSETUP 3 default "y" if NETWORKSETUP
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index 78466d0..ab0e4cc 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -11,9 +11,9 @@
11 11
12#include <opie/oprocess.h> 12#include <opie/oprocess.h>
13 13
14#ifdef QWS 14#ifdef QWS
15#include <opie/owait.h> 15#include <opie2/owait.h>
16#include <qpe/global.h> 16#include <qpe/global.h>
17#include <qapplication.h> 17#include <qapplication.h>
18#endif 18#endif
19 19
@@ -154,11 +154,11 @@ void InterfaceSetupImp::setProfile(const QString &profile){
154 interfaces->copyInterface(interface->getInterfaceName(), newInterfaceName); 154 interfaces->copyInterface(interface->getInterfaceName(), newInterfaceName);
155 if(!interfaces->setMapping(interface->getInterfaceName())){ 155 if(!interfaces->setMapping(interface->getInterfaceName())){
156 interfaces->addMapping(interface->getInterfaceName()); 156 interfaces->addMapping(interface->getInterfaceName());
157 if(!interfaces->setMapping(interface->getInterfaceName())){ 157 if(!interfaces->setMapping(interface->getInterfaceName())){
158 qDebug("InterfaceSetupImp: Added Mapping, but still can't setInterface."); 158 qDebug("InterfaceSetupImp: Added Mapping, but still can't setInterface.");
159 return; 159 return;
160 } 160 }
161 } 161 }
162 interfaces->setMap("map", newInterfaceName); 162 interfaces->setMap("map", newInterfaceName);
163 interfaces->setScript("getprofile.sh"); 163 interfaces->setScript("getprofile.sh");
164 } 164 }
diff --git a/noncore/settings/networksettings/main.cpp b/noncore/settings/networksettings/main.cpp
index 5d275ac..bc11ab4 100644
--- a/noncore/settings/networksettings/main.cpp
+++ b/noncore/settings/networksettings/main.cpp
@@ -1,6 +1,6 @@
1#include "mainwindowimp.h" 1#include "mainwindowimp.h"
2#include <opie/oapplicationfactory.h> 2#include <opie2/oapplicationfactory.h>
3 3
4OPIE_EXPORT_APP( OApplicationFactory<MainWindowImp> ) 4OPIE_EXPORT_APP( OApplicationFactory<MainWindowImp> )
5 5
6 6
diff --git a/noncore/settings/networksettings/networksettings.pro b/noncore/settings/networksettings/networksettings.pro
index 0615ea4..5db2d6b 100644
--- a/noncore/settings/networksettings/networksettings.pro
+++ b/noncore/settings/networksettings/networksettings.pro
@@ -2,9 +2,9 @@ CONFIG = qt warn_on debug quick-app
2HEADERS = mainwindowimp.h addconnectionimp.h defaultmodule.h module.h 2HEADERS = mainwindowimp.h addconnectionimp.h defaultmodule.h module.h
3SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp 3SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp
4INCLUDEPATH += $(OPIEDIR)/include interfaces/ 4INCLUDEPATH += $(OPIEDIR)/include interfaces/
5DEPENDPATH += $(OPIEDIR)/include interfaces/ wlan/ ppp/ 5DEPENDPATH += $(OPIEDIR)/include interfaces/ wlan/ ppp/
6LIBS += -lqpe -L$(OPIEDIR)/plugins/networksettings -Linterfaces/ -linterfaces -lopie 6LIBS += -lqpe -L$(OPIEDIR)/plugins/networksettings -Linterfaces/ -linterfaces -lopiecore2 -lopieui2
7INTERFACES = mainwindow.ui addconnection.ui 7INTERFACES = mainwindow.ui addconnection.ui
8TARGET = networksettings 8TARGET = networksettings
9 9
10 10
diff --git a/noncore/settings/networksettings/opie-networksettings.control b/noncore/settings/networksettings/opie-networksettings.control
index 25e1e26..fbbddca 100644
--- a/noncore/settings/networksettings/opie-networksettings.control
+++ b/noncore/settings/networksettings/opie-networksettings.control
@@ -3,8 +3,8 @@ Files: plugins/application/libnetworksettings.so* bin/networksettings apps/Setti
3Priority: optional 3Priority: optional
4Section: opie/settings 4Section: opie/settings
5Maintainer: Patrick S. Vogt <tille@handhelds.org> 5Maintainer: Patrick S. Vogt <tille@handhelds.org>
6Architecture: arm 6Architecture: arm
7Depends: task-opie-minimal, libopiecore2, libopienet2 7Depends: task-opie-minimal, libopiecore2, libopieui2, libopienet2
8Description: Network settings. 8Description: Network settings.
9Replaces: opie-networksetup 9Replaces: opie-networksetup
10Version: $QPE_VERSION$EXTRAVERSION 10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/settings/networksettings/wlan/.cvsignore b/noncore/settings/networksettings/wlan/.cvsignore
index 7073cac..ae45698 100644
--- a/noncore/settings/networksettings/wlan/.cvsignore
+++ b/noncore/settings/networksettings/wlan/.cvsignore
@@ -4,4 +4,6 @@ info.cpp
4info.h 4info.h
5moc_* 5moc_*
6wlan.cpp 6wlan.cpp
7wlan.h 7wlan.h
8.moc
9.obj
diff --git a/noncore/settings/networksettings/wlan/config.in b/noncore/settings/networksettings/wlan/config.in
index e459788..97fa468 100644
--- a/noncore/settings/networksettings/wlan/config.in
+++ b/noncore/settings/networksettings/wlan/config.in
@@ -1,6 +1,6 @@
1 config WLAN 1 config WLAN
2 boolean "opie-networksettingsplugin-wlan (wireless LAN module)" 2 boolean "opie-networksettingsplugin-wlan (wireless LAN module)"
3 default "n" if NETWORKSETUP 3 default "n" if NETWORKSETUP
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && NETWORKSETUP && NETWORKSETUP-CORE && INTERFACES && LIBOPIE2NET 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && NETWORKSETUP && NETWORKSETUP-CORE && INTERFACES && LIBOPIE2NET
5 #comment "opie-networksettingsplugin-wlan needs libopie, libopie2net and networksetup" 5 #comment "opie-networksettingsplugin-wlan needs libopie2ui, libopie2net and networksetup"
6 #depends !( LIBOPIE2NET && LIBOPIE && NETWORKSETUP) \ No newline at end of file 6 #depends !( LIBOPIE2NET && LIBOPIE && NETWORKSETUP) \ No newline at end of file
diff --git a/noncore/settings/networksettings/wlan/opie-networksettingsplugin-wlan.control b/noncore/settings/networksettings/wlan/opie-networksettingsplugin-wlan.control
index 1147621..f4f20b1 100644
--- a/noncore/settings/networksettings/wlan/opie-networksettingsplugin-wlan.control
+++ b/noncore/settings/networksettings/wlan/opie-networksettingsplugin-wlan.control
@@ -1,9 +1,9 @@
1Package: opie-networksettingsplugin-wlan 1Package: opie-networksettingsplugin-wlan
2Files: plugins/networksettings/libwlan.so* 2Files: plugins/networksettings/libwlan.so*
3Priority: optional 3Priority: optional
4Section: opie/settings 4Section: opie/settings
5Maintainer: Patrick S. Vogt <tille@handhelds.org> 5Maintainer: Patrick S. Vogt <tille@handhelds.org>
6Architecture: arm 6Architecture: arm
7Depends: opie-networksettings, libopienet2 7Depends: opie-networksettings, libopiecore2, libopienet2
8Description: Network settings wavelan plugin. 8Description: Network settings wavelan plugin.
9Version: $QPE_VERSION$EXTRAVERSION 9Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp
index 719be1b..95f4abe 100644
--- a/noncore/settings/networksettings/wlan/wlanimp.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp.cpp
@@ -12,10 +12,10 @@
12#include <qcheckbox.h> 12#include <qcheckbox.h>
13#include <qtabwidget.h> 13#include <qtabwidget.h>
14#include <qcombobox.h> 14#include <qcombobox.h>
15 15
16#ifdef QWS 16#ifdef QWS
17 #include <opie/oprocess.h> 17 #include <opie2/oprocess.h>
18#else 18#else
19 #define OProcess KProcess 19 #define OProcess KProcess
20 #include <kprocess.h> 20 #include <kprocess.h>
21#endif 21#endif
@@ -23,9 +23,9 @@
23#define WIRELESS_OPTS "/etc/pcmcia/wireless.opts" 23#define WIRELESS_OPTS "/etc/pcmcia/wireless.opts"
24 24
25/** 25/**
26 * Constructor, read in the wireless.opts file for parsing later. 26 * Constructor, read in the wireless.opts file for parsing later.
27 */ 27 */
28WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl), currentProfile("*") { 28WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl), currentProfile("*") {
29 interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i); 29 interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i);
30 tabWidget->insertTab(interfaceSetup, "TCP/IP"); 30 tabWidget->insertTab(interfaceSetup, "TCP/IP");
31 31
@@ -54,26 +54,26 @@ void WLANImp::typeChanged(int mod){
54} 54}
55 55
56/** 56/**
57 * Change the profile for both wireless settings and network settings. 57 * Change the profile for both wireless settings and network settings.
58 */ 58 */
59void WLANImp::setProfile(const QString &profile){ 59void WLANImp::setProfile(const QString &profile){
60 interfaceSetup->setProfile(profile); 60 interfaceSetup->setProfile(profile);
61 parseSettingFile(); 61 parseSettingFile();
62} 62}
63 63
64/** 64/**
65 * Parses the settings file that was read in and gets any setting from it. 65 * Parses the settings file that was read in and gets any setting from it.
66 */ 66 */
67void WLANImp::parseSettingFile(){ 67void WLANImp::parseSettingFile(){
68 bool foundCase = false; 68 bool foundCase = false;
69 bool found = false; 69 bool found = false;
70 for ( QStringList::Iterator it = settingsFileText.begin(); it != settingsFileText.end(); ++it ) { 70 for ( QStringList::Iterator it = settingsFileText.begin(); it != settingsFileText.end(); ++it ) {
71 QString line = (*it).simplifyWhiteSpace(); 71 QString line = (*it).simplifyWhiteSpace();
72 if(line.contains("case")) 72 if(line.contains("case"))
73 foundCase = true; 73 foundCase = true;
74 // See if we found our scheme to write or the sceme couldn't be found 74 // See if we found our scheme to write or the sceme couldn't be found
75 if((foundCase && line.contains("esac")) || 75 if((foundCase && line.contains("esac")) ||
76 (foundCase && line.left(currentProfile.length()+7) == currentProfile + ",*,*,*)" && line.at(0) != '#')) 76 (foundCase && line.left(currentProfile.length()+7) == currentProfile + ",*,*,*)" && line.at(0) != '#'))
77 found = true; 77 found = true;
78 78
79 if(line.contains(";;")) 79 if(line.contains(";;"))
@@ -83,25 +83,25 @@ void WLANImp::parseSettingFile(){
83 if(line.contains("ESSID=")){ 83 if(line.contains("ESSID=")){
84 QString id = line.mid(line.find("ESSID=")+6, line.length()); 84 QString id = line.mid(line.find("ESSID=")+6, line.length());
85 if(id == "any"){ 85 if(id == "any"){
86 essAny->setChecked(false); 86 essAny->setChecked(false);
87 }else{ 87 }else{
88 essAny->setChecked(true); 88 essAny->setChecked(true);
89 essSpecificLineEdit->setText(id); 89 essSpecificLineEdit->setText(id);
90 } 90 }
91 } 91 }
92 if(line.contains("MODE=")){ 92 if(line.contains("MODE=")){
93 QString mode = line.mid(line.find("MODE=")+5, line.length()); 93 QString mode = line.mid(line.find("MODE=")+5, line.length());
94 if(mode == "Managed"){ 94 if(mode == "Managed"){
95 networkType->setCurrentItem(0); 95 networkType->setCurrentItem(0);
96 channelLabel->setEnabled(false); 96 channelLabel->setEnabled(false);
97 networkChannel->setEnabled(false); 97 networkChannel->setEnabled(false);
98 } 98 }
99 else{ 99 else{
100 networkType->setCurrentItem(1); 100 networkType->setCurrentItem(1);
101 networkChannel->setEnabled(true); 101 networkChannel->setEnabled(true);
102 channelLabel->setEnabled(true); 102 channelLabel->setEnabled(true);
103 } 103 }
104 } 104 }
105 if(line.contains("#KEY0=")) 105 if(line.contains("#KEY0="))
106 keyLineEdit0->setText(line.mid(6, line.length())); 106 keyLineEdit0->setText(line.mid(6, line.length()));
107 if(line.contains("#KEY1=")) 107 if(line.contains("#KEY1="))
@@ -109,26 +109,26 @@ void WLANImp::parseSettingFile(){
109 if(line.contains("#KEY2=")) 109 if(line.contains("#KEY2="))
110 keyLineEdit2->setText(line.mid(6, line.length())); 110 keyLineEdit2->setText(line.mid(6, line.length()));
111 if(line.contains("#KEY3=")) 111 if(line.contains("#KEY3="))
112 keyLineEdit3->setText(line.mid(6, line.length())); 112 keyLineEdit3->setText(line.mid(6, line.length()));
113 113
114 if(line.contains("KEY=")){ 114 if(line.contains("KEY=")){
115 wepEnabled->setChecked(true); 115 wepEnabled->setChecked(true);
116 QString key; 116 QString key;
117 if(line.right(5) == (" open")){ 117 if(line.right(5) == (" open")){
118 key = line.mid(4, line.length()-5); 118 key = line.mid(4, line.length()-5);
119 authOpen->setChecked(true); 119 authOpen->setChecked(true);
120 authShared->setChecked(false); 120 authShared->setChecked(false);
121 } 121 }
122 else{ 122 else{
123 authOpen->setChecked(false); 123 authOpen->setChecked(false);
124 authShared->setChecked(true); 124 authShared->setChecked(true);
125 key = line.mid(4, line.length()); 125 key = line.mid(4, line.length());
126 } 126 }
127 if(key == keyLineEdit0->text()) keyRadio0->setChecked(true); 127 if(key == keyLineEdit0->text()) keyRadio0->setChecked(true);
128 if(key == keyLineEdit1->text()) keyRadio1->setChecked(true); 128 if(key == keyLineEdit1->text()) keyRadio1->setChecked(true);
129 if(key == keyLineEdit2->text()) keyRadio2->setChecked(true); 129 if(key == keyLineEdit2->text()) keyRadio2->setChecked(true);
130 if(key == keyLineEdit3->text()) keyRadio3->setChecked(true); 130 if(key == keyLineEdit3->text()) keyRadio3->setChecked(true);
131 } 131 }
132 if(line.contains("CHANNEL=")){ 132 if(line.contains("CHANNEL=")){
133 networkChannel->setValue(line.mid(line.find("CHANNEL=")+8, line.length()).toInt()); 133 networkChannel->setValue(line.mid(line.find("CHANNEL=")+8, line.length()).toInt());
134 } 134 }
@@ -137,9 +137,9 @@ void WLANImp::parseSettingFile(){
137} 137}
138 138
139/** 139/**
140 * Saves settings to the wireless.opts file using the current profile 140 * Saves settings to the wireless.opts file using the current profile
141 */ 141 */
142void WLANImp::changeAndSaveSettingFile(){ 142void WLANImp::changeAndSaveSettingFile(){
143 QString wlanFile = WIRELESS_OPTS; 143 QString wlanFile = WIRELESS_OPTS;
144 QFile::remove(wlanFile); 144 QFile::remove(wlanFile);
145 QFile file(wlanFile); 145 QFile file(wlanFile);
@@ -147,9 +147,9 @@ void WLANImp::changeAndSaveSettingFile(){
147 if (!file.open(IO_ReadWrite)){ 147 if (!file.open(IO_ReadWrite)){
148 qDebug(QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1()); 148 qDebug(QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1());
149 return; 149 return;
150 } 150 }
151 151
152 QTextStream stream( &file ); 152 QTextStream stream( &file );
153 bool foundCase = false; 153 bool foundCase = false;
154 bool found = false; 154 bool found = false;
155 bool output = true; 155 bool output = true;
@@ -157,46 +157,46 @@ void WLANImp::changeAndSaveSettingFile(){
157 QString line = (*it).simplifyWhiteSpace(); 157 QString line = (*it).simplifyWhiteSpace();
158 if(line.contains("case")) 158 if(line.contains("case"))
159 foundCase = true; 159 foundCase = true;
160 // See if we found our scheme to write or the sceme couldn't be found 160 // See if we found our scheme to write or the sceme couldn't be found
161 if((foundCase && line.contains("esac") && !found) || 161 if((foundCase && line.contains("esac") && !found) ||
162 (foundCase && line.left(currentProfile.length()+7) == currentProfile + ",*,*,*)" && line.at(0) != '#')){ 162 (foundCase && line.left(currentProfile.length()+7) == currentProfile + ",*,*,*)" && line.at(0) != '#')){
163 // write out scheme 163 // write out scheme
164 found = true; 164 found = true;
165 output = false; 165 output = false;
166 166
167 if(!line.contains("esac")) 167 if(!line.contains("esac"))
168 stream << line << "\n"; 168 stream << line << "\n";
169 if(!essAny->isChecked() == true){ 169 if(!essAny->isChecked() == true){
170 stream << "\tESSID=any\n"; 170 stream << "\tESSID=any\n";
171 stream << "\tMODE=Managed\n"; 171 stream << "\tMODE=Managed\n";
172 } 172 }
173 else{ 173 else{
174 stream << "\tESSID=" << essSpecificLineEdit->text() << '\n'; 174 stream << "\tESSID=" << essSpecificLineEdit->text() << '\n';
175 stream << "\tMODE=" << ( networkType->currentItem() == 0 ? "Managed" : "ad-hoc") << '\n'; 175 stream << "\tMODE=" << ( networkType->currentItem() == 0 ? "Managed" : "ad-hoc") << '\n';
176 stream << "\tCHANNEL=" << networkChannel->value() << "\n"; 176 stream << "\tCHANNEL=" << networkChannel->value() << "\n";
177 } 177 }
178 178
179 stream << "\t#KEY0=" << keyLineEdit0->text() << "\n"; 179 stream << "\t#KEY0=" << keyLineEdit0->text() << "\n";
180 stream << "\t#KEY1=" << keyLineEdit1->text() << "\n"; 180 stream << "\t#KEY1=" << keyLineEdit1->text() << "\n";
181 stream << "\t#KEY2=" << keyLineEdit2->text() << "\n"; 181 stream << "\t#KEY2=" << keyLineEdit2->text() << "\n";
182 stream << "\t#KEY3=" << keyLineEdit3->text() << "\n"; 182 stream << "\t#KEY3=" << keyLineEdit3->text() << "\n";
183 183
184 if(wepEnabled->isChecked()){ 184 if(wepEnabled->isChecked()){
185 stream << "\tKEY=\""; 185 stream << "\tKEY=\"";
186 if(keyRadio0->isChecked()) stream << keyLineEdit0->text(); 186 if(keyRadio0->isChecked()) stream << keyLineEdit0->text();
187 if(keyRadio1->isChecked()) stream << keyLineEdit1->text(); 187 if(keyRadio1->isChecked()) stream << keyLineEdit1->text();
188 if(keyRadio2->isChecked()) stream << keyLineEdit2->text(); 188 if(keyRadio2->isChecked()) stream << keyLineEdit2->text();
189 if(keyRadio3->isChecked()) stream << keyLineEdit3->text(); 189 if(keyRadio3->isChecked()) stream << keyLineEdit3->text();
190 if(authOpen->isChecked()) 190 if(authOpen->isChecked())
191 stream << " open"; 191 stream << " open";
192 else 192 else
193 stream << " restricted"; 193 stream << " restricted";
194 stream << "\"\n"; 194 stream << "\"\n";
195 } 195 }
196 stream << "\tRATE=auto\n"; 196 stream << "\tRATE=auto\n";
197 if(line.contains("esac")) 197 if(line.contains("esac"))
198 stream << line << "\n"; 198 stream << line << "\n";
199 } 199 }
200 if(line.contains(";;")) 200 if(line.contains(";;"))
201 output = true; 201 output = true;
202 if(output && (*it).length() ) 202 if(output && (*it).length() )
@@ -214,18 +214,18 @@ void WLANImp::accept(){
214 if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ){ 214 if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ){
215 QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok); 215 QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok);
216 return; 216 return;
217 } 217 }
218 } 218 }
219 219
220 if(essAny->isChecked() && essSpecificLineEdit->text().isEmpty()){ 220 if(essAny->isChecked() && essSpecificLineEdit->text().isEmpty()){
221 QMessageBox::information(this, "Error", "Please enter a SSID.", QMessageBox::Ok); 221 QMessageBox::information(this, "Error", "Please enter a SSID.", QMessageBox::Ok);
222 return; 222 return;
223 } 223 }
224 224
225 // Ok settings are good here, save 225 // Ok settings are good here, save
226 changeAndSaveSettingFile(); 226 changeAndSaveSettingFile();
227 227
228 // Try to save the interfaces settings. 228 // Try to save the interfaces settings.
229 if(!interfaceSetup->saveChanges()) 229 if(!interfaceSetup->saveChanges())
230 return; 230 return;
231 231
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp
index e7d6ff5..92339d6 100644
--- a/noncore/settings/networksettings/wlan/wlanimp2.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp
@@ -27,9 +27,9 @@
27#include <qprogressbar.h> 27#include <qprogressbar.h>
28 28
29#ifdef QWS 29#ifdef QWS
30 #include <qpe/resource.h> 30 #include <qpe/resource.h>
31 #include <opie/oprocess.h> 31 #include <opie2/oprocess.h>
32 #include <opie2/onetwork.h> 32 #include <opie2/onetwork.h>
33 #include <opie2/opcap.h> 33 #include <opie2/opcap.h>
34#else 34#else
35 #define OProcess KProcess 35 #define OProcess KProcess
@@ -138,18 +138,18 @@ void WLANImp::parseKeyStr(QString keystr) {
138 // switch current key to index 138 // switch current key to index
139 switch (index) { 139 switch (index) {
140 case 1: 140 case 1:
141 keyRadio0->setChecked(true); 141 keyRadio0->setChecked(true);
142 break; 142 break;
143 case 2: 143 case 2:
144 keyRadio1->setChecked(true); 144 keyRadio1->setChecked(true);
145 break; 145 break;
146 case 3: 146 case 3:
147 keyRadio2->setChecked(true); 147 keyRadio2->setChecked(true);
148 break; 148 break;
149 case 4: 149 case 4:
150 keyRadio3->setChecked(true); 150 keyRadio3->setChecked(true);
151 break; 151 break;
152 } 152 }
153 } else { 153 } else {
154 // key 154 // key
155 key = (*it); 155 key = (*it);
@@ -169,18 +169,18 @@ void WLANImp::parseKeyStr(QString keystr) {
169 } 169 }
170 switch (index) { 170 switch (index) {
171 case 1: 171 case 1:
172 keyLineEdit0->setText(key); 172 keyLineEdit0->setText(key);
173 break; 173 break;
174 case 2: 174 case 2:
175 keyLineEdit1->setText(key); 175 keyLineEdit1->setText(key);
176 break; 176 break;
177 case 3: 177 case 3:
178 keyLineEdit2->setText(key); 178 keyLineEdit2->setText(key);
179 break; 179 break;
180 case 4: 180 case 4:
181 keyLineEdit3->setText(key); 181 keyLineEdit3->setText(key);
182 break; 182 break;
183 } 183 }
184 key = QString::null; 184 key = QString::null;
185 } 185 }
186 } 186 }