author | harlekin <harlekin> | 2002-03-07 11:05:40 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-03-07 11:05:40 (UTC) |
commit | a2f42b6df21b2e5d52b49376542d0f4c7443a897 (patch) (side-by-side diff) | |
tree | bfbacf25dd213cdb2b7a86a007e4598a1634bb18 /core/launcher/desktop.cpp | |
parent | 09444065297662fca1396abf8c0c9dd00380699f (diff) | |
download | opie-a2f42b6df21b2e5d52b49376542d0f4c7443a897.zip opie-a2f42b6df21b2e5d52b49376542d0f4c7443a897.tar.gz opie-a2f42b6df21b2e5d52b49376542d0f4c7443a897.tar.bz2 |
beginning support for autostart
-rw-r--r-- | core/launcher/desktop.cpp | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index a00fae2..4587ec6 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -54,3 +54,2 @@ - class QCopKeyRegister @@ -499,2 +498,13 @@ void Desktop::raiseEmail() +// autoStarts apps on resume and start +void Desktop::execAutoStart() +{ + QString appName; + Config cfg( "autostart" ); + cfg.setGroup( "AutoStart" ); + appName = cfg.readEntry("Apps", ""); + QCopEnvelope e("QPE/System", "execute(QString)"); + e << QString(appName); +} + #if defined(QPE_HAVE_TOGGLELIGHT) @@ -533,18 +543,22 @@ void Desktop::togglePower() { - bool wasloggedin = loggedin; - loggedin=0; - darkScreen(); - if ( wasloggedin ) - blankScreen(); - system("apm --suspend"); - QWSServer::screenSaverActivate( FALSE ); - { - QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep - QCopEnvelope e("QPE/System", "setBacklight(int)"); - e << -3; // Force on - } - if ( wasloggedin ) - login(TRUE); - //qcopBridge->closeOpenConnections(); - //qDebug("called togglePower()!!!!!!"); + bool wasloggedin = loggedin; + loggedin=0; + darkScreen(); + if ( wasloggedin ) + blankScreen(); + + system("apm --suspend"); + execAutoStart(); + QWSServer::screenSaverActivate( FALSE ); + { + QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep + QCopEnvelope e("QPE/System", "setBacklight(int)"); + e << -3; // Force on + } + if ( wasloggedin ) { + login(TRUE); + } + + //qcopBridge->closeOpenConnections(); + //qDebug("called togglePower()!!!!!!"); } |