summaryrefslogtreecommitdiff
authorbenmeyer <benmeyer>2002-12-11 22:15:16 (UTC)
committer benmeyer <benmeyer>2002-12-11 22:15:16 (UTC)
commit2217f9ba852aa2ffd36e5398988d9b1c65b18705 (patch) (unidiff)
tree071d5881f45f012720cd212028bd1a6a9455fd9c
parent6523ee46d49203d11f34a3dbbf966a318cef7def (diff)
downloadopie-2217f9ba852aa2ffd36e5398988d9b1c65b18705.zip
opie-2217f9ba852aa2ffd36e5398988d9b1c65b18705.tar.gz
opie-2217f9ba852aa2ffd36e5398988d9b1c65b18705.tar.bz2
Key accell
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/wlan/wlan.ui20
-rw-r--r--noncore/net/networksetup/wlan/wlanimp.cpp1
-rw-r--r--noncore/settings/networksettings/wlan/wlan.ui20
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp.cpp1
4 files changed, 20 insertions, 22 deletions
diff --git a/noncore/net/networksetup/wlan/wlan.ui b/noncore/net/networksetup/wlan/wlan.ui
index 09593b3..744c559 100644
--- a/noncore/net/networksetup/wlan/wlan.ui
+++ b/noncore/net/networksetup/wlan/wlan.ui
@@ -1,491 +1,491 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>WLAN</class> 2<class>WLAN</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>WLAN</cstring> 7 <cstring>WLAN</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>239</width> 14 <width>239</width>
15 <height>277</height> 15 <height>277</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Wireless LAN Setting</string> 20 <string>Wireless LAN Setting</string>
21 </property> 21 </property>
22 <property stdset="1"> 22 <property stdset="1">
23 <name>sizeGripEnabled</name> 23 <name>sizeGripEnabled</name>
24 <bool>true</bool> 24 <bool>true</bool>
25 </property> 25 </property>
26 <property> 26 <property>
27 <name>layoutMargin</name> 27 <name>layoutMargin</name>
28 </property> 28 </property>
29 <vbox> 29 <vbox>
30 <property stdset="1"> 30 <property stdset="1">
31 <name>margin</name> 31 <name>margin</name>
32 <number>0</number> 32 <number>0</number>
33 </property> 33 </property>
34 <property stdset="1"> 34 <property stdset="1">
35 <name>spacing</name> 35 <name>spacing</name>
36 <number>6</number> 36 <number>6</number>
37 </property> 37 </property>
38 <widget> 38 <widget>
39 <class>QTabWidget</class> 39 <class>QTabWidget</class>
40 <property stdset="1"> 40 <property stdset="1">
41 <name>name</name> 41 <name>name</name>
42 <cstring>tabWidget</cstring> 42 <cstring>tabWidget</cstring>
43 </property> 43 </property>
44 <property stdset="1"> 44 <property stdset="1">
45 <name>enabled</name> 45 <name>enabled</name>
46 <bool>true</bool> 46 <bool>true</bool>
47 </property> 47 </property>
48 <widget> 48 <widget>
49 <class>QWidget</class> 49 <class>QWidget</class>
50 <property stdset="1"> 50 <property stdset="1">
51 <name>name</name> 51 <name>name</name>
52 <cstring>ConfigPage</cstring> 52 <cstring>ConfigPage</cstring>
53 </property> 53 </property>
54 <attribute> 54 <attribute>
55 <name>title</name> 55 <name>title</name>
56 <string>WLAN General</string> 56 <string>General</string>
57 </attribute> 57 </attribute>
58 <vbox> 58 <vbox>
59 <property stdset="1"> 59 <property stdset="1">
60 <name>margin</name> 60 <name>margin</name>
61 <number>11</number> 61 <number>11</number>
62 </property> 62 </property>
63 <property stdset="1"> 63 <property stdset="1">
64 <name>spacing</name> 64 <name>spacing</name>
65 <number>6</number> 65 <number>6</number>
66 </property> 66 </property>
67 <widget> 67 <widget>
68 <class>QCheckBox</class> 68 <class>QCheckBox</class>
69 <property stdset="1"> 69 <property stdset="1">
70 <name>name</name> 70 <name>name</name>
71 <cstring>essAny</cstring> 71 <cstring>essAny</cstring>
72 </property> 72 </property>
73 <property stdset="1"> 73 <property stdset="1">
74 <name>text</name> 74 <name>text</name>
75 <string>Sepecify Access Point</string> 75 <string>&amp;Specify Access Point</string>
76 </property> 76 </property>
77 </widget> 77 </widget>
78 <widget> 78 <widget>
79 <class>QGroupBox</class> 79 <class>QGroupBox</class>
80 <property stdset="1"> 80 <property stdset="1">
81 <name>name</name> 81 <name>name</name>
82 <cstring>GroupBox1</cstring> 82 <cstring>GroupBox1</cstring>
83 </property> 83 </property>
84 <property stdset="1"> 84 <property stdset="1">
85 <name>enabled</name> 85 <name>enabled</name>
86 <bool>false</bool> 86 <bool>false</bool>
87 </property> 87 </property>
88 <property stdset="1"> 88 <property stdset="1">
89 <name>title</name> 89 <name>title</name>
90 <string>Settings</string> 90 <string>Specific &amp;Access Point Settings</string>
91 </property> 91 </property>
92 <grid> 92 <grid>
93 <property stdset="1"> 93 <property stdset="1">
94 <name>margin</name> 94 <name>margin</name>
95 <number>11</number> 95 <number>11</number>
96 </property> 96 </property>
97 <property stdset="1"> 97 <property stdset="1">
98 <name>spacing</name> 98 <name>spacing</name>
99 <number>6</number> 99 <number>6</number>
100 </property> 100 </property>
101 <widget row="0" column="0" > 101 <widget row="0" column="0" >
102 <class>QLabel</class> 102 <class>QLabel</class>
103 <property stdset="1"> 103 <property stdset="1">
104 <name>name</name> 104 <name>name</name>
105 <cstring>TextLabel1</cstring> 105 <cstring>TextLabel1</cstring>
106 </property> 106 </property>
107 <property stdset="1"> 107 <property stdset="1">
108 <name>text</name> 108 <name>text</name>
109 <string>ESS-ID</string> 109 <string>ESS-ID</string>
110 </property> 110 </property>
111 </widget> 111 </widget>
112 <widget row="1" column="0" > 112 <widget row="1" column="0" >
113 <class>QLabel</class> 113 <class>QLabel</class>
114 <property stdset="1"> 114 <property stdset="1">
115 <name>name</name> 115 <name>name</name>
116 <cstring>TextLabel2_2</cstring> 116 <cstring>TextLabel2</cstring>
117 </property> 117 </property>
118 <property stdset="1"> 118 <property stdset="1">
119 <name>text</name> 119 <name>text</name>
120 <string>Network Type</string> 120 <string>Network Type</string>
121 </property> 121 </property>
122 </widget> 122 </widget>
123 <widget row="0" column="1" rowspan="1" colspan="2" > 123 <widget row="0" column="1" rowspan="1" colspan="2" >
124 <class>QLineEdit</class> 124 <class>QLineEdit</class>
125 <property stdset="1"> 125 <property stdset="1">
126 <name>name</name> 126 <name>name</name>
127 <cstring>essSpecificLineEdit</cstring> 127 <cstring>essSpecificLineEdit</cstring>
128 </property> 128 </property>
129 </widget> 129 </widget>
130 <widget row="1" column="1" rowspan="1" colspan="2" > 130 <widget row="1" column="1" rowspan="1" colspan="2" >
131 <class>QComboBox</class> 131 <class>QComboBox</class>
132 <item> 132 <item>
133 <property> 133 <property>
134 <name>text</name> 134 <name>text</name>
135 <string>Infrastructure</string> 135 <string>Infrastructure</string>
136 </property> 136 </property>
137 </item> 137 </item>
138 <item> 138 <item>
139 <property> 139 <property>
140 <name>text</name> 140 <name>text</name>
141 <string>Ad-Hoc</string> 141 <string>Ad-Hoc</string>
142 </property> 142 </property>
143 </item> 143 </item>
144 <property stdset="1"> 144 <property stdset="1">
145 <name>name</name> 145 <name>name</name>
146 <cstring>networkType</cstring> 146 <cstring>networkType</cstring>
147 </property> 147 </property>
148 </widget> 148 </widget>
149 <widget row="2" column="0" > 149 <widget row="2" column="0" >
150 <class>QLabel</class> 150 <class>QLabel</class>
151 <property stdset="1"> 151 <property stdset="1">
152 <name>name</name> 152 <name>name</name>
153 <cstring>channelLabel</cstring> 153 <cstring>channelLabel</cstring>
154 </property> 154 </property>
155 <property stdset="1"> 155 <property stdset="1">
156 <name>text</name> 156 <name>text</name>
157 <string>Channel</string> 157 <string>Channel</string>
158 </property> 158 </property>
159 </widget> 159 </widget>
160 <widget row="2" column="1" > 160 <widget row="2" column="1" >
161 <class>QSpinBox</class> 161 <class>QSpinBox</class>
162 <property stdset="1"> 162 <property stdset="1">
163 <name>name</name> 163 <name>name</name>
164 <cstring>networkChannel</cstring> 164 <cstring>networkChannel</cstring>
165 </property> 165 </property>
166 <property stdset="1"> 166 <property stdset="1">
167 <name>enabled</name> 167 <name>enabled</name>
168 <bool>false</bool> 168 <bool>false</bool>
169 </property> 169 </property>
170 <property stdset="1"> 170 <property stdset="1">
171 <name>maxValue</name> 171 <name>maxValue</name>
172 <number>15</number> 172 <number>15</number>
173 </property> 173 </property>
174 <property stdset="1"> 174 <property stdset="1">
175 <name>minValue</name> 175 <name>minValue</name>
176 <number>1</number> 176 <number>1</number>
177 </property> 177 </property>
178 <property stdset="1"> 178 <property stdset="1">
179 <name>value</name> 179 <name>value</name>
180 <number>6</number> 180 <number>6</number>
181 </property> 181 </property>
182 </widget> 182 </widget>
183 <spacer row="2" column="2" > 183 <spacer row="2" column="2" >
184 <property> 184 <property>
185 <name>name</name> 185 <name>name</name>
186 <cstring>Spacer4</cstring> 186 <cstring>Spacer4</cstring>
187 </property> 187 </property>
188 <property stdset="1"> 188 <property stdset="1">
189 <name>orientation</name> 189 <name>orientation</name>
190 <enum>Horizontal</enum> 190 <enum>Horizontal</enum>
191 </property> 191 </property>
192 <property stdset="1"> 192 <property stdset="1">
193 <name>sizeType</name> 193 <name>sizeType</name>
194 <enum>Expanding</enum> 194 <enum>Expanding</enum>
195 </property> 195 </property>
196 <property> 196 <property>
197 <name>sizeHint</name> 197 <name>sizeHint</name>
198 <size> 198 <size>
199 <width>20</width> 199 <width>20</width>
200 <height>20</height> 200 <height>20</height>
201 </size> 201 </size>
202 </property> 202 </property>
203 </spacer> 203 </spacer>
204 </grid> 204 </grid>
205 </widget> 205 </widget>
206 <spacer> 206 <spacer>
207 <property> 207 <property>
208 <name>name</name> 208 <name>name</name>
209 <cstring>Spacer31</cstring> 209 <cstring>Spacer31</cstring>
210 </property> 210 </property>
211 <property stdset="1"> 211 <property stdset="1">
212 <name>orientation</name> 212 <name>orientation</name>
213 <enum>Vertical</enum> 213 <enum>Vertical</enum>
214 </property> 214 </property>
215 <property stdset="1"> 215 <property stdset="1">
216 <name>sizeType</name> 216 <name>sizeType</name>
217 <enum>Expanding</enum> 217 <enum>Expanding</enum>
218 </property> 218 </property>
219 <property> 219 <property>
220 <name>sizeHint</name> 220 <name>sizeHint</name>
221 <size> 221 <size>
222 <width>20</width> 222 <width>20</width>
223 <height>20</height> 223 <height>20</height>
224 </size> 224 </size>
225 </property> 225 </property>
226 </spacer> 226 </spacer>
227 </vbox> 227 </vbox>
228 </widget> 228 </widget>
229 <widget> 229 <widget>
230 <class>QWidget</class> 230 <class>QWidget</class>
231 <property stdset="1"> 231 <property stdset="1">
232 <name>name</name> 232 <name>name</name>
233 <cstring>WepPage</cstring> 233 <cstring>WepPage</cstring>
234 </property> 234 </property>
235 <attribute> 235 <attribute>
236 <name>title</name> 236 <name>title</name>
237 <string>Wep</string> 237 <string>Encryption</string>
238 </attribute> 238 </attribute>
239 <vbox> 239 <vbox>
240 <property stdset="1"> 240 <property stdset="1">
241 <name>margin</name> 241 <name>margin</name>
242 <number>11</number> 242 <number>11</number>
243 </property> 243 </property>
244 <property stdset="1"> 244 <property stdset="1">
245 <name>spacing</name> 245 <name>spacing</name>
246 <number>6</number> 246 <number>6</number>
247 </property> 247 </property>
248 <widget> 248 <widget>
249 <class>QCheckBox</class> 249 <class>QCheckBox</class>
250 <property stdset="1"> 250 <property stdset="1">
251 <name>name</name> 251 <name>name</name>
252 <cstring>wepEnabled</cstring> 252 <cstring>wepEnabled</cstring>
253 </property> 253 </property>
254 <property stdset="1"> 254 <property stdset="1">
255 <name>text</name> 255 <name>text</name>
256 <string>Enable Wep</string> 256 <string>&amp;Enable WEP</string>
257 </property> 257 </property>
258 </widget> 258 </widget>
259 <widget> 259 <widget>
260 <class>QButtonGroup</class> 260 <class>QButtonGroup</class>
261 <property stdset="1"> 261 <property stdset="1">
262 <name>name</name> 262 <name>name</name>
263 <cstring>ButtonGroup43</cstring> 263 <cstring>ButtonGroup43</cstring>
264 </property> 264 </property>
265 <property stdset="1"> 265 <property stdset="1">
266 <name>enabled</name> 266 <name>enabled</name>
267 <bool>false</bool> 267 <bool>false</bool>
268 </property> 268 </property>
269 <property stdset="1"> 269 <property stdset="1">
270 <name>title</name> 270 <name>title</name>
271 <string>Authentication Type</string> 271 <string>&amp;Authentication Type</string>
272 </property> 272 </property>
273 <hbox> 273 <hbox>
274 <property stdset="1"> 274 <property stdset="1">
275 <name>margin</name> 275 <name>margin</name>
276 <number>11</number> 276 <number>11</number>
277 </property> 277 </property>
278 <property stdset="1"> 278 <property stdset="1">
279 <name>spacing</name> 279 <name>spacing</name>
280 <number>6</number> 280 <number>6</number>
281 </property> 281 </property>
282 <widget> 282 <widget>
283 <class>QRadioButton</class> 283 <class>QRadioButton</class>
284 <property stdset="1"> 284 <property stdset="1">
285 <name>name</name> 285 <name>name</name>
286 <cstring>authOpen</cstring> 286 <cstring>authOpen</cstring>
287 </property> 287 </property>
288 <property stdset="1"> 288 <property stdset="1">
289 <name>text</name> 289 <name>text</name>
290 <string>Open System</string> 290 <string>&amp;Open System</string>
291 </property> 291 </property>
292 <property stdset="1"> 292 <property stdset="1">
293 <name>checked</name> 293 <name>checked</name>
294 <bool>true</bool> 294 <bool>true</bool>
295 </property> 295 </property>
296 </widget> 296 </widget>
297 <widget> 297 <widget>
298 <class>QRadioButton</class> 298 <class>QRadioButton</class>
299 <property stdset="1"> 299 <property stdset="1">
300 <name>name</name> 300 <name>name</name>
301 <cstring>authShared</cstring> 301 <cstring>authShared</cstring>
302 </property> 302 </property>
303 <property stdset="1"> 303 <property stdset="1">
304 <name>text</name> 304 <name>text</name>
305 <string>Shared Key</string> 305 <string>&amp;Shared Key</string>
306 </property> 306 </property>
307 </widget> 307 </widget>
308 </hbox> 308 </hbox>
309 </widget> 309 </widget>
310 <widget> 310 <widget>
311 <class>QButtonGroup</class> 311 <class>QButtonGroup</class>
312 <property stdset="1"> 312 <property stdset="1">
313 <name>name</name> 313 <name>name</name>
314 <cstring>KeyButtonGroup</cstring> 314 <cstring>KeyButtonGroup</cstring>
315 </property> 315 </property>
316 <property stdset="1"> 316 <property stdset="1">
317 <name>enabled</name> 317 <name>enabled</name>
318 <bool>false</bool> 318 <bool>false</bool>
319 </property> 319 </property>
320 <property stdset="1"> 320 <property stdset="1">
321 <name>title</name> 321 <name>title</name>
322 <string>Key Setting</string> 322 <string>&amp;Key Setting</string>
323 </property> 323 </property>
324 <grid> 324 <grid>
325 <property stdset="1"> 325 <property stdset="1">
326 <name>margin</name> 326 <name>margin</name>
327 <number>11</number> 327 <number>11</number>
328 </property> 328 </property>
329 <property stdset="1"> 329 <property stdset="1">
330 <name>spacing</name> 330 <name>spacing</name>
331 <number>6</number> 331 <number>6</number>
332 </property> 332 </property>
333 <widget row="0" column="1" > 333 <widget row="0" column="1" >
334 <class>QLineEdit</class> 334 <class>QLineEdit</class>
335 <property stdset="1"> 335 <property stdset="1">
336 <name>name</name> 336 <name>name</name>
337 <cstring>keyLineEdit0</cstring> 337 <cstring>keyLineEdit0</cstring>
338 </property> 338 </property>
339 <property stdset="1"> 339 <property stdset="1">
340 <name>echoMode</name> 340 <name>echoMode</name>
341 <enum>Password</enum> 341 <enum>Password</enum>
342 </property> 342 </property>
343 </widget> 343 </widget>
344 <widget row="1" column="1" > 344 <widget row="1" column="1" >
345 <class>QLineEdit</class> 345 <class>QLineEdit</class>
346 <property stdset="1"> 346 <property stdset="1">
347 <name>name</name> 347 <name>name</name>
348 <cstring>keyLineEdit1</cstring> 348 <cstring>keyLineEdit1</cstring>
349 </property> 349 </property>
350 <property stdset="1"> 350 <property stdset="1">
351 <name>echoMode</name> 351 <name>echoMode</name>
352 <enum>Password</enum> 352 <enum>Password</enum>
353 </property> 353 </property>
354 </widget> 354 </widget>
355 <widget row="2" column="1" > 355 <widget row="2" column="1" >
356 <class>QLineEdit</class> 356 <class>QLineEdit</class>
357 <property stdset="1"> 357 <property stdset="1">
358 <name>name</name> 358 <name>name</name>
359 <cstring>keyLineEdit2</cstring> 359 <cstring>keyLineEdit2</cstring>
360 </property> 360 </property>
361 <property stdset="1"> 361 <property stdset="1">
362 <name>echoMode</name> 362 <name>echoMode</name>
363 <enum>Password</enum> 363 <enum>Password</enum>
364 </property> 364 </property>
365 </widget> 365 </widget>
366 <widget row="3" column="1" > 366 <widget row="3" column="1" >
367 <class>QLineEdit</class> 367 <class>QLineEdit</class>
368 <property stdset="1"> 368 <property stdset="1">
369 <name>name</name> 369 <name>name</name>
370 <cstring>keyLineEdit3</cstring> 370 <cstring>keyLineEdit3</cstring>
371 </property> 371 </property>
372 <property stdset="1"> 372 <property stdset="1">
373 <name>echoMode</name> 373 <name>echoMode</name>
374 <enum>Password</enum> 374 <enum>Password</enum>
375 </property> 375 </property>
376 </widget> 376 </widget>
377 <widget row="0" column="0" > 377 <widget row="0" column="0" >
378 <class>QRadioButton</class> 378 <class>QRadioButton</class>
379 <property stdset="1"> 379 <property stdset="1">
380 <name>name</name> 380 <name>name</name>
381 <cstring>keyRadio0</cstring> 381 <cstring>keyRadio0</cstring>
382 </property> 382 </property>
383 <property stdset="1"> 383 <property stdset="1">
384 <name>text</name> 384 <name>text</name>
385 <string>Key 1</string> 385 <string>Key 1</string>
386 </property> 386 </property>
387 <property stdset="1"> 387 <property stdset="1">
388 <name>checked</name> 388 <name>checked</name>
389 <bool>true</bool> 389 <bool>true</bool>
390 </property> 390 </property>
391 </widget> 391 </widget>
392 <widget row="1" column="0" > 392 <widget row="1" column="0" >
393 <class>QRadioButton</class> 393 <class>QRadioButton</class>
394 <property stdset="1"> 394 <property stdset="1">
395 <name>name</name> 395 <name>name</name>
396 <cstring>keyRadio1</cstring> 396 <cstring>keyRadio1</cstring>
397 </property> 397 </property>
398 <property stdset="1"> 398 <property stdset="1">
399 <name>text</name> 399 <name>text</name>
400 <string>Key 2</string> 400 <string>Key 2</string>
401 </property> 401 </property>
402 </widget> 402 </widget>
403 <widget row="2" column="0" > 403 <widget row="2" column="0" >
404 <class>QRadioButton</class> 404 <class>QRadioButton</class>
405 <property stdset="1"> 405 <property stdset="1">
406 <name>name</name> 406 <name>name</name>
407 <cstring>keyRadio2</cstring> 407 <cstring>keyRadio2</cstring>
408 </property> 408 </property>
409 <property stdset="1"> 409 <property stdset="1">
410 <name>text</name> 410 <name>text</name>
411 <string>Key 3</string> 411 <string>Key 3</string>
412 </property> 412 </property>
413 </widget> 413 </widget>
414 <widget row="3" column="0" > 414 <widget row="3" column="0" >
415 <class>QRadioButton</class> 415 <class>QRadioButton</class>
416 <property stdset="1"> 416 <property stdset="1">
417 <name>name</name> 417 <name>name</name>
418 <cstring>keyRadio3</cstring> 418 <cstring>keyRadio3</cstring>
419 </property> 419 </property>
420 <property stdset="1"> 420 <property stdset="1">
421 <name>text</name> 421 <name>text</name>
422 <string>Key 4</string> 422 <string>Key 4</string>
423 </property> 423 </property>
424 </widget> 424 </widget>
425 </grid> 425 </grid>
426 </widget> 426 </widget>
427 <spacer> 427 <spacer>
428 <property> 428 <property>
429 <name>name</name> 429 <name>name</name>
430 <cstring>Spacer30</cstring> 430 <cstring>Spacer30</cstring>
431 </property> 431 </property>
432 <property stdset="1"> 432 <property stdset="1">
433 <name>orientation</name> 433 <name>orientation</name>
434 <enum>Vertical</enum> 434 <enum>Vertical</enum>
435 </property> 435 </property>
436 <property stdset="1"> 436 <property stdset="1">
437 <name>sizeType</name> 437 <name>sizeType</name>
438 <enum>Expanding</enum> 438 <enum>Expanding</enum>
439 </property> 439 </property>
440 <property> 440 <property>
441 <name>sizeHint</name> 441 <name>sizeHint</name>
442 <size> 442 <size>
443 <width>20</width> 443 <width>20</width>
444 <height>20</height> 444 <height>20</height>
445 </size> 445 </size>
446 </property> 446 </property>
447 </spacer> 447 </spacer>
448 </vbox> 448 </vbox>
449 </widget> 449 </widget>
450 </widget> 450 </widget>
451 </vbox> 451 </vbox>
452</widget> 452</widget>
453<connections> 453<connections>
454 <connection> 454 <connection>
455 <sender>wepEnabled</sender> 455 <sender>wepEnabled</sender>
456 <signal>toggled(bool)</signal> 456 <signal>toggled(bool)</signal>
457 <receiver>ButtonGroup43</receiver> 457 <receiver>ButtonGroup43</receiver>
458 <slot>setEnabled(bool)</slot> 458 <slot>setEnabled(bool)</slot>
459 </connection> 459 </connection>
460 <connection> 460 <connection>
461 <sender>wepEnabled</sender> 461 <sender>wepEnabled</sender>
462 <signal>toggled(bool)</signal> 462 <signal>toggled(bool)</signal>
463 <receiver>KeyButtonGroup</receiver> 463 <receiver>KeyButtonGroup</receiver>
464 <slot>setEnabled(bool)</slot> 464 <slot>setEnabled(bool)</slot>
465 </connection> 465 </connection>
466 <connection> 466 <connection>
467 <sender>essAny</sender> 467 <sender>essAny</sender>
468 <signal>toggled(bool)</signal> 468 <signal>toggled(bool)</signal>
469 <receiver>GroupBox1</receiver> 469 <receiver>GroupBox1</receiver>
470 <slot>setEnabled(bool)</slot> 470 <slot>setEnabled(bool)</slot>
471 </connection> 471 </connection>
472</connections> 472</connections>
473<tabstops> 473<tabstops>
474 <tabstop>tabWidget</tabstop> 474 <tabstop>tabWidget</tabstop>
475 <tabstop>essAny</tabstop> 475 <tabstop>essAny</tabstop>
476 <tabstop>essSpecificLineEdit</tabstop> 476 <tabstop>essSpecificLineEdit</tabstop>
477 <tabstop>networkType</tabstop> 477 <tabstop>networkType</tabstop>
478 <tabstop>networkChannel</tabstop> 478 <tabstop>networkChannel</tabstop>
479 <tabstop>wepEnabled</tabstop> 479 <tabstop>wepEnabled</tabstop>
480 <tabstop>authOpen</tabstop> 480 <tabstop>authOpen</tabstop>
481 <tabstop>authShared</tabstop> 481 <tabstop>authShared</tabstop>
482 <tabstop>keyRadio0</tabstop> 482 <tabstop>keyRadio0</tabstop>
483 <tabstop>keyLineEdit0</tabstop> 483 <tabstop>keyLineEdit0</tabstop>
484 <tabstop>keyRadio1</tabstop> 484 <tabstop>keyRadio1</tabstop>
485 <tabstop>keyLineEdit1</tabstop> 485 <tabstop>keyLineEdit1</tabstop>
486 <tabstop>keyRadio2</tabstop> 486 <tabstop>keyRadio2</tabstop>
487 <tabstop>keyLineEdit2</tabstop> 487 <tabstop>keyLineEdit2</tabstop>
488 <tabstop>keyRadio3</tabstop> 488 <tabstop>keyRadio3</tabstop>
489 <tabstop>keyLineEdit3</tabstop> 489 <tabstop>keyLineEdit3</tabstop>
490</tabstops> 490</tabstops>
491</UI> 491</UI>
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp
index ef7329e..120d4e5 100644
--- a/noncore/net/networksetup/wlan/wlanimp.cpp
+++ b/noncore/net/networksetup/wlan/wlanimp.cpp
@@ -1,244 +1,243 @@
1#include "wlanimp.h" 1#include "wlanimp.h"
2#include "interfacesetupimp.h" 2#include "interfacesetupimp.h"
3 3
4#include <qfile.h> 4#include <qfile.h>
5#include <qdir.h> 5#include <qdir.h>
6#include <qtextstream.h> 6#include <qtextstream.h>
7#include <qmessagebox.h> 7#include <qmessagebox.h>
8#include <qlineedit.h> 8#include <qlineedit.h>
9#include <qlabel.h> 9#include <qlabel.h>
10#include <qspinbox.h> 10#include <qspinbox.h>
11#include <qradiobutton.h> 11#include <qradiobutton.h>
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/* system() */ 16/* system() */
17#include <stdlib.h> 17#include <stdlib.h>
18 18
19#define WIRELESS_OPTS "/etc/pcmcia/wireless.opts" 19#define WIRELESS_OPTS "/etc/pcmcia/wireless.opts"
20 20
21/** 21/**
22 * Constructor, read in the wireless.opts file for parsing later. 22 * Constructor, read in the wireless.opts file for parsing later.
23 */ 23 */
24WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl), currentProfile("*") { 24WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl), currentProfile("*") {
25 interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i); 25 interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i);
26 tabWidget->insertTab(interfaceSetup, "TCP/IP"); 26 tabWidget->insertTab(interfaceSetup, "TCP/IP");
27 27
28 // Read in the config file. 28 // Read in the config file.
29 QString wlanFile = WIRELESS_OPTS; 29 QString wlanFile = WIRELESS_OPTS;
30 QFile file(wlanFile); 30 QFile file(wlanFile);
31 if (file.open(IO_ReadOnly)){ 31 if (file.open(IO_ReadOnly)){
32 QTextStream stream( &file ); 32 QTextStream stream( &file );
33 QString line = ""; 33 QString line = "";
34 while ( !stream.eof() ) { 34 while ( !stream.eof() ) {
35 line += stream.readLine(); 35 line += stream.readLine();
36 line += "\n"; 36 line += "\n";
37 } 37 }
38 file.close(); 38 file.close();
39 settingsFileText = QStringList::split("\n", line, true); 39 settingsFileText = QStringList::split("\n", line, true);
40 parseSettingFile(); 40 parseSettingFile();
41 } 41 }
42 else 42 else
43 qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1()); 43 qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1());
44 connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int))); 44 connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int)));
45 45
46} 46}
47 47
48void WLANImp::typeChanged(int mod){ 48void WLANImp::typeChanged(int mod){
49 networkChannel->setEnabled(mod); 49 networkChannel->setEnabled(mod);
50 channelLabel->setEnabled(mod); 50 channelLabel->setEnabled(mod);
51} 51}
52 52
53/** 53/**
54 * Change the profile for both wireless settings and network settings. 54 * Change the profile for both wireless settings and network settings.
55 */ 55 */
56void WLANImp::setProfile(const QString &profile){ 56void WLANImp::setProfile(const QString &profile){
57 interfaceSetup->setProfile(profile); 57 interfaceSetup->setProfile(profile);
58 parseSettingFile(); 58 parseSettingFile();
59} 59}
60 60
61/** 61/**
62 * Parses the settings file that was read in and gets any setting from it. 62 * Parses the settings file that was read in and gets any setting from it.
63 */ 63 */
64void WLANImp::parseSettingFile(){ 64void WLANImp::parseSettingFile(){
65 bool foundCase = false; 65 bool foundCase = false;
66 bool found = false; 66 bool found = false;
67 for ( QStringList::Iterator it = settingsFileText.begin(); it != settingsFileText.end(); ++it ) { 67 for ( QStringList::Iterator it = settingsFileText.begin(); it != settingsFileText.end(); ++it ) {
68 QString line = (*it).simplifyWhiteSpace(); 68 QString line = (*it).simplifyWhiteSpace();
69 if(line.contains("case")) 69 if(line.contains("case"))
70 foundCase = true; 70 foundCase = true;
71 // See if we found our scheme to write or the sceme couldn't be found 71 // See if we found our scheme to write or the sceme couldn't be found
72 if((foundCase && line.contains("esac")) || 72 if((foundCase && line.contains("esac")) ||
73 (foundCase && line.left(currentProfile.length()+7) == currentProfile + ",*,*,*)" && line.at(0) != '#')) 73 (foundCase && line.left(currentProfile.length()+7) == currentProfile + ",*,*,*)" && line.at(0) != '#'))
74 found = true; 74 found = true;
75 75
76 if(line.contains(";;")) 76 if(line.contains(";;"))
77 found = false; 77 found = false;
78 if(found){ 78 if(found){
79 // write out scheme 79 // write out scheme
80 if(line.contains("ESSID=")){ 80 if(line.contains("ESSID=")){
81 QString id = line.mid(line.find("ESSID=")+6, line.length()); 81 QString id = line.mid(line.find("ESSID=")+6, line.length());
82 if(id == "any"){ 82 if(id == "any"){
83 essAny->setChecked(false); 83 essAny->setChecked(false);
84 }else{ 84 }else{
85 essAny->setChecked(true); 85 essAny->setChecked(true);
86 essSpecificLineEdit->setText(id); 86 essSpecificLineEdit->setText(id);
87 } 87 }
88 } 88 }
89 if(line.contains("MODE=")){ 89 if(line.contains("MODE=")){
90 QString mode = line.mid(line.find("MODE=")+5, line.length()); 90 QString mode = line.mid(line.find("MODE=")+5, line.length());
91 if(mode == "Managed"){ 91 if(mode == "Managed"){
92 networkType->setCurrentItem(0); 92 networkType->setCurrentItem(0);
93 } 93 }
94 else{ 94 else{
95 networkType->setCurrentItem(0); 95 networkType->setCurrentItem(0);
96 } 96 }
97 } 97 }
98 if(line.contains("KEY0=")) 98 if(line.contains("KEY0="))
99 keyLineEdit0->setText(line.mid(5, line.length())); 99 keyLineEdit0->setText(line.mid(5, line.length()));
100 if(line.contains("KEY1=")) 100 if(line.contains("KEY1="))
101 keyLineEdit1->setText(line.mid(5, line.length())); 101 keyLineEdit1->setText(line.mid(5, line.length()));
102 if(line.contains("KEY2=")) 102 if(line.contains("KEY2="))
103 keyLineEdit2->setText(line.mid(5, line.length())); 103 keyLineEdit2->setText(line.mid(5, line.length()));
104 if(line.contains("KEY3=")) 104 if(line.contains("KEY3="))
105 keyLineEdit3->setText(line.mid(5, line.length())); 105 keyLineEdit3->setText(line.mid(5, line.length()));
106 106
107 if(line.contains("KEY=")){ 107 if(line.contains("KEY=")){
108 wepEnabled->setChecked(true); 108 wepEnabled->setChecked(true);
109 QString key; 109 QString key;
110 if(line.right(5) == (" open")){ 110 if(line.right(5) == (" open")){
111 key = line.mid(4, line.length()-5); 111 key = line.mid(4, line.length()-5);
112 authOpen->setChecked(true); 112 authOpen->setChecked(true);
113 authShared->setChecked(false); 113 authShared->setChecked(false);
114 } 114 }
115 else{ 115 else{
116 authOpen->setChecked(false); 116 authOpen->setChecked(false);
117 authShared->setChecked(true); 117 authShared->setChecked(true);
118 key = line.mid(4, line.length()); 118 key = line.mid(4, line.length());
119 } 119 }
120 if(key == keyLineEdit0->text()) keyRadio0->setChecked(true); 120 if(key == keyLineEdit0->text()) keyRadio0->setChecked(true);
121 if(key == keyLineEdit1->text()) keyRadio1->setChecked(true); 121 if(key == keyLineEdit1->text()) keyRadio1->setChecked(true);
122 if(key == keyLineEdit2->text()) keyRadio2->setChecked(true); 122 if(key == keyLineEdit2->text()) keyRadio2->setChecked(true);
123 if(key == keyLineEdit3->text()) keyRadio3->setChecked(true); 123 if(key == keyLineEdit3->text()) keyRadio3->setChecked(true);
124 } 124 }
125 if(line.contains("CHANNEL=")){ 125 if(line.contains("CHANNEL=")){
126 networkChannel->setValue(line.mid(line.find("CHANNEL=")+8, line.length()).toInt()); 126 networkChannel->setValue(line.mid(line.find("CHANNEL=")+8, line.length()).toInt());
127 } 127 }
128 } 128 }
129 } 129 }
130} 130}
131 131
132/** 132/**
133 * Saves settings to the wireless.opts file using the current profile 133 * Saves settings to the wireless.opts file using the current profile
134 */ 134 */
135void WLANImp::changeAndSaveSettingFile(){ 135void WLANImp::changeAndSaveSettingFile(){
136 QString wlanFile = WIRELESS_OPTS; 136 QString wlanFile = WIRELESS_OPTS;
137 QFile::remove(wlanFile); 137 QFile::remove(wlanFile);
138 QFile file(wlanFile); 138 QFile file(wlanFile);
139 139
140 if (!file.open(IO_ReadWrite)){ 140 if (!file.open(IO_ReadWrite)){
141 qDebug(QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1()); 141 qDebug(QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1());
142 return; 142 return;
143 } 143 }
144 144
145 QTextStream stream( &file ); 145 QTextStream stream( &file );
146 bool foundCase = false; 146 bool foundCase = false;
147 bool found = false; 147 bool found = false;
148 bool output = true; 148 bool output = true;
149 for ( QStringList::Iterator it = settingsFileText.begin(); it != settingsFileText.end(); ++it ) { 149 for ( QStringList::Iterator it = settingsFileText.begin(); it != settingsFileText.end(); ++it ) {
150 QString line = (*it).simplifyWhiteSpace(); 150 QString line = (*it).simplifyWhiteSpace();
151 if(line.contains("case")) 151 if(line.contains("case"))
152 foundCase = true; 152 foundCase = true;
153 // See if we found our scheme to write or the sceme couldn't be found 153 // See if we found our scheme to write or the sceme couldn't be found
154 if((foundCase && line.contains("esac") && !found) || 154 if((foundCase && line.contains("esac") && !found) ||
155 (foundCase && line.left(currentProfile.length()+7) == currentProfile + ",*,*,*)" && line.at(0) != '#')){ 155 (foundCase && line.left(currentProfile.length()+7) == currentProfile + ",*,*,*)" && line.at(0) != '#')){
156 // write out scheme 156 // write out scheme
157 found = true; 157 found = true;
158 output = false; 158 output = false;
159 159
160 if(!line.contains("esac")) 160 if(!line.contains("esac"))
161 stream << line << "\n"; 161 stream << line << "\n";
162 if(!essAny->isChecked() == true){ 162 if(!essAny->isChecked() == true){
163 stream << "\tESSID=any\n"; 163 stream << "\tESSID=any\n";
164 stream << "\tMODE=Managed\n"; 164 stream << "\tMODE=Managed\n";
165 stream << "\tCHANNEL=6\n"; 165 stream << "\tCHANNEL=6\n";
166 } 166 }
167 else{ 167 else{
168 stream << "\tESSID=" << essSpecificLineEdit->text() << '\n'; 168 stream << "\tESSID=" << essSpecificLineEdit->text() << '\n';
169 stream << "\tMODE=" << ( networkType->currentItem() == 0 ? "Managed" : "ad-hoc") << '\n'; 169 stream << "\tMODE=" << ( networkType->currentItem() == 0 ? "Managed" : "ad-hoc") << '\n';
170 stream << "\tCHANNEL=" << networkChannel->value() << "\n"; 170 stream << "\tCHANNEL=" << networkChannel->value() << "\n";
171 } 171 }
172 172
173 stream << "\tKEY0=" << keyLineEdit0->text() << "\n"; 173 stream << "\tKEY0=" << keyLineEdit0->text() << "\n";
174 stream << "\tKEY1=" << keyLineEdit1->text() << "\n"; 174 stream << "\tKEY1=" << keyLineEdit1->text() << "\n";
175 stream << "\tKEY2=" << keyLineEdit2->text() << "\n"; 175 stream << "\tKEY2=" << keyLineEdit2->text() << "\n";
176 stream << "\tKEY3=" << keyLineEdit3->text() << "\n"; 176 stream << "\tKEY3=" << keyLineEdit3->text() << "\n";
177 177
178 if(wepEnabled->isChecked()){ 178 if(wepEnabled->isChecked()){
179 stream << "\tKEY=\""; 179 stream << "\tKEY=\"";
180 if(keyRadio0->isChecked()) stream << keyLineEdit0->text(); 180 if(keyRadio0->isChecked()) stream << keyLineEdit0->text();
181 if(keyRadio1->isChecked()) stream << keyLineEdit1->text(); 181 if(keyRadio1->isChecked()) stream << keyLineEdit1->text();
182 if(keyRadio2->isChecked()) stream << keyLineEdit2->text(); 182 if(keyRadio2->isChecked()) stream << keyLineEdit2->text();
183 if(keyRadio3->isChecked()) stream << keyLineEdit3->text(); 183 if(keyRadio3->isChecked()) stream << keyLineEdit3->text();
184 if(authOpen->isChecked()) 184 if(authOpen->isChecked())
185 stream << " open"; 185 stream << " open";
186 else 186 else
187 stream << " restricted"; 187 stream << " restricted";
188 stream << "\"\n"; 188 stream << "\"\n";
189 } 189 }
190 stream << "\tRATE=auto\n"; 190 stream << "\tRATE=auto\n";
191 if(line.contains("esac")) 191 if(line.contains("esac"))
192 stream << line << "\n"; 192 stream << line << "\n";
193 } 193 }
194 if(line.contains(";;")) 194 if(line.contains(";;"))
195 output = true; 195 output = true;
196 if(output && (*it).length() ) 196 if(output && (*it).length() )
197 stream << (*it) << '\n'; 197 stream << (*it) << '\n';
198 } 198 }
199 file.close(); 199 file.close();
200} 200}
201 201
202/** 202/**
203 * Check to see if the current config is valid 203 * Check to see if the current config is valid
204 * Save wireless.opts, save interfaces 204 * Save wireless.opts, save interfaces
205 */ 205 */
206void WLANImp::accept(){ 206void WLANImp::accept(){
207 if(wepEnabled->isChecked()){ 207 if(wepEnabled->isChecked()){
208 if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ) 208 if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() )
209 { 209 {
210 QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok); 210 QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok);
211 return; 211 return;
212 } 212 }
213 } 213 }
214 214
215 if(essSpecificLineEdit->text().isEmpty()){ 215 if(essSpecificLineEdit->text().isEmpty()){
216 QMessageBox::information(this, "Error", "Please enter a ESS-ID.", QMessageBox::Ok); 216 QMessageBox::information(this, "Error", "Please enter a ESS-ID.", QMessageBox::Ok);
217 return; 217 return;
218 } 218 }
219 219
220 // Ok settings are good here, save 220 // Ok settings are good here, save
221 changeAndSaveSettingFile(); 221 changeAndSaveSettingFile();
222 222
223 // Try to save the interfaces settings. 223 // Try to save the interfaces settings.
224 if(!interfaceSetup->saveChanges()) 224 if(!interfaceSetup->saveChanges())
225 return; 225 return;
226 226
227 return;
228 // Restart the device now that the settings have changed 227 // Restart the device now that the settings have changed
229 QString initpath; 228 QString initpath;
230 if( QDir("/etc/rc.d/init.d").exists() ) 229 if( QDir("/etc/rc.d/init.d").exists() )
231 initpath = "/etc/rc.d/init.d"; 230 initpath = "/etc/rc.d/init.d";
232 else if( QDir("/etc/init.d").exists() ) 231 else if( QDir("/etc/init.d").exists() )
233 initpath = "/etc/init.d"; 232 initpath = "/etc/init.d";
234 if( initpath ) 233 if( initpath )
235 system(QString("%1/pcmcia stop").arg(initpath)); 234 system(QString("%1/pcmcia stop").arg(initpath));
236 if( initpath ) 235 if( initpath )
237 system(QString("%1/pcmcia start").arg(initpath)); 236 system(QString("%1/pcmcia start").arg(initpath));
238 237
239 // Close out the dialog 238 // Close out the dialog
240 QDialog::accept(); 239 QDialog::accept();
241} 240}
242 241
243// wlanimp.cpp 242// wlanimp.cpp
244 243
diff --git a/noncore/settings/networksettings/wlan/wlan.ui b/noncore/settings/networksettings/wlan/wlan.ui
index 09593b3..744c559 100644
--- a/noncore/settings/networksettings/wlan/wlan.ui
+++ b/noncore/settings/networksettings/wlan/wlan.ui
@@ -1,491 +1,491 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>WLAN</class> 2<class>WLAN</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>WLAN</cstring> 7 <cstring>WLAN</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>239</width> 14 <width>239</width>
15 <height>277</height> 15 <height>277</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Wireless LAN Setting</string> 20 <string>Wireless LAN Setting</string>
21 </property> 21 </property>
22 <property stdset="1"> 22 <property stdset="1">
23 <name>sizeGripEnabled</name> 23 <name>sizeGripEnabled</name>
24 <bool>true</bool> 24 <bool>true</bool>
25 </property> 25 </property>
26 <property> 26 <property>
27 <name>layoutMargin</name> 27 <name>layoutMargin</name>
28 </property> 28 </property>
29 <vbox> 29 <vbox>
30 <property stdset="1"> 30 <property stdset="1">
31 <name>margin</name> 31 <name>margin</name>
32 <number>0</number> 32 <number>0</number>
33 </property> 33 </property>
34 <property stdset="1"> 34 <property stdset="1">
35 <name>spacing</name> 35 <name>spacing</name>
36 <number>6</number> 36 <number>6</number>
37 </property> 37 </property>
38 <widget> 38 <widget>
39 <class>QTabWidget</class> 39 <class>QTabWidget</class>
40 <property stdset="1"> 40 <property stdset="1">
41 <name>name</name> 41 <name>name</name>
42 <cstring>tabWidget</cstring> 42 <cstring>tabWidget</cstring>
43 </property> 43 </property>
44 <property stdset="1"> 44 <property stdset="1">
45 <name>enabled</name> 45 <name>enabled</name>
46 <bool>true</bool> 46 <bool>true</bool>
47 </property> 47 </property>
48 <widget> 48 <widget>
49 <class>QWidget</class> 49 <class>QWidget</class>
50 <property stdset="1"> 50 <property stdset="1">
51 <name>name</name> 51 <name>name</name>
52 <cstring>ConfigPage</cstring> 52 <cstring>ConfigPage</cstring>
53 </property> 53 </property>
54 <attribute> 54 <attribute>
55 <name>title</name> 55 <name>title</name>
56 <string>WLAN General</string> 56 <string>General</string>
57 </attribute> 57 </attribute>
58 <vbox> 58 <vbox>
59 <property stdset="1"> 59 <property stdset="1">
60 <name>margin</name> 60 <name>margin</name>
61 <number>11</number> 61 <number>11</number>
62 </property> 62 </property>
63 <property stdset="1"> 63 <property stdset="1">
64 <name>spacing</name> 64 <name>spacing</name>
65 <number>6</number> 65 <number>6</number>
66 </property> 66 </property>
67 <widget> 67 <widget>
68 <class>QCheckBox</class> 68 <class>QCheckBox</class>
69 <property stdset="1"> 69 <property stdset="1">
70 <name>name</name> 70 <name>name</name>
71 <cstring>essAny</cstring> 71 <cstring>essAny</cstring>
72 </property> 72 </property>
73 <property stdset="1"> 73 <property stdset="1">
74 <name>text</name> 74 <name>text</name>
75 <string>Sepecify Access Point</string> 75 <string>&amp;Specify Access Point</string>
76 </property> 76 </property>
77 </widget> 77 </widget>
78 <widget> 78 <widget>
79 <class>QGroupBox</class> 79 <class>QGroupBox</class>
80 <property stdset="1"> 80 <property stdset="1">
81 <name>name</name> 81 <name>name</name>
82 <cstring>GroupBox1</cstring> 82 <cstring>GroupBox1</cstring>
83 </property> 83 </property>
84 <property stdset="1"> 84 <property stdset="1">
85 <name>enabled</name> 85 <name>enabled</name>
86 <bool>false</bool> 86 <bool>false</bool>
87 </property> 87 </property>
88 <property stdset="1"> 88 <property stdset="1">
89 <name>title</name> 89 <name>title</name>
90 <string>Settings</string> 90 <string>Specific &amp;Access Point Settings</string>
91 </property> 91 </property>
92 <grid> 92 <grid>
93 <property stdset="1"> 93 <property stdset="1">
94 <name>margin</name> 94 <name>margin</name>
95 <number>11</number> 95 <number>11</number>
96 </property> 96 </property>
97 <property stdset="1"> 97 <property stdset="1">
98 <name>spacing</name> 98 <name>spacing</name>
99 <number>6</number> 99 <number>6</number>
100 </property> 100 </property>
101 <widget row="0" column="0" > 101 <widget row="0" column="0" >
102 <class>QLabel</class> 102 <class>QLabel</class>
103 <property stdset="1"> 103 <property stdset="1">
104 <name>name</name> 104 <name>name</name>
105 <cstring>TextLabel1</cstring> 105 <cstring>TextLabel1</cstring>
106 </property> 106 </property>
107 <property stdset="1"> 107 <property stdset="1">
108 <name>text</name> 108 <name>text</name>
109 <string>ESS-ID</string> 109 <string>ESS-ID</string>
110 </property> 110 </property>
111 </widget> 111 </widget>
112 <widget row="1" column="0" > 112 <widget row="1" column="0" >
113 <class>QLabel</class> 113 <class>QLabel</class>
114 <property stdset="1"> 114 <property stdset="1">
115 <name>name</name> 115 <name>name</name>
116 <cstring>TextLabel2_2</cstring> 116 <cstring>TextLabel2</cstring>
117 </property> 117 </property>
118 <property stdset="1"> 118 <property stdset="1">
119 <name>text</name> 119 <name>text</name>
120 <string>Network Type</string> 120 <string>Network Type</string>
121 </property> 121 </property>
122 </widget> 122 </widget>
123 <widget row="0" column="1" rowspan="1" colspan="2" > 123 <widget row="0" column="1" rowspan="1" colspan="2" >
124 <class>QLineEdit</class> 124 <class>QLineEdit</class>
125 <property stdset="1"> 125 <property stdset="1">
126 <name>name</name> 126 <name>name</name>
127 <cstring>essSpecificLineEdit</cstring> 127 <cstring>essSpecificLineEdit</cstring>
128 </property> 128 </property>
129 </widget> 129 </widget>
130 <widget row="1" column="1" rowspan="1" colspan="2" > 130 <widget row="1" column="1" rowspan="1" colspan="2" >
131 <class>QComboBox</class> 131 <class>QComboBox</class>
132 <item> 132 <item>
133 <property> 133 <property>
134 <name>text</name> 134 <name>text</name>
135 <string>Infrastructure</string> 135 <string>Infrastructure</string>
136 </property> 136 </property>
137 </item> 137 </item>
138 <item> 138 <item>
139 <property> 139 <property>
140 <name>text</name> 140 <name>text</name>
141 <string>Ad-Hoc</string> 141 <string>Ad-Hoc</string>
142 </property> 142 </property>
143 </item> 143 </item>
144 <property stdset="1"> 144 <property stdset="1">
145 <name>name</name> 145 <name>name</name>
146 <cstring>networkType</cstring> 146 <cstring>networkType</cstring>
147 </property> 147 </property>
148 </widget> 148 </widget>
149 <widget row="2" column="0" > 149 <widget row="2" column="0" >
150 <class>QLabel</class> 150 <class>QLabel</class>
151 <property stdset="1"> 151 <property stdset="1">
152 <name>name</name> 152 <name>name</name>
153 <cstring>channelLabel</cstring> 153 <cstring>channelLabel</cstring>
154 </property> 154 </property>
155 <property stdset="1"> 155 <property stdset="1">
156 <name>text</name> 156 <name>text</name>
157 <string>Channel</string> 157 <string>Channel</string>
158 </property> 158 </property>
159 </widget> 159 </widget>
160 <widget row="2" column="1" > 160 <widget row="2" column="1" >
161 <class>QSpinBox</class> 161 <class>QSpinBox</class>
162 <property stdset="1"> 162 <property stdset="1">
163 <name>name</name> 163 <name>name</name>
164 <cstring>networkChannel</cstring> 164 <cstring>networkChannel</cstring>
165 </property> 165 </property>
166 <property stdset="1"> 166 <property stdset="1">
167 <name>enabled</name> 167 <name>enabled</name>
168 <bool>false</bool> 168 <bool>false</bool>
169 </property> 169 </property>
170 <property stdset="1"> 170 <property stdset="1">
171 <name>maxValue</name> 171 <name>maxValue</name>
172 <number>15</number> 172 <number>15</number>
173 </property> 173 </property>
174 <property stdset="1"> 174 <property stdset="1">
175 <name>minValue</name> 175 <name>minValue</name>
176 <number>1</number> 176 <number>1</number>
177 </property> 177 </property>
178 <property stdset="1"> 178 <property stdset="1">
179 <name>value</name> 179 <name>value</name>
180 <number>6</number> 180 <number>6</number>
181 </property> 181 </property>
182 </widget> 182 </widget>
183 <spacer row="2" column="2" > 183 <spacer row="2" column="2" >
184 <property> 184 <property>
185 <name>name</name> 185 <name>name</name>
186 <cstring>Spacer4</cstring> 186 <cstring>Spacer4</cstring>
187 </property> 187 </property>
188 <property stdset="1"> 188 <property stdset="1">
189 <name>orientation</name> 189 <name>orientation</name>
190 <enum>Horizontal</enum> 190 <enum>Horizontal</enum>
191 </property> 191 </property>
192 <property stdset="1"> 192 <property stdset="1">
193 <name>sizeType</name> 193 <name>sizeType</name>
194 <enum>Expanding</enum> 194 <enum>Expanding</enum>
195 </property> 195 </property>
196 <property> 196 <property>
197 <name>sizeHint</name> 197 <name>sizeHint</name>
198 <size> 198 <size>
199 <width>20</width> 199 <width>20</width>
200 <height>20</height> 200 <height>20</height>
201 </size> 201 </size>
202 </property> 202 </property>
203 </spacer> 203 </spacer>
204 </grid> 204 </grid>
205 </widget> 205 </widget>
206 <spacer> 206 <spacer>
207 <property> 207 <property>
208 <name>name</name> 208 <name>name</name>
209 <cstring>Spacer31</cstring> 209 <cstring>Spacer31</cstring>
210 </property> 210 </property>
211 <property stdset="1"> 211 <property stdset="1">
212 <name>orientation</name> 212 <name>orientation</name>
213 <enum>Vertical</enum> 213 <enum>Vertical</enum>
214 </property> 214 </property>
215 <property stdset="1"> 215 <property stdset="1">
216 <name>sizeType</name> 216 <name>sizeType</name>
217 <enum>Expanding</enum> 217 <enum>Expanding</enum>
218 </property> 218 </property>
219 <property> 219 <property>
220 <name>sizeHint</name> 220 <name>sizeHint</name>
221 <size> 221 <size>
222 <width>20</width> 222 <width>20</width>
223 <height>20</height> 223 <height>20</height>
224 </size> 224 </size>
225 </property> 225 </property>
226 </spacer> 226 </spacer>
227 </vbox> 227 </vbox>
228 </widget> 228 </widget>
229 <widget> 229 <widget>
230 <class>QWidget</class> 230 <class>QWidget</class>
231 <property stdset="1"> 231 <property stdset="1">
232 <name>name</name> 232 <name>name</name>
233 <cstring>WepPage</cstring> 233 <cstring>WepPage</cstring>
234 </property> 234 </property>
235 <attribute> 235 <attribute>
236 <name>title</name> 236 <name>title</name>
237 <string>Wep</string> 237 <string>Encryption</string>
238 </attribute> 238 </attribute>
239 <vbox> 239 <vbox>
240 <property stdset="1"> 240 <property stdset="1">
241 <name>margin</name> 241 <name>margin</name>
242 <number>11</number> 242 <number>11</number>
243 </property> 243 </property>
244 <property stdset="1"> 244 <property stdset="1">
245 <name>spacing</name> 245 <name>spacing</name>
246 <number>6</number> 246 <number>6</number>
247 </property> 247 </property>
248 <widget> 248 <widget>
249 <class>QCheckBox</class> 249 <class>QCheckBox</class>
250 <property stdset="1"> 250 <property stdset="1">
251 <name>name</name> 251 <name>name</name>
252 <cstring>wepEnabled</cstring> 252 <cstring>wepEnabled</cstring>
253 </property> 253 </property>
254 <property stdset="1"> 254 <property stdset="1">
255 <name>text</name> 255 <name>text</name>
256 <string>Enable Wep</string> 256 <string>&amp;Enable WEP</string>
257 </property> 257 </property>
258 </widget> 258 </widget>
259 <widget> 259 <widget>
260 <class>QButtonGroup</class> 260 <class>QButtonGroup</class>
261 <property stdset="1"> 261 <property stdset="1">
262 <name>name</name> 262 <name>name</name>
263 <cstring>ButtonGroup43</cstring> 263 <cstring>ButtonGroup43</cstring>
264 </property> 264 </property>
265 <property stdset="1"> 265 <property stdset="1">
266 <name>enabled</name> 266 <name>enabled</name>
267 <bool>false</bool> 267 <bool>false</bool>
268 </property> 268 </property>
269 <property stdset="1"> 269 <property stdset="1">
270 <name>title</name> 270 <name>title</name>
271 <string>Authentication Type</string> 271 <string>&amp;Authentication Type</string>
272 </property> 272 </property>
273 <hbox> 273 <hbox>
274 <property stdset="1"> 274 <property stdset="1">
275 <name>margin</name> 275 <name>margin</name>
276 <number>11</number> 276 <number>11</number>
277 </property> 277 </property>
278 <property stdset="1"> 278 <property stdset="1">
279 <name>spacing</name> 279 <name>spacing</name>
280 <number>6</number> 280 <number>6</number>
281 </property> 281 </property>
282 <widget> 282 <widget>
283 <class>QRadioButton</class> 283 <class>QRadioButton</class>
284 <property stdset="1"> 284 <property stdset="1">
285 <name>name</name> 285 <name>name</name>
286 <cstring>authOpen</cstring> 286 <cstring>authOpen</cstring>
287 </property> 287 </property>
288 <property stdset="1"> 288 <property stdset="1">
289 <name>text</name> 289 <name>text</name>
290 <string>Open System</string> 290 <string>&amp;Open System</string>
291 </property> 291 </property>
292 <property stdset="1"> 292 <property stdset="1">
293 <name>checked</name> 293 <name>checked</name>
294 <bool>true</bool> 294 <bool>true</bool>
295 </property> 295 </property>
296 </widget> 296 </widget>
297 <widget> 297 <widget>
298 <class>QRadioButton</class> 298 <class>QRadioButton</class>
299 <property stdset="1"> 299 <property stdset="1">
300 <name>name</name> 300 <name>name</name>
301 <cstring>authShared</cstring> 301 <cstring>authShared</cstring>
302 </property> 302 </property>
303 <property stdset="1"> 303 <property stdset="1">
304 <name>text</name> 304 <name>text</name>
305 <string>Shared Key</string> 305 <string>&amp;Shared Key</string>
306 </property> 306 </property>
307 </widget> 307 </widget>
308 </hbox> 308 </hbox>
309 </widget> 309 </widget>
310 <widget> 310 <widget>
311 <class>QButtonGroup</class> 311 <class>QButtonGroup</class>
312 <property stdset="1"> 312 <property stdset="1">
313 <name>name</name> 313 <name>name</name>
314 <cstring>KeyButtonGroup</cstring> 314 <cstring>KeyButtonGroup</cstring>
315 </property> 315 </property>
316 <property stdset="1"> 316 <property stdset="1">
317 <name>enabled</name> 317 <name>enabled</name>
318 <bool>false</bool> 318 <bool>false</bool>
319 </property> 319 </property>
320 <property stdset="1"> 320 <property stdset="1">
321 <name>title</name> 321 <name>title</name>
322 <string>Key Setting</string> 322 <string>&amp;Key Setting</string>
323 </property> 323 </property>
324 <grid> 324 <grid>
325 <property stdset="1"> 325 <property stdset="1">
326 <name>margin</name> 326 <name>margin</name>
327 <number>11</number> 327 <number>11</number>
328 </property> 328 </property>
329 <property stdset="1"> 329 <property stdset="1">
330 <name>spacing</name> 330 <name>spacing</name>
331 <number>6</number> 331 <number>6</number>
332 </property> 332 </property>
333 <widget row="0" column="1" > 333 <widget row="0" column="1" >
334 <class>QLineEdit</class> 334 <class>QLineEdit</class>
335 <property stdset="1"> 335 <property stdset="1">
336 <name>name</name> 336 <name>name</name>
337 <cstring>keyLineEdit0</cstring> 337 <cstring>keyLineEdit0</cstring>
338 </property> 338 </property>
339 <property stdset="1"> 339 <property stdset="1">
340 <name>echoMode</name> 340 <name>echoMode</name>
341 <enum>Password</enum> 341 <enum>Password</enum>
342 </property> 342 </property>
343 </widget> 343 </widget>
344 <widget row="1" column="1" > 344 <widget row="1" column="1" >
345 <class>QLineEdit</class> 345 <class>QLineEdit</class>
346 <property stdset="1"> 346 <property stdset="1">
347 <name>name</name> 347 <name>name</name>
348 <cstring>keyLineEdit1</cstring> 348 <cstring>keyLineEdit1</cstring>
349 </property> 349 </property>
350 <property stdset="1"> 350 <property stdset="1">
351 <name>echoMode</name> 351 <name>echoMode</name>
352 <enum>Password</enum> 352 <enum>Password</enum>
353 </property> 353 </property>
354 </widget> 354 </widget>
355 <widget row="2" column="1" > 355 <widget row="2" column="1" >
356 <class>QLineEdit</class> 356 <class>QLineEdit</class>
357 <property stdset="1"> 357 <property stdset="1">
358 <name>name</name> 358 <name>name</name>
359 <cstring>keyLineEdit2</cstring> 359 <cstring>keyLineEdit2</cstring>
360 </property> 360 </property>
361 <property stdset="1"> 361 <property stdset="1">
362 <name>echoMode</name> 362 <name>echoMode</name>
363 <enum>Password</enum> 363 <enum>Password</enum>
364 </property> 364 </property>
365 </widget> 365 </widget>
366 <widget row="3" column="1" > 366 <widget row="3" column="1" >
367 <class>QLineEdit</class> 367 <class>QLineEdit</class>
368 <property stdset="1"> 368 <property stdset="1">
369 <name>name</name> 369 <name>name</name>
370 <cstring>keyLineEdit3</cstring> 370 <cstring>keyLineEdit3</cstring>
371 </property> 371 </property>
372 <property stdset="1"> 372 <property stdset="1">
373 <name>echoMode</name> 373 <name>echoMode</name>
374 <enum>Password</enum> 374 <enum>Password</enum>
375 </property> 375 </property>
376 </widget> 376 </widget>
377 <widget row="0" column="0" > 377 <widget row="0" column="0" >
378 <class>QRadioButton</class> 378 <class>QRadioButton</class>
379 <property stdset="1"> 379 <property stdset="1">
380 <name>name</name> 380 <name>name</name>
381 <cstring>keyRadio0</cstring> 381 <cstring>keyRadio0</cstring>
382 </property> 382 </property>
383 <property stdset="1"> 383 <property stdset="1">
384 <name>text</name> 384 <name>text</name>
385 <string>Key 1</string> 385 <string>Key 1</string>
386 </property> 386 </property>
387 <property stdset="1"> 387 <property stdset="1">
388 <name>checked</name> 388 <name>checked</name>
389 <bool>true</bool> 389 <bool>true</bool>
390 </property> 390 </property>
391 </widget> 391 </widget>
392 <widget row="1" column="0" > 392 <widget row="1" column="0" >
393 <class>QRadioButton</class> 393 <class>QRadioButton</class>
394 <property stdset="1"> 394 <property stdset="1">
395 <name>name</name> 395 <name>name</name>
396 <cstring>keyRadio1</cstring> 396 <cstring>keyRadio1</cstring>
397 </property> 397 </property>
398 <property stdset="1"> 398 <property stdset="1">
399 <name>text</name> 399 <name>text</name>
400 <string>Key 2</string> 400 <string>Key 2</string>
401 </property> 401 </property>
402 </widget> 402 </widget>
403 <widget row="2" column="0" > 403 <widget row="2" column="0" >
404 <class>QRadioButton</class> 404 <class>QRadioButton</class>
405 <property stdset="1"> 405 <property stdset="1">
406 <name>name</name> 406 <name>name</name>
407 <cstring>keyRadio2</cstring> 407 <cstring>keyRadio2</cstring>
408 </property> 408 </property>
409 <property stdset="1"> 409 <property stdset="1">
410 <name>text</name> 410 <name>text</name>
411 <string>Key 3</string> 411 <string>Key 3</string>
412 </property> 412 </property>
413 </widget> 413 </widget>
414 <widget row="3" column="0" > 414 <widget row="3" column="0" >
415 <class>QRadioButton</class> 415 <class>QRadioButton</class>
416 <property stdset="1"> 416 <property stdset="1">
417 <name>name</name> 417 <name>name</name>
418 <cstring>keyRadio3</cstring> 418 <cstring>keyRadio3</cstring>
419 </property> 419 </property>
420 <property stdset="1"> 420 <property stdset="1">
421 <name>text</name> 421 <name>text</name>
422 <string>Key 4</string> 422 <string>Key 4</string>
423 </property> 423 </property>
424 </widget> 424 </widget>
425 </grid> 425 </grid>
426 </widget> 426 </widget>
427 <spacer> 427 <spacer>
428 <property> 428 <property>
429 <name>name</name> 429 <name>name</name>
430 <cstring>Spacer30</cstring> 430 <cstring>Spacer30</cstring>
431 </property> 431 </property>
432 <property stdset="1"> 432 <property stdset="1">
433 <name>orientation</name> 433 <name>orientation</name>
434 <enum>Vertical</enum> 434 <enum>Vertical</enum>
435 </property> 435 </property>
436 <property stdset="1"> 436 <property stdset="1">
437 <name>sizeType</name> 437 <name>sizeType</name>
438 <enum>Expanding</enum> 438 <enum>Expanding</enum>
439 </property> 439 </property>
440 <property> 440 <property>
441 <name>sizeHint</name> 441 <name>sizeHint</name>
442 <size> 442 <size>
443 <width>20</width> 443 <width>20</width>
444 <height>20</height> 444 <height>20</height>
445 </size> 445 </size>
446 </property> 446 </property>
447 </spacer> 447 </spacer>
448 </vbox> 448 </vbox>
449 </widget> 449 </widget>
450 </widget> 450 </widget>
451 </vbox> 451 </vbox>
452</widget> 452</widget>
453<connections> 453<connections>
454 <connection> 454 <connection>
455 <sender>wepEnabled</sender> 455 <sender>wepEnabled</sender>
456 <signal>toggled(bool)</signal> 456 <signal>toggled(bool)</signal>
457 <receiver>ButtonGroup43</receiver> 457 <receiver>ButtonGroup43</receiver>
458 <slot>setEnabled(bool)</slot> 458 <slot>setEnabled(bool)</slot>
459 </connection> 459 </connection>
460 <connection> 460 <connection>
461 <sender>wepEnabled</sender> 461 <sender>wepEnabled</sender>
462 <signal>toggled(bool)</signal> 462 <signal>toggled(bool)</signal>
463 <receiver>KeyButtonGroup</receiver> 463 <receiver>KeyButtonGroup</receiver>
464 <slot>setEnabled(bool)</slot> 464 <slot>setEnabled(bool)</slot>
465 </connection> 465 </connection>
466 <connection> 466 <connection>
467 <sender>essAny</sender> 467 <sender>essAny</sender>
468 <signal>toggled(bool)</signal> 468 <signal>toggled(bool)</signal>
469 <receiver>GroupBox1</receiver> 469 <receiver>GroupBox1</receiver>
470 <slot>setEnabled(bool)</slot> 470 <slot>setEnabled(bool)</slot>
471 </connection> 471 </connection>
472</connections> 472</connections>
473<tabstops> 473<tabstops>
474 <tabstop>tabWidget</tabstop> 474 <tabstop>tabWidget</tabstop>
475 <tabstop>essAny</tabstop> 475 <tabstop>essAny</tabstop>
476 <tabstop>essSpecificLineEdit</tabstop> 476 <tabstop>essSpecificLineEdit</tabstop>
477 <tabstop>networkType</tabstop> 477 <tabstop>networkType</tabstop>
478 <tabstop>networkChannel</tabstop> 478 <tabstop>networkChannel</tabstop>
479 <tabstop>wepEnabled</tabstop> 479 <tabstop>wepEnabled</tabstop>
480 <tabstop>authOpen</tabstop> 480 <tabstop>authOpen</tabstop>
481 <tabstop>authShared</tabstop> 481 <tabstop>authShared</tabstop>
482 <tabstop>keyRadio0</tabstop> 482 <tabstop>keyRadio0</tabstop>
483 <tabstop>keyLineEdit0</tabstop> 483 <tabstop>keyLineEdit0</tabstop>
484 <tabstop>keyRadio1</tabstop> 484 <tabstop>keyRadio1</tabstop>
485 <tabstop>keyLineEdit1</tabstop> 485 <tabstop>keyLineEdit1</tabstop>
486 <tabstop>keyRadio2</tabstop> 486 <tabstop>keyRadio2</tabstop>
487 <tabstop>keyLineEdit2</tabstop> 487 <tabstop>keyLineEdit2</tabstop>
488 <tabstop>keyRadio3</tabstop> 488 <tabstop>keyRadio3</tabstop>
489 <tabstop>keyLineEdit3</tabstop> 489 <tabstop>keyLineEdit3</tabstop>
490</tabstops> 490</tabstops>
491</UI> 491</UI>
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp
index ef7329e..120d4e5 100644
--- a/noncore/settings/networksettings/wlan/wlanimp.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp.cpp
@@ -1,244 +1,243 @@
1#include "wlanimp.h" 1#include "wlanimp.h"
2#include "interfacesetupimp.h" 2#include "interfacesetupimp.h"
3 3
4#include <qfile.h> 4#include <qfile.h>
5#include <qdir.h> 5#include <qdir.h>
6#include <qtextstream.h> 6#include <qtextstream.h>
7#include <qmessagebox.h> 7#include <qmessagebox.h>
8#include <qlineedit.h> 8#include <qlineedit.h>
9#include <qlabel.h> 9#include <qlabel.h>
10#include <qspinbox.h> 10#include <qspinbox.h>
11#include <qradiobutton.h> 11#include <qradiobutton.h>
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/* system() */ 16/* system() */
17#include <stdlib.h> 17#include <stdlib.h>
18 18
19#define WIRELESS_OPTS "/etc/pcmcia/wireless.opts" 19#define WIRELESS_OPTS "/etc/pcmcia/wireless.opts"
20 20
21/** 21/**
22 * Constructor, read in the wireless.opts file for parsing later. 22 * Constructor, read in the wireless.opts file for parsing later.
23 */ 23 */
24WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl), currentProfile("*") { 24WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl), currentProfile("*") {
25 interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i); 25 interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i);
26 tabWidget->insertTab(interfaceSetup, "TCP/IP"); 26 tabWidget->insertTab(interfaceSetup, "TCP/IP");
27 27
28 // Read in the config file. 28 // Read in the config file.
29 QString wlanFile = WIRELESS_OPTS; 29 QString wlanFile = WIRELESS_OPTS;
30 QFile file(wlanFile); 30 QFile file(wlanFile);
31 if (file.open(IO_ReadOnly)){ 31 if (file.open(IO_ReadOnly)){
32 QTextStream stream( &file ); 32 QTextStream stream( &file );
33 QString line = ""; 33 QString line = "";
34 while ( !stream.eof() ) { 34 while ( !stream.eof() ) {
35 line += stream.readLine(); 35 line += stream.readLine();
36 line += "\n"; 36 line += "\n";
37 } 37 }
38 file.close(); 38 file.close();
39 settingsFileText = QStringList::split("\n", line, true); 39 settingsFileText = QStringList::split("\n", line, true);
40 parseSettingFile(); 40 parseSettingFile();
41 } 41 }
42 else 42 else
43 qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1()); 43 qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1());
44 connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int))); 44 connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int)));
45 45
46} 46}
47 47
48void WLANImp::typeChanged(int mod){ 48void WLANImp::typeChanged(int mod){
49 networkChannel->setEnabled(mod); 49 networkChannel->setEnabled(mod);
50 channelLabel->setEnabled(mod); 50 channelLabel->setEnabled(mod);
51} 51}
52 52
53/** 53/**
54 * Change the profile for both wireless settings and network settings. 54 * Change the profile for both wireless settings and network settings.
55 */ 55 */
56void WLANImp::setProfile(const QString &profile){ 56void WLANImp::setProfile(const QString &profile){
57 interfaceSetup->setProfile(profile); 57 interfaceSetup->setProfile(profile);
58 parseSettingFile(); 58 parseSettingFile();
59} 59}
60 60
61/** 61/**
62 * Parses the settings file that was read in and gets any setting from it. 62 * Parses the settings file that was read in and gets any setting from it.
63 */ 63 */
64void WLANImp::parseSettingFile(){ 64void WLANImp::parseSettingFile(){
65 bool foundCase = false; 65 bool foundCase = false;
66 bool found = false; 66 bool found = false;
67 for ( QStringList::Iterator it = settingsFileText.begin(); it != settingsFileText.end(); ++it ) { 67 for ( QStringList::Iterator it = settingsFileText.begin(); it != settingsFileText.end(); ++it ) {
68 QString line = (*it).simplifyWhiteSpace(); 68 QString line = (*it).simplifyWhiteSpace();
69 if(line.contains("case")) 69 if(line.contains("case"))
70 foundCase = true; 70 foundCase = true;
71 // See if we found our scheme to write or the sceme couldn't be found 71 // See if we found our scheme to write or the sceme couldn't be found
72 if((foundCase && line.contains("esac")) || 72 if((foundCase && line.contains("esac")) ||
73 (foundCase && line.left(currentProfile.length()+7) == currentProfile + ",*,*,*)" && line.at(0) != '#')) 73 (foundCase && line.left(currentProfile.length()+7) == currentProfile + ",*,*,*)" && line.at(0) != '#'))
74 found = true; 74 found = true;
75 75
76 if(line.contains(";;")) 76 if(line.contains(";;"))
77 found = false; 77 found = false;
78 if(found){ 78 if(found){
79 // write out scheme 79 // write out scheme
80 if(line.contains("ESSID=")){ 80 if(line.contains("ESSID=")){
81 QString id = line.mid(line.find("ESSID=")+6, line.length()); 81 QString id = line.mid(line.find("ESSID=")+6, line.length());
82 if(id == "any"){ 82 if(id == "any"){
83 essAny->setChecked(false); 83 essAny->setChecked(false);
84 }else{ 84 }else{
85 essAny->setChecked(true); 85 essAny->setChecked(true);
86 essSpecificLineEdit->setText(id); 86 essSpecificLineEdit->setText(id);
87 } 87 }
88 } 88 }
89 if(line.contains("MODE=")){ 89 if(line.contains("MODE=")){
90 QString mode = line.mid(line.find("MODE=")+5, line.length()); 90 QString mode = line.mid(line.find("MODE=")+5, line.length());
91 if(mode == "Managed"){ 91 if(mode == "Managed"){
92 networkType->setCurrentItem(0); 92 networkType->setCurrentItem(0);
93 } 93 }
94 else{ 94 else{
95 networkType->setCurrentItem(0); 95 networkType->setCurrentItem(0);
96 } 96 }
97 } 97 }
98 if(line.contains("KEY0=")) 98 if(line.contains("KEY0="))
99 keyLineEdit0->setText(line.mid(5, line.length())); 99 keyLineEdit0->setText(line.mid(5, line.length()));
100 if(line.contains("KEY1=")) 100 if(line.contains("KEY1="))
101 keyLineEdit1->setText(line.mid(5, line.length())); 101 keyLineEdit1->setText(line.mid(5, line.length()));
102 if(line.contains("KEY2=")) 102 if(line.contains("KEY2="))
103 keyLineEdit2->setText(line.mid(5, line.length())); 103 keyLineEdit2->setText(line.mid(5, line.length()));
104 if(line.contains("KEY3=")) 104 if(line.contains("KEY3="))
105 keyLineEdit3->setText(line.mid(5, line.length())); 105 keyLineEdit3->setText(line.mid(5, line.length()));
106 106
107 if(line.contains("KEY=")){ 107 if(line.contains("KEY=")){
108 wepEnabled->setChecked(true); 108 wepEnabled->setChecked(true);
109 QString key; 109 QString key;
110 if(line.right(5) == (" open")){ 110 if(line.right(5) == (" open")){
111 key = line.mid(4, line.length()-5); 111 key = line.mid(4, line.length()-5);
112 authOpen->setChecked(true); 112 authOpen->setChecked(true);
113 authShared->setChecked(false); 113 authShared->setChecked(false);
114 } 114 }
115 else{ 115 else{
116 authOpen->setChecked(false); 116 authOpen->setChecked(false);
117 authShared->setChecked(true); 117 authShared->setChecked(true);
118 key = line.mid(4, line.length()); 118 key = line.mid(4, line.length());
119 } 119 }
120 if(key == keyLineEdit0->text()) keyRadio0->setChecked(true); 120 if(key == keyLineEdit0->text()) keyRadio0->setChecked(true);
121 if(key == keyLineEdit1->text()) keyRadio1->setChecked(true); 121 if(key == keyLineEdit1->text()) keyRadio1->setChecked(true);
122 if(key == keyLineEdit2->text()) keyRadio2->setChecked(true); 122 if(key == keyLineEdit2->text()) keyRadio2->setChecked(true);
123 if(key == keyLineEdit3->text()) keyRadio3->setChecked(true); 123 if(key == keyLineEdit3->text()) keyRadio3->setChecked(true);
124 } 124 }
125 if(line.contains("CHANNEL=")){ 125 if(line.contains("CHANNEL=")){
126 networkChannel->setValue(line.mid(line.find("CHANNEL=")+8, line.length()).toInt()); 126 networkChannel->setValue(line.mid(line.find("CHANNEL=")+8, line.length()).toInt());
127 } 127 }
128 } 128 }
129 } 129 }
130} 130}
131 131
132/** 132/**
133 * Saves settings to the wireless.opts file using the current profile 133 * Saves settings to the wireless.opts file using the current profile
134 */ 134 */
135void WLANImp::changeAndSaveSettingFile(){ 135void WLANImp::changeAndSaveSettingFile(){
136 QString wlanFile = WIRELESS_OPTS; 136 QString wlanFile = WIRELESS_OPTS;
137 QFile::remove(wlanFile); 137 QFile::remove(wlanFile);
138 QFile file(wlanFile); 138 QFile file(wlanFile);
139 139
140 if (!file.open(IO_ReadWrite)){ 140 if (!file.open(IO_ReadWrite)){
141 qDebug(QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1()); 141 qDebug(QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1());
142 return; 142 return;
143 } 143 }
144 144
145 QTextStream stream( &file ); 145 QTextStream stream( &file );
146 bool foundCase = false; 146 bool foundCase = false;
147 bool found = false; 147 bool found = false;
148 bool output = true; 148 bool output = true;
149 for ( QStringList::Iterator it = settingsFileText.begin(); it != settingsFileText.end(); ++it ) { 149 for ( QStringList::Iterator it = settingsFileText.begin(); it != settingsFileText.end(); ++it ) {
150 QString line = (*it).simplifyWhiteSpace(); 150 QString line = (*it).simplifyWhiteSpace();
151 if(line.contains("case")) 151 if(line.contains("case"))
152 foundCase = true; 152 foundCase = true;
153 // See if we found our scheme to write or the sceme couldn't be found 153 // See if we found our scheme to write or the sceme couldn't be found
154 if((foundCase && line.contains("esac") && !found) || 154 if((foundCase && line.contains("esac") && !found) ||
155 (foundCase && line.left(currentProfile.length()+7) == currentProfile + ",*,*,*)" && line.at(0) != '#')){ 155 (foundCase && line.left(currentProfile.length()+7) == currentProfile + ",*,*,*)" && line.at(0) != '#')){
156 // write out scheme 156 // write out scheme
157 found = true; 157 found = true;
158 output = false; 158 output = false;
159 159
160 if(!line.contains("esac")) 160 if(!line.contains("esac"))
161 stream << line << "\n"; 161 stream << line << "\n";
162 if(!essAny->isChecked() == true){ 162 if(!essAny->isChecked() == true){
163 stream << "\tESSID=any\n"; 163 stream << "\tESSID=any\n";
164 stream << "\tMODE=Managed\n"; 164 stream << "\tMODE=Managed\n";
165 stream << "\tCHANNEL=6\n"; 165 stream << "\tCHANNEL=6\n";
166 } 166 }
167 else{ 167 else{
168 stream << "\tESSID=" << essSpecificLineEdit->text() << '\n'; 168 stream << "\tESSID=" << essSpecificLineEdit->text() << '\n';
169 stream << "\tMODE=" << ( networkType->currentItem() == 0 ? "Managed" : "ad-hoc") << '\n'; 169 stream << "\tMODE=" << ( networkType->currentItem() == 0 ? "Managed" : "ad-hoc") << '\n';
170 stream << "\tCHANNEL=" << networkChannel->value() << "\n"; 170 stream << "\tCHANNEL=" << networkChannel->value() << "\n";
171 } 171 }
172 172
173 stream << "\tKEY0=" << keyLineEdit0->text() << "\n"; 173 stream << "\tKEY0=" << keyLineEdit0->text() << "\n";
174 stream << "\tKEY1=" << keyLineEdit1->text() << "\n"; 174 stream << "\tKEY1=" << keyLineEdit1->text() << "\n";
175 stream << "\tKEY2=" << keyLineEdit2->text() << "\n"; 175 stream << "\tKEY2=" << keyLineEdit2->text() << "\n";
176 stream << "\tKEY3=" << keyLineEdit3->text() << "\n"; 176 stream << "\tKEY3=" << keyLineEdit3->text() << "\n";
177 177
178 if(wepEnabled->isChecked()){ 178 if(wepEnabled->isChecked()){
179 stream << "\tKEY=\""; 179 stream << "\tKEY=\"";
180 if(keyRadio0->isChecked()) stream << keyLineEdit0->text(); 180 if(keyRadio0->isChecked()) stream << keyLineEdit0->text();
181 if(keyRadio1->isChecked()) stream << keyLineEdit1->text(); 181 if(keyRadio1->isChecked()) stream << keyLineEdit1->text();
182 if(keyRadio2->isChecked()) stream << keyLineEdit2->text(); 182 if(keyRadio2->isChecked()) stream << keyLineEdit2->text();
183 if(keyRadio3->isChecked()) stream << keyLineEdit3->text(); 183 if(keyRadio3->isChecked()) stream << keyLineEdit3->text();
184 if(authOpen->isChecked()) 184 if(authOpen->isChecked())
185 stream << " open"; 185 stream << " open";
186 else 186 else
187 stream << " restricted"; 187 stream << " restricted";
188 stream << "\"\n"; 188 stream << "\"\n";
189 } 189 }
190 stream << "\tRATE=auto\n"; 190 stream << "\tRATE=auto\n";
191 if(line.contains("esac")) 191 if(line.contains("esac"))
192 stream << line << "\n"; 192 stream << line << "\n";
193 } 193 }
194 if(line.contains(";;")) 194 if(line.contains(";;"))
195 output = true; 195 output = true;
196 if(output && (*it).length() ) 196 if(output && (*it).length() )
197 stream << (*it) << '\n'; 197 stream << (*it) << '\n';
198 } 198 }
199 file.close(); 199 file.close();
200} 200}
201 201
202/** 202/**
203 * Check to see if the current config is valid 203 * Check to see if the current config is valid
204 * Save wireless.opts, save interfaces 204 * Save wireless.opts, save interfaces
205 */ 205 */
206void WLANImp::accept(){ 206void WLANImp::accept(){
207 if(wepEnabled->isChecked()){ 207 if(wepEnabled->isChecked()){
208 if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ) 208 if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() )
209 { 209 {
210 QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok); 210 QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok);
211 return; 211 return;
212 } 212 }
213 } 213 }
214 214
215 if(essSpecificLineEdit->text().isEmpty()){ 215 if(essSpecificLineEdit->text().isEmpty()){
216 QMessageBox::information(this, "Error", "Please enter a ESS-ID.", QMessageBox::Ok); 216 QMessageBox::information(this, "Error", "Please enter a ESS-ID.", QMessageBox::Ok);
217 return; 217 return;
218 } 218 }
219 219
220 // Ok settings are good here, save 220 // Ok settings are good here, save
221 changeAndSaveSettingFile(); 221 changeAndSaveSettingFile();
222 222
223 // Try to save the interfaces settings. 223 // Try to save the interfaces settings.
224 if(!interfaceSetup->saveChanges()) 224 if(!interfaceSetup->saveChanges())
225 return; 225 return;
226 226
227 return;
228 // Restart the device now that the settings have changed 227 // Restart the device now that the settings have changed
229 QString initpath; 228 QString initpath;
230 if( QDir("/etc/rc.d/init.d").exists() ) 229 if( QDir("/etc/rc.d/init.d").exists() )
231 initpath = "/etc/rc.d/init.d"; 230 initpath = "/etc/rc.d/init.d";
232 else if( QDir("/etc/init.d").exists() ) 231 else if( QDir("/etc/init.d").exists() )
233 initpath = "/etc/init.d"; 232 initpath = "/etc/init.d";
234 if( initpath ) 233 if( initpath )
235 system(QString("%1/pcmcia stop").arg(initpath)); 234 system(QString("%1/pcmcia stop").arg(initpath));
236 if( initpath ) 235 if( initpath )
237 system(QString("%1/pcmcia start").arg(initpath)); 236 system(QString("%1/pcmcia start").arg(initpath));
238 237
239 // Close out the dialog 238 // Close out the dialog
240 QDialog::accept(); 239 QDialog::accept();
241} 240}
242 241
243// wlanimp.cpp 242// wlanimp.cpp
244 243