summaryrefslogtreecommitdiff
path: root/core/launcher/desktop.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/desktop.cpp') (more/less context) (show 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
@@ -371,24 +371,27 @@ void DesktopApplication::desktopMessage( const QCString &msg, const QByteArray &
int k;
QString c, m;
stream >> k;
stream >> c;
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 );
if ( msg == "setScreenSaverInterval(int)" ) {
int time;
stream >> time;
@@ -708,35 +711,40 @@ static bool hasVisibleWindow( const QString& clientname )
return TRUE;
}
return FALSE;
}
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 );
if ( hasVisibleWindow( app ) )
QCopChannel::send( "QPE/Application/" + app, "nextView()" );
else
QCopChannel::send( "QPE/Application/" + app, "raise()" );
@@ -828,24 +836,26 @@ void Desktop::execAutoStart()
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <linux/ioctl.h>
#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();
ODevice::inst ( ) -> suspend ( );
QWSServer::screenSaverActivate ( false );