author | sandman <sandman> | 2002-10-02 22:06:33 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-02 22:06:33 (UTC) |
commit | b757807635fddb4824eabd87f72c96a0929c5cb1 (patch) (unidiff) | |
tree | 831e4870fe1562507540b386cbcbd1ea93ecb9a8 /core/launcher/desktop.cpp | |
parent | 2682a282dc87074bdc61d241d5b2d76e8533982c (diff) | |
download | opie-b757807635fddb4824eabd87f72c96a0929c5cb1.zip opie-b757807635fddb4824eabd87f72c96a0929c5cb1.tar.gz opie-b757807635fddb4824eabd87f72c96a0929c5cb1.tar.bz2 |
- Qtopia 1.6 launcher merge (again - should be finished soon)
- Support for O-Menu applets (similiar to Taskbar applets)
-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 | |||
@@ -379,8 +379,11 @@ void DesktopApplication::desktopMessage( const QCString &msg, const QByteArray & | |||
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 | ||
@@ -716,19 +719,24 @@ void Desktop::raiseLauncher() | |||
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() ) { |
@@ -836,8 +844,10 @@ void Desktop::execAutoStart() | |||
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; |