summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/wlan
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings/wlan') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/wlan/keyedit.cpp1
-rw-r--r--noncore/settings/networksettings/wlan/wlan.ui96
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.cpp33
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp2
4 files changed, 73 insertions, 59 deletions
diff --git a/noncore/settings/networksettings/wlan/keyedit.cpp b/noncore/settings/networksettings/wlan/keyedit.cpp
index ad9ecae..13a1c3b 100644
--- a/noncore/settings/networksettings/wlan/keyedit.cpp
+++ b/noncore/settings/networksettings/wlan/keyedit.cpp
@@ -6,2 +6,3 @@ KeyEdit::KeyEdit(QWidget* parent, const char* name) :
{
+ setEchoMode(Password);
}
diff --git a/noncore/settings/networksettings/wlan/wlan.ui b/noncore/settings/networksettings/wlan/wlan.ui
index 7932445..7e39e23 100644
--- a/noncore/settings/networksettings/wlan/wlan.ui
+++ b/noncore/settings/networksettings/wlan/wlan.ui
@@ -13,3 +13,3 @@
<y>0</y>
- <width>251</width>
+ <width>247</width>
<height>299</height>
@@ -289,15 +289,3 @@
<name>text</name>
- <string>Auto</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>Managed</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>Ad-Hoc</string>
+ <string>any</string>
</property>
@@ -306,7 +294,3 @@
<name>name</name>
- <cstring>mode</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>true</bool>
+ <cstring>essid</cstring>
</property>
@@ -316,3 +300,3 @@
<x>101</x>
- <y>11</y>
+ <y>46</y>
<width>103</width>
@@ -324,3 +308,3 @@
<sizepolicy>
- <hsizetype>1</hsizetype>
+ <hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
@@ -328,2 +312,22 @@
</property>
+ <property stdset="1">
+ <name>editable</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>currentItem</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>sizeLimit</name>
+ <number>5</number>
+ </property>
+ <property stdset="1">
+ <name>autoCompletion</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>duplicatesEnabled</name>
+ <bool>false</bool>
+ </property>
</widget>
@@ -334,3 +338,21 @@
<name>text</name>
- <string>any</string>
+ <string>Infrastructure</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Auto</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Managed</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Ad-Hoc</string>
</property>
@@ -339,3 +361,7 @@
<name>name</name>
- <cstring>essid</cstring>
+ <cstring>mode</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>true</bool>
</property>
@@ -345,3 +371,3 @@
<x>101</x>
- <y>46</y>
+ <y>11</y>
<width>103</width>
@@ -353,3 +379,3 @@
<sizepolicy>
- <hsizetype>7</hsizetype>
+ <hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
@@ -357,22 +383,2 @@
</property>
- <property stdset="1">
- <name>editable</name>
- <bool>true</bool>
- </property>
- <property stdset="1">
- <name>currentItem</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>sizeLimit</name>
- <number>5</number>
- </property>
- <property stdset="1">
- <name>autoCompletion</name>
- <bool>true</bool>
- </property>
- <property stdset="1">
- <name>duplicatesEnabled</name>
- <bool>false</bool>
- </property>
</widget>
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp
index cdafb4d..26e3aa9 100644
--- a/noncore/settings/networksettings/wlan/wlanimp2.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp
@@ -29,3 +29,3 @@
*/
-WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), currentProfile("*"), interface(i) {
+WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), interface(i), currentProfile("*") {
interfaces = new Interfaces();
@@ -69,10 +69,5 @@ void WLANImp::parseOpts() {
opt = interfaces->getInterfaceOption("wireless_mode", error).simplifyWhiteSpace();
- if (opt == "Auto") {
- mode->setCurrentItem(0);
- } else if (opt == "Ad-Hoc") {
- mode->setCurrentItem(2);
- } else {
- // Managed/Infrastructure mode
- mode->setCurrentItem(1);
- }
+
+ for ( int i = 0; i < mode->count(); i++)
+ if ( mode->text( i ) == opt ) mode->setCurrentItem( i );
@@ -205,3 +200,3 @@ void WLANImp::accept() {
// Close out the dialog
- QDialog::accept();
+// FIXME: QDialog::accept();
}
@@ -209,4 +204,13 @@ void WLANImp::accept() {
void WLANImp::writeOpts() {
+ // eh can't really do anything about it other then return. :-D
+ if(!interfaces->isInterfaceSet()){
+ QMessageBox::warning(0,"Inface not set","should not happen!!!");
+ return;
+ }
bool error = false;
+ qDebug("setting wlan interface %s", interfaces->getInterfaceName( error ).latin1() );
+
+ if (error) QMessageBox::warning(0,"Inface not set","should not happen!!!");
+
interfaces->setInterfaceOption(QString("wireless_mode"), mode->currentText());
@@ -232,9 +236,12 @@ void WLANImp::writeOpts() {
keyList += "[1]";
- } else if (! keyLineEdit1->text().isNull()) {
+ } //else
+ if (! keyLineEdit1->text().isNull()) {
keyList += keyLineEdit1->text();
keyList += "[2]";
- } else if (! keyLineEdit2->text().isNull()) {
+ } //else
+ if (! keyLineEdit2->text().isNull()) {
keyList += keyLineEdit2->text();
keyList += "[3]";
- } else if (! keyLineEdit3->text().isNull()) {
+ } //else
+ if (! keyLineEdit3->text().isNull()) {
keyList += keyLineEdit3->text();
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp
index a4488f9..b4c3509 100644
--- a/noncore/settings/networksettings/wlan/wlanmodule.cpp
+++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp
@@ -1,3 +1,3 @@
#include "wlanmodule.h"
-#include "wlanimp.h"
+#include "wlanimp2.h"
#include "infoimp.h"