author | mickeyl <mickeyl> | 2003-06-16 17:23:39 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-06-16 17:23:39 (UTC) |
commit | 9574bc74f6240a060f941ef65028a51e8969fe06 (patch) (unidiff) | |
tree | d2f64e32e1c520f5d15769a364805c70bdd32d75 /noncore/net/wellenreiter/gui/wellenreiter.cpp | |
parent | 020c6d76b3faad399164ba196c51804221a259e1 (diff) | |
download | opie-9574bc74f6240a060f941ef65028a51e8969fe06.zip opie-9574bc74f6240a060f941ef65028a51e8969fe06.tar.gz opie-9574bc74f6240a060f941ef65028a51e8969fe06.tar.bz2 |
sanity check and providing the interface for the qcop call
tille: we no longer match the qcop-signature - is this a problem?
Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 448b52b..79734a2 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -489,3 +489,3 @@ void Wellenreiter::doAction( const QString& action, const QString& protocol, OPa | |||
489 | else if ( action == "MessageBox" ) | 489 | else if ( action == "MessageBox" ) |
490 | QMessageBox::information ( this, "Notification!", | 490 | QMessageBox::information( this, "Notification!", |
491 | QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); | 491 | QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); |
@@ -495,5 +495,16 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch | |||
495 | { | 495 | { |
496 | // we need the interface too: | 496 | if ( !iface ) |
497 | const QString iface = "wlan0"; | 497 | { |
498 | qDebug( "joinNetwork() - %s, %s, %d, %s", | 498 | QMessageBox::warning( this, tr( "Can't do that!" ), tr( "No wireless\ninterface available." ) ); |
499 | return; | ||
500 | } | ||
501 | |||
502 | if ( sniffing ) | ||
503 | { | ||
504 | QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Stop sniffing before\njoining a net." ) ); | ||
505 | return; | ||
506 | } | ||
507 | |||
508 | qDebug( "joinNetwork() with Interface %s: %s, %s, %d, %s", | ||
509 | (const char*) iface->name(), | ||
499 | (const char*) type, | 510 | (const char*) type, |
@@ -503,9 +514,7 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch | |||
503 | 514 | ||
504 | // TODO: Stop scanning here | ||
505 | |||
506 | QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); | 515 | QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); |
507 | msg << iface << QString("Mode") << type; | 516 | msg << iface->name() << QString("Mode") << type; |
508 | msg << iface << QString("ESSID") << essid; | 517 | msg << iface->name() << QString("ESSID") << essid; |
509 | msg << iface << QString("Channel") << channel; | 518 | msg << iface->name() << QString("Channel") << channel; |
510 | msg << iface << QString("MacAddr") << macaddr; | 519 | msg << iface->name() << QString("MacAddr") << macaddr; |
511 | 520 | ||