author | mickeyl <mickeyl> | 2005-04-21 10:21:18 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-04-21 10:21:18 (UTC) |
commit | 945c98bd21a59f18a3ac0cdf330153163861731a (patch) (side-by-side diff) | |
tree | e868fa29ae20923a8567d3e5c2af429e1e8cf937 | |
parent | a5044439757037640435a5800584d408a58c1bba (diff) | |
download | opie-945c98bd21a59f18a3ac0cdf330153163861731a.zip opie-945c98bd21a59f18a3ac0cdf330153163861731a.tar.gz opie-945c98bd21a59f18a3ac0cdf330153163861731a.tar.bz2 |
disable "Rescan Neighbourhood" while scanning
-rw-r--r-- | noncore/settings/networksettings/wlan/wlan.pro | 2 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp2.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/noncore/settings/networksettings/wlan/wlan.pro b/noncore/settings/networksettings/wlan/wlan.pro index e975dde..eb9dd4f 100644 --- a/noncore/settings/networksettings/wlan/wlan.pro +++ b/noncore/settings/networksettings/wlan/wlan.pro @@ -3,17 +3,17 @@ CONFIG += qt plugin warn_on DESTDIR = $(OPIEDIR)/plugins/networksettings HEADERS = infoimp.h wlanmodule.h wextensions.h keyedit.h SOURCES = infoimp.cpp wlanmodule.cpp wextensions.cpp keyedit.cpp INCLUDEPATH += $(OPIEDIR)/include ../ ../interfaces/ DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -L../interfaces/ -linterfaces -lopiecore2 -lopienet2 INTERFACES = wlan.ui info.ui TARGET = wlan -VERSION = 1.0.0 +VERSION = 1.0.1 #CONFIG += wirelessopts wirelessopts { HEADERS += wlanimp.h SOURCES += wlanimp.cpp } 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 @@ -365,17 +365,18 @@ void WLANImp::rescanNeighbourhood() OPacketCapturer* cap = new OPacketCapturer(); cap->open( name ); if ( !cap->isOpen() ) { owarn << "rescanNeighbourhood(): Unable to open libpcap (" << strerror( errno ) << ")." << oendl; return; } - // display splash screen + // disable button and display splash screen + rescanButton->setEnabled( false ); QFrame* splash = new QFrame( this, "splash", false, WStyle_StaysOnTop | WStyle_DialogBorder | WStyle_Customize ); splash->setLineWidth( 2 ); splash->setFrameStyle( QFrame::Panel | QFrame::Raised ); QVBoxLayout* vbox = new QVBoxLayout( splash, 4, 4 ); QLabel* lab = new QLabel( "<center><b>Scanning...</b><br>Please Wait...</center>", splash ); QProgressBar* pb = new QProgressBar( wiface->channels(), splash ); vbox->addWidget( lab ); vbox->addWidget( pb ); @@ -411,19 +412,20 @@ void WLANImp::rescanNeighbourhood() handlePacket( p ); } } cap->close(); wiface->setMode( "managed" ); // TODO: use previous mode wiface->setPromiscuousMode( false ); + // hide splash screen and reenable button splash->hide(); delete splash; - + rescanButton->setEnabled( true ); } void WLANImp::handlePacket( OPacket* p ) { // check if we received a beacon frame OWaveLanManagementPacket* beacon = static_cast<OWaveLanManagementPacket*>( p->child( "802.11 Management" ) ); if ( beacon && beacon->managementType() == "Beacon" ) |