Diffstat (limited to 'noncore/settings/networksettings/wlan') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/wlan/keyedit.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlan.ui | 96 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp2.cpp | 33 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.cpp | 2 |
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 @@ -4,6 +4,7 @@ KeyEdit::KeyEdit(QWidget* parent, const char* name) : QLineEdit(parent, name) { + setEchoMode(Password); } KeyEdit::~KeyEdit() 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 @@ -11,7 +11,7 @@ <rect> <x>0</x> <y>0</y> - <width>251</width> + <width>247</width> <height>299</height> </rect> </property> @@ -287,34 +287,18 @@ <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> + <string>any</string> </property> </item> <property stdset="1"> <name>name</name> - <cstring>mode</cstring> - </property> - <property stdset="1"> - <name>enabled</name> - <bool>true</bool> + <cstring>essid</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>101</x> - <y>11</y> + <y>46</y> <width>103</width> <height>29</height> </rect> @@ -322,28 +306,70 @@ <property stdset="1"> <name>sizePolicy</name> <sizepolicy> - <hsizetype>1</hsizetype> + <hsizetype>7</hsizetype> <vsizetype>0</vsizetype> </sizepolicy> </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> <widget> <class>QComboBox</class> <item> <property> <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> </item> <property stdset="1"> <name>name</name> - <cstring>essid</cstring> + <cstring>mode</cstring> + </property> + <property stdset="1"> + <name>enabled</name> + <bool>true</bool> </property> <property stdset="1"> <name>geometry</name> <rect> <x>101</x> - <y>46</y> + <y>11</y> <width>103</width> <height>29</height> </rect> @@ -351,30 +377,10 @@ <property stdset="1"> <name>sizePolicy</name> <sizepolicy> - <hsizetype>7</hsizetype> + <hsizetype>1</hsizetype> <vsizetype>0</vsizetype> </sizepolicy> </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> </widget> <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 @@ -27,7 +27,7 @@ /** * Constructor, read in the wireless.opts file for parsing later. */ -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(); interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, interfaces); tabWidget->insertTab(interfaceSetup, "TCP/IP"); @@ -67,14 +67,9 @@ 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 ); opt = interfaces->getInterfaceOption("wireless_ap", error).simplifyWhiteSpace(); if (! opt.isNull()) { @@ -203,12 +198,21 @@ void WLANImp::accept() { writeOpts(); // Close out the dialog - QDialog::accept(); +// FIXME: QDialog::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()); interfaces->setInterfaceOption(QString("wireless_essid"), essid->currentText()); @@ -230,13 +234,16 @@ void WLANImp::writeOpts() { if (! keyLineEdit0->text().isNull()) { keyList += keyLineEdit0->text(); 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(); keyList += "[4]"; } 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,5 +1,5 @@ #include "wlanmodule.h" -#include "wlanimp.h" +#include "wlanimp2.h" #include "infoimp.h" #include "wextensions.h" #include "interfaceinformationimp.h" |