author | mickeyl <mickeyl> | 2005-04-21 10:21:18 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-04-21 10:21:18 (UTC) |
commit | 945c98bd21a59f18a3ac0cdf330153163861731a (patch) (unidiff) | |
tree | e868fa29ae20923a8567d3e5c2af429e1e8cf937 /noncore/settings/networksettings/wlan/wlanimp2.cpp | |
parent | a5044439757037640435a5800584d408a58c1bba (diff) | |
download | opie-945c98bd21a59f18a3ac0cdf330153163861731a.zip opie-945c98bd21a59f18a3ac0cdf330153163861731a.tar.gz opie-945c98bd21a59f18a3ac0cdf330153163861731a.tar.bz2 |
disable "Rescan Neighbourhood" while scanning
Diffstat (limited to 'noncore/settings/networksettings/wlan/wlanimp2.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp2.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp index 5cb78cf..11dfe74 100644 --- a/noncore/settings/networksettings/wlan/wlanimp2.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp | |||
@@ -367,13 +367,14 @@ void WLANImp::rescanNeighbourhood() | |||
367 | if ( !cap->isOpen() ) | 367 | if ( !cap->isOpen() ) |
368 | { | 368 | { |
369 | owarn << "rescanNeighbourhood(): Unable to open libpcap (" << strerror( errno ) << ")." << oendl; | 369 | owarn << "rescanNeighbourhood(): Unable to open libpcap (" << strerror( errno ) << ")." << oendl; |
370 | return; | 370 | return; |
371 | } | 371 | } |
372 | 372 | ||
373 | // display splash screen | 373 | // disable button and display splash screen |
374 | rescanButton->setEnabled( false ); | ||
374 | QFrame* splash = new QFrame( this, "splash", false, WStyle_StaysOnTop | WStyle_DialogBorder | WStyle_Customize ); | 375 | QFrame* splash = new QFrame( this, "splash", false, WStyle_StaysOnTop | WStyle_DialogBorder | WStyle_Customize ); |
375 | splash->setLineWidth( 2 ); | 376 | splash->setLineWidth( 2 ); |
376 | splash->setFrameStyle( QFrame::Panel | QFrame::Raised ); | 377 | splash->setFrameStyle( QFrame::Panel | QFrame::Raised ); |
377 | QVBoxLayout* vbox = new QVBoxLayout( splash, 4, 4 ); | 378 | QVBoxLayout* vbox = new QVBoxLayout( splash, 4, 4 ); |
378 | QLabel* lab = new QLabel( "<center><b>Scanning...</b><br>Please Wait...</center>", splash ); | 379 | QLabel* lab = new QLabel( "<center><b>Scanning...</b><br>Please Wait...</center>", splash ); |
379 | QProgressBar* pb = new QProgressBar( wiface->channels(), splash ); | 380 | QProgressBar* pb = new QProgressBar( wiface->channels(), splash ); |
@@ -413,15 +414,16 @@ void WLANImp::rescanNeighbourhood() | |||
413 | } | 414 | } |
414 | 415 | ||
415 | cap->close(); | 416 | cap->close(); |
416 | wiface->setMode( "managed" ); // TODO: use previous mode | 417 | wiface->setMode( "managed" ); // TODO: use previous mode |
417 | wiface->setPromiscuousMode( false ); | 418 | wiface->setPromiscuousMode( false ); |
418 | 419 | ||
420 | // hide splash screen and reenable button | ||
419 | splash->hide(); | 421 | splash->hide(); |
420 | delete splash; | 422 | delete splash; |
421 | 423 | rescanButton->setEnabled( true ); | |
422 | } | 424 | } |
423 | 425 | ||
424 | void WLANImp::handlePacket( OPacket* p ) | 426 | void WLANImp::handlePacket( OPacket* p ) |
425 | { | 427 | { |
426 | 428 | ||
427 | // check if we received a beacon frame | 429 | // check if we received a beacon frame |