author | sandman <sandman> | 2002-10-02 22:06:33 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-02 22:06:33 (UTC) |
commit | b757807635fddb4824eabd87f72c96a0929c5cb1 (patch) (side-by-side diff) | |
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 @@ -375,16 +375,19 @@ void DesktopApplication::desktopMessage( const QCString &msg, const QByteArray & stream >> m; qWarning( "KeyRegisterReceived: %i, %s, %s", k, ( const char* ) c, ( const char * ) m ); keyRegisterList.append( QCopKeyRegister( k, c, m ) ); } else if ( msg == "suspend()" ) { emit power(); } + else if ( msg == "home()" ) { + qpedesktop-> home ( ); + } #endif } void DesktopApplication::systemMessage( const QCString & msg, const QByteArray & data ) { #ifdef Q_WS_QWS QDataStream stream ( data, IO_ReadOnly ); @@ -712,27 +715,32 @@ static bool hasVisibleWindow( const QString& clientname ) void Desktop::raiseLauncher() { Config cfg( "qpe" ); //F12 'Home' cfg.setGroup( "AppsKey" ); QString tempItem; tempItem = cfg.readEntry( "Middle", "Home" ); if ( tempItem == "Home" || tempItem.isEmpty() ) { - if ( isVisibleWindow( launcher->winId() ) ) - launcher->nextView(); - else - launcher->raise(); + home ( ); } else { QCopEnvelope e( "QPE/System", "execute(QString)" ); e << tempItem; } } +void Desktop::home ( ) +{ + if ( isVisibleWindow( launcher->winId() ) ) + launcher->nextView(); + else + launcher->raise(); +} + void Desktop::executeOrModify( const QString& appLnkFile ) { AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile ); if ( lnk.isValid() ) { QCString app = lnk.exec().utf8(); Global::terminateBuiltin( "calibrate" ); if ( QCopChannel::isRegistered( "QPE/Application/" + app ) ) { // MRUList::addTask( &lnk ); @@ -832,16 +840,18 @@ void Desktop::execAutoStart() #include <time.h> #endif void Desktop::togglePower() { static bool excllock = false; + qDebug ( "togglePower (locked == %d)", excllock ? 1 : 0 ); + if ( excllock ) return ; excllock = true; bool wasloggedin = loggedin; loggedin = 0; suspendTime = QDateTime::currentDateTime(); |