summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-08-27 21:11:47 (UTC)
committer harlekin <harlekin>2002-08-27 21:11:47 (UTC)
commita6432554a1e64d54c53c1400aa1dfa11ae83f11a (patch) (unidiff)
treebaae8b562962d952904e07a5b2317041a9e37ede
parent86352e32f449ecf00de254674b7dcac72bc34a14 (diff)
downloadopie-a6432554a1e64d54c53c1400aa1dfa11ae83f11a.zip
opie-a6432554a1e64d54c53c1400aa1dfa11ae83f11a.tar.gz
opie-a6432554a1e64d54c53c1400aa1dfa11ae83f11a.tar.bz2
small fix for autostart
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp35
1 files changed, 17 insertions, 18 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 552c7c3..fb10602 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -201,7 +201,7 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
201 will not send multiple repeats if user holds key 201 will not send multiple repeats if user holds key
202 i.e. one shot 202 i.e. one shot
203 203
204 */ 204 */
205 if (!keyRegisterList.isEmpty()) { 205 if (!keyRegisterList.isEmpty()) {
206 KeyRegisterList::Iterator it; 206 KeyRegisterList::Iterator it;
207 for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) { 207 for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) {
@@ -251,5 +251,5 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
251 return TRUE; 251 return TRUE;
252 } 252 }
253// This was used for the iPAQ PowerButton 253// This was used for the iPAQ PowerButton
254// See main.cpp for new KeyboardFilter 254// See main.cpp for new KeyboardFilter
255// 255//
@@ -560,13 +560,12 @@ void Desktop::execAutoStart() {
560 Config cfg( "autostart" ); 560 Config cfg( "autostart" );
561 cfg.setGroup( "AutoStart" ); 561 cfg.setGroup( "AutoStart" );
562 appName = cfg.readEntry("Apps", ""); 562 appName = cfg.readEntry( "Apps", "" );
563 delay = (cfg.readEntry("Delay", "0" )).toInt(); 563 delay = ( cfg.readEntry( "Delay", "0" ) ).toInt();
564 // If the time between suspend and resume was longer then the 564 // If the time between suspend and resume was longer then the
565 // value saved as delay, start the app 565 // value saved as delay, start the app
566 if ( suspendTime.secsTo(now) >= (delay*60) ) { 566 if ( suspendTime.secsTo( now ) >= ( delay * 60 ) && !appName.isEmpty() ) {
567 QCopEnvelope e("QPE/System", "execute(QString)"); 567 QCopEnvelope e( "QPE/System", "execute(QString)" );
568 e << QString(appName); 568 e << QString( appName );
569 } //else { 569 }
570 //}
571} 570}
572 571
@@ -608,8 +607,8 @@ void Desktop::togglePower()
608 607
609 static bool excllock = false; 608 static bool excllock = false;
610 609
611 if ( excllock ) 610 if ( excllock )
612 return; 611 return;
613 612
614 excllock = true; 613 excllock = true;
615 614
@@ -639,7 +638,7 @@ void Desktop::togglePower()
639 //qcopBridge->closeOpenConnections(); 638 //qcopBridge->closeOpenConnections();
640 //qDebug("called togglePower()!!!!!!"); 639 //qDebug("called togglePower()!!!!!!");
641 640
642 qApp-> processEvents ( ); 641 qApp-> processEvents ( );
643 642
644 excllock = false; 643 excllock = false;
645} 644}
@@ -701,10 +700,10 @@ void DesktopApplication::shutdown( ShutdownImpl::Type t )
701 case ShutdownImpl::TerminateDesktop: 700 case ShutdownImpl::TerminateDesktop:
702 prepareForTermination(FALSE); 701 prepareForTermination(FALSE);
703 702
704 // This is a workaround for a Qt bug 703 // This is a workaround for a Qt bug
705 // clipboard applet has to stop its poll timer, or Qt/E 704 // clipboard applet has to stop its poll timer, or Qt/E
706 // will hang on quit() right before it emits aboutToQuit() 705 // will hang on quit() right before it emits aboutToQuit()
707 emit aboutToQuit ( ); 706 emit aboutToQuit ( );
708 707
709 quit(); 708 quit();
710 break; 709 break;
@@ -799,5 +798,5 @@ bool Desktop::eventFilter( QObject *, QEvent *ev )
799 if ( ke-> key ( ) == Qt::Key_F11 ) { // menu key 798 if ( ke-> key ( ) == Qt::Key_F11 ) { // menu key
800 QWidget *active = qApp-> activeWindow ( ); 799 QWidget *active = qApp-> activeWindow ( );
801 800
802 if ( active && active-> isPopup ( )) 801 if ( active && active-> isPopup ( ))
803 active->close(); 802 active->close();