summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-09-26 10:59:31 (UTC)
committer mickeyl <mickeyl>2003-09-26 10:59:31 (UTC)
commita88328daa117bdb3bd72cef6ca6e5e2b9d619a13 (patch) (side-by-side diff)
tree1886fdd9685afd6b5828c78df3255eb3b999142f
parent0009e5f8bfb3050a7906bf03ce7b9870275496e6 (diff)
downloadopie-a88328daa117bdb3bd72cef6ca6e5e2b9d619a13.zip
opie-a88328daa117bdb3bd72cef6ca6e5e2b9d619a13.tar.gz
opie-a88328daa117bdb3bd72cef6ca6e5e2b9d619a13.tar.bz2
disable screensaver if checked in config
Diffstat (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()
logwindow->log( "(i) Stopped Scanning." );
assert( parent() );
( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" );
// message the user
QMessageBox::information( this, "Wellenreiter II",
tr( "Your wireless card\nshould now be usable again." ) );
sniffing = false;
emit( stoppedSniffing() );
+ #ifdef QWS
+ if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() )
+ {
+ QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable;
+ }
+ #else
+ #warning FIXME: setScreenSaverMode is not operational on the X11 build
+ #endif
+
// print out statistics
for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it )
statwindow->updateCounter( it.key(), it.data() );
}
void Wellenreiter::startClicked()
{
// get configuration from config window
const QString& interface = configwindow->interfaceName->currentText();
const int cardtype = configwindow->driverType();
@@ -465,24 +474,34 @@ void Wellenreiter::startClicked()
// connect socket notifier and start channel hopper
connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) );
connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) );
}
else
{
// start timer for reading packets
startTimer( 100 );
}
logwindow->log( "(i) Started Scanning." );
sniffing = true;
+
+ #ifdef QWS
+ if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() )
+ {
+ QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Disable;
+ }
+ #else
+ #warning FIXME: setScreenSaverMode is not operational on the X11 build
+ #endif
+
emit( startedSniffing() );
if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title
else
{
assert( parent() );
( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) );
}
}
void Wellenreiter::timerEvent( QTimerEvent* )
{