summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter
authormickeyl <mickeyl>2003-09-26 10:59:31 (UTC)
committer mickeyl <mickeyl>2003-09-26 10:59:31 (UTC)
commita88328daa117bdb3bd72cef6ca6e5e2b9d619a13 (patch) (unidiff)
tree1886fdd9685afd6b5828c78df3255eb3b999142f /noncore/net/wellenreiter
parent0009e5f8bfb3050a7906bf03ce7b9870275496e6 (diff)
downloadopie-a88328daa117bdb3bd72cef6ca6e5e2b9d619a13.zip
opie-a88328daa117bdb3bd72cef6ca6e5e2b9d619a13.tar.gz
opie-a88328daa117bdb3bd72cef6ca6e5e2b9d619a13.tar.bz2
disable screensaver if checked in config
Diffstat (limited to 'noncore/net/wellenreiter') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 5dc2e79..14f251a 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -338,24 +338,33 @@ void Wellenreiter::stopClicked()
338 338
339 logwindow->log( "(i) Stopped Scanning." ); 339 logwindow->log( "(i) Stopped Scanning." );
340 assert( parent() ); 340 assert( parent() );
341 ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" ); 341 ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" );
342 342
343 // message the user 343 // message the user
344 QMessageBox::information( this, "Wellenreiter II", 344 QMessageBox::information( this, "Wellenreiter II",
345 tr( "Your wireless card\nshould now be usable again." ) ); 345 tr( "Your wireless card\nshould now be usable again." ) );
346 346
347 sniffing = false; 347 sniffing = false;
348 emit( stoppedSniffing() ); 348 emit( stoppedSniffing() );
349 349
350 #ifdef QWS
351 if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() )
352 {
353 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable;
354 }
355 #else
356 #warning FIXME: setScreenSaverMode is not operational on the X11 build
357 #endif
358
350 // print out statistics 359 // print out statistics
351 for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it ) 360 for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it )
352 statwindow->updateCounter( it.key(), it.data() ); 361 statwindow->updateCounter( it.key(), it.data() );
353} 362}
354 363
355 364
356void Wellenreiter::startClicked() 365void Wellenreiter::startClicked()
357{ 366{
358 // get configuration from config window 367 // get configuration from config window
359 368
360 const QString& interface = configwindow->interfaceName->currentText(); 369 const QString& interface = configwindow->interfaceName->currentText();
361 const int cardtype = configwindow->driverType(); 370 const int cardtype = configwindow->driverType();
@@ -465,24 +474,34 @@ void Wellenreiter::startClicked()
465 // connect socket notifier and start channel hopper 474 // connect socket notifier and start channel hopper
466 connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); 475 connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) );
467 connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); 476 connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) );
468 } 477 }
469 else 478 else
470 { 479 {
471 // start timer for reading packets 480 // start timer for reading packets
472 startTimer( 100 ); 481 startTimer( 100 );
473 } 482 }
474 483
475 logwindow->log( "(i) Started Scanning." ); 484 logwindow->log( "(i) Started Scanning." );
476 sniffing = true; 485 sniffing = true;
486
487 #ifdef QWS
488 if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() )
489 {
490 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Disable;
491 }
492 #else
493 #warning FIXME: setScreenSaverMode is not operational on the X11 build
494 #endif
495
477 emit( startedSniffing() ); 496 emit( startedSniffing() );
478 if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title 497 if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title
479 else 498 else
480 { 499 {
481 assert( parent() ); 500 assert( parent() );
482 ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) ); 501 ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) );
483 } 502 }
484} 503}
485 504
486 505
487void Wellenreiter::timerEvent( QTimerEvent* ) 506void Wellenreiter::timerEvent( QTimerEvent* )
488{ 507{