-rw-r--r-- | core/launcher/desktop.cpp | 18 |
1 files changed, 16 insertions, 2 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 | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <stdlib.h> | 52 | #include <stdlib.h> |
53 | #include <unistd.h> | 53 | #include <unistd.h> |
54 | 54 | ||
55 | |||
56 | class QCopKeyRegister | 55 | class QCopKeyRegister |
57 | { | 56 | { |
58 | public: | 57 | public: |
@@ -497,6 +496,17 @@ void Desktop::raiseEmail() | |||
497 | executeOrModify("Applications/qtmail.desktop"); | 496 | executeOrModify("Applications/qtmail.desktop"); |
498 | } | 497 | } |
499 | 498 | ||
499 | // autoStarts apps on resume and start | ||
500 | void Desktop::execAutoStart() | ||
501 | { | ||
502 | QString appName; | ||
503 | Config cfg( "autostart" ); | ||
504 | cfg.setGroup( "AutoStart" ); | ||
505 | appName = cfg.readEntry("Apps", ""); | ||
506 | QCopEnvelope e("QPE/System", "execute(QString)"); | ||
507 | e << QString(appName); | ||
508 | } | ||
509 | |||
500 | #if defined(QPE_HAVE_TOGGLELIGHT) | 510 | #if defined(QPE_HAVE_TOGGLELIGHT) |
501 | #include <qpe/config.h> | 511 | #include <qpe/config.h> |
502 | 512 | ||
@@ -536,15 +546,19 @@ void Desktop::togglePower() | |||
536 | darkScreen(); | 546 | darkScreen(); |
537 | if ( wasloggedin ) | 547 | if ( wasloggedin ) |
538 | blankScreen(); | 548 | blankScreen(); |
549 | |||
539 | system("apm --suspend"); | 550 | system("apm --suspend"); |
551 | execAutoStart(); | ||
540 | QWSServer::screenSaverActivate( FALSE ); | 552 | QWSServer::screenSaverActivate( FALSE ); |
541 | { | 553 | { |
542 | QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep | 554 | QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep |
543 | QCopEnvelope e("QPE/System", "setBacklight(int)"); | 555 | QCopEnvelope e("QPE/System", "setBacklight(int)"); |
544 | e << -3; // Force on | 556 | e << -3; // Force on |
545 | } | 557 | } |
546 | if ( wasloggedin ) | 558 | if ( wasloggedin ) { |
547 | login(TRUE); | 559 | login(TRUE); |
560 | } | ||
561 | |||
548 | //qcopBridge->closeOpenConnections(); | 562 | //qcopBridge->closeOpenConnections(); |
549 | //qDebug("called togglePower()!!!!!!"); | 563 | //qDebug("called togglePower()!!!!!!"); |
550 | } | 564 | } |