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
@@ -187,6 +187,8 @@ void InterfaceSetupImp::setProfile(const QString &profile){
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));
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
@@ -132,9 +132,26 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
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
@@ -175,7 +192,11 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
}
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;
@@ -194,8 +215,10 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
}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 );
}
@@ -205,8 +228,11 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
}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)
@@ -215,7 +241,11 @@ QWidget *WLANModule::getInfo( Interface *i)
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;
}