summaryrefslogtreecommitdiff
authortille <tille>2003-06-21 15:34:55 (UTC)
committer tille <tille>2003-06-21 15:34:55 (UTC)
commit5f5accf337a109371296c6a78175734454165406 (patch) (side-by-side diff)
tree7c4334febdedcd8c0b42a2296af6875f6f990762
parentfde32755685bec14851f943be337e94675caf0c4 (diff)
downloadopie-5f5accf337a109371296c6a78175734454165406.zip
opie-5f5accf337a109371296c6a78175734454165406.tar.gz
opie-5f5accf337a109371296c6a78175734454165406.tar.bz2
channel count for wellenreiter
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfaces.cpp0
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp2
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp36
3 files changed, 35 insertions, 3 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfaces.cpp b/noncore/settings/networksettings/interfaces/interfaces.cpp
index a62a90c..71d0cf5 100644
--- a/noncore/settings/networksettings/interfaces/interfaces.cpp
+++ b/noncore/settings/networksettings/interfaces/interfaces.cpp
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index f19cbdd..b40d101 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -182,16 +182,18 @@ void InterfaceSetupImp::setProfile(const QString &profile){
qDebug("dns >%s<",dns.latin1());
if(dns.contains(" ")){
firstDNSLineEdit->setText(dns.mid(0, dns.find(" ")));
secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length()));
}else firstDNSLineEdit->setText(dns);
ipAddressEdit->setText(interfaces->getInterfaceOption("address", error));
subnetMaskEdit->setText(interfaces->getInterfaceOption("netmask", error));
+ if (subnetMaskEdit->text().isEmpty())
+ subnetMaskEdit->setText( "255.255.255.0" );
gatewayEdit->setText(interfaces->getInterfaceOption("gateway", error));
qWarning("InterfaceSetupImp::setProfile(%s)\n", profile.latin1());
qWarning("InterfaceSetupImp::setProfile: iface is %s\n", interfaces->getInterfaceName(error).latin1());
}
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp
index 7bded85..a4488f9 100644
--- a/noncore/settings/networksettings/wlan/wlanmodule.cpp
+++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp
@@ -127,19 +127,36 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
qDebug("Erorr less than 2 parameter");
qDebug("RETURNING");
return;
}
QDataStream stream(arg,IO_ReadOnly);
QString interface;
QString action;
+ int countMsgs = 0;
+ stream >> interface;
+ qDebug("got count? >%s<",interface.latin1());
+ if (interface == "count"){
+ qDebug("got count");
+ stream >> action;
+ qDebug("Got count num >%s<", action.latin1());
+ countMsgs = action.toInt();
+ }
+
QDialog *toShow;
- while (! stream.atEnd() ){
+ //while (! stream.atEnd() ){
+ for (int i = 0; i < countMsgs; i++){
+ qDebug("start stream %d/%d",i,countMsgs);
+ if (stream.atEnd()){
+ qDebug("end of stream");
+ return;
+ }
stream >> interface;
+ qDebug("got iface");
stream >> action;
qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1());
// find interfaces
Interface *ifa=0;
for ( Interface *i=list.first(); i != 0; i=list.next() ){
if (i->getInterfaceName() == interface){
qDebug("WLANModule found interface %s",interface.latin1());
ifa = i;
@@ -170,17 +187,21 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
QString value;
if (!wlanconfigWiget){
//FIXME: what if it got closed meanwhile?
wlanconfigWiget = (WLANImp*) configure(ifa);
toShow = (QDialog*) wlanconfigWiget;
}
wlanconfigWiget->showMaximized();
stream >> value;
- qDebug("WLANModule is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() );
+ qDebug("WLANModule (build 4) is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() );
+ if (value.isEmpty()){
+ qDebug("value is empty!!!\nreturning");
+ return;
+ }
if ( action.contains("ESSID") ){
QComboBox *combo = wlanconfigWiget->essid;
bool found = false;
for ( int i = 0; i < combo->count(); i++)
if ( combo->text( i ) == value ){
combo->setCurrentItem( i );
found = true;
}
@@ -189,34 +210,43 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
QComboBox *combo = wlanconfigWiget->mode;
for ( int i = 0; i < combo->count(); i++)
if ( combo->text( i ) == value ){
combo->setCurrentItem( i );
}
}else if (action.contains("Channel")){
bool ok;
+ qDebug("converting channel");
int chan = value.toInt( &ok );
if (ok){
+ qDebug("ok setting channel");
wlanconfigWiget->specifyChan->setChecked( true );
wlanconfigWiget->networkChannel->setValue( chan );
}
}else if (action.contains("MacAddr")){
wlanconfigWiget->specifyAp->setChecked( true );
wlanconfigWiget->macEdit->setText( value );
}else
qDebug("wlan plugin has no clue");
}
+ qDebug("next stream");
}// while stream
+ qDebug("end of stream");
if (toShow) toShow->exec();
+ qDebug("returning");
}
QWidget *WLANModule::getInfo( Interface *i)
{
qDebug("WLANModule::getInfo start");
WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose);
InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i);
info->tabWidget->insertTab(information, "TCP/IP", 0);
-
+ info->tabWidget->setCurrentPage( 0 );
+ info->tabWidget->showPage( information );
+ if (info->tabWidget->currentPage() == information ) qDebug("infotab OK");
+ else qDebug("infotab NOT OK");
+ qDebug("current idx %d", info->tabWidget->currentPageIndex());
qDebug("WLANModule::getInfo return");
return info;
}