summaryrefslogtreecommitdiff
path: root/core/launcher/desktop.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/desktop.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp18
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();