-rw-r--r-- | core/launcher/desktop.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 68949e6..1a33b36 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp | |||
@@ -377,12 +377,15 @@ void DesktopApplication::desktopMessage( const QCString &msg, const QByteArray & | |||
377 | qWarning( "KeyRegisterReceived: %i, %s, %s", k, ( const char* ) c, ( const char * ) m ); | 377 | qWarning( "KeyRegisterReceived: %i, %s, %s", k, ( const char* ) c, ( const char * ) m ); |
378 | keyRegisterList.append( QCopKeyRegister( k, c, m ) ); | 378 | keyRegisterList.append( QCopKeyRegister( k, c, m ) ); |
379 | } | 379 | } |
380 | else if ( msg == "suspend()" ) { | 380 | else if ( msg == "suspend()" ) { |
381 | emit power(); | 381 | emit power(); |
382 | } | 382 | } |
383 | else if ( msg == "home()" ) { | ||
384 | qpedesktop-> home ( ); | ||
385 | } | ||
383 | #endif | 386 | #endif |
384 | } | 387 | } |
385 | 388 | ||
386 | 389 | ||
387 | void DesktopApplication::systemMessage( const QCString & msg, const QByteArray & data ) | 390 | void DesktopApplication::systemMessage( const QCString & msg, const QByteArray & data ) |
388 | { | 391 | { |
@@ -714,23 +717,28 @@ void Desktop::raiseLauncher() | |||
714 | { | 717 | { |
715 | Config cfg( "qpe" ); //F12 'Home' | 718 | Config cfg( "qpe" ); //F12 'Home' |
716 | cfg.setGroup( "AppsKey" ); | 719 | cfg.setGroup( "AppsKey" ); |
717 | QString tempItem; | 720 | QString tempItem; |
718 | tempItem = cfg.readEntry( "Middle", "Home" ); | 721 | tempItem = cfg.readEntry( "Middle", "Home" ); |
719 | if ( tempItem == "Home" || tempItem.isEmpty() ) { | 722 | if ( tempItem == "Home" || tempItem.isEmpty() ) { |
720 | if ( isVisibleWindow( launcher->winId() ) ) | 723 | home ( ); |
721 | launcher->nextView(); | ||
722 | else | ||
723 | launcher->raise(); | ||
724 | } | 724 | } |
725 | else { | 725 | else { |
726 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | 726 | QCopEnvelope e( "QPE/System", "execute(QString)" ); |
727 | e << tempItem; | 727 | e << tempItem; |
728 | } | 728 | } |
729 | } | 729 | } |
730 | 730 | ||
731 | void Desktop::home ( ) | ||
732 | { | ||
733 | if ( isVisibleWindow( launcher->winId() ) ) | ||
734 | launcher->nextView(); | ||
735 | else | ||
736 | launcher->raise(); | ||
737 | } | ||
738 | |||
731 | void Desktop::executeOrModify( const QString& appLnkFile ) | 739 | void Desktop::executeOrModify( const QString& appLnkFile ) |
732 | { | 740 | { |
733 | AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile ); | 741 | AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile ); |
734 | if ( lnk.isValid() ) { | 742 | if ( lnk.isValid() ) { |
735 | QCString app = lnk.exec().utf8(); | 743 | QCString app = lnk.exec().utf8(); |
736 | Global::terminateBuiltin( "calibrate" ); | 744 | Global::terminateBuiltin( "calibrate" ); |
@@ -834,12 +842,14 @@ void Desktop::execAutoStart() | |||
834 | 842 | ||
835 | 843 | ||
836 | void Desktop::togglePower() | 844 | void Desktop::togglePower() |
837 | { | 845 | { |
838 | static bool excllock = false; | 846 | static bool excllock = false; |
839 | 847 | ||
848 | qDebug ( "togglePower (locked == %d)", excllock ? 1 : 0 ); | ||
849 | |||
840 | if ( excllock ) | 850 | if ( excllock ) |
841 | return ; | 851 | return ; |
842 | 852 | ||
843 | excllock = true; | 853 | excllock = true; |
844 | 854 | ||
845 | bool wasloggedin = loggedin; | 855 | bool wasloggedin = loggedin; |