summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/desktop.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 8756d37..bf19280 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -441,130 +441,130 @@ void Desktop::checkMemory()
}
static bool isVisibleWindow(int wid)
{
const QList<QWSWindow> &list = qwsServer->clientWindows();
QWSWindow* w;
for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) {
if ( w->winId() == wid )
return !w->isFullyObscured();
}
return FALSE;
}
static bool hasVisibleWindow(const QString& clientname)
{
const QList<QWSWindow> &list = qwsServer->clientWindows();
QWSWindow* w;
for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) {
if ( w->client()->identity() == clientname && !w->isFullyObscured() )
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();
} else {
QCopEnvelope e("QPE/System","execute(QString)");
e << tempItem;
}
}
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()");
} else {
lnk.execute();
}
}
}
void Desktop::raiseDatebook()
{
Config cfg( "qpe" ); //F9 'Activity'
cfg.setGroup( "AppsKey" );
QString tempItem;
- tempItem = cfg.readEntry( "LeftEnd" , "Calender" );
- if ( tempItem == "Calender" || tempItem.isEmpty() ) {
+ tempItem = cfg.readEntry( "LeftEnd" , "Calendar" );
+ if ( tempItem == "Calendar" || tempItem.isEmpty() ) {
tempItem = "datebook";
}
QCopEnvelope e( "QPE/System", "execute(QString)" );
e << tempItem;
}
void Desktop::raiseContacts()
{
Config cfg( "qpe" ); //F10, 'Contacts'
cfg.setGroup( "AppsKey" );
QString tempItem;
tempItem = cfg.readEntry( "Left2nd", "Address Book" );
if ( tempItem == "Address Book" || tempItem.isEmpty() ) {
tempItem = "addressbook";
}
QCopEnvelope e("QPE/System","execute(QString)");
e << tempItem;
}
void Desktop::raiseMenu()
{
Config cfg( "qpe" ); //F11, 'Menu
cfg.setGroup( "AppsKey" );
QString tempItem;
tempItem = cfg.readEntry( "Right2nd" , "Popup Menu" );
if ( tempItem == "Popup Menu" || tempItem.isEmpty() ) {
Global::terminateBuiltin( "calibrate" );
tb->startMenu()->launch();
} else {
QCopEnvelope e("QPE/System","execute(QString)");
e << tempItem;
}
}
void Desktop::raiseEmail()
{
Config cfg( "qpe" ); //F13, 'Mail' // only in zaurus, on ipaq mail key is F11
cfg.setGroup( "AppsKey" );
QString tempItem;
tempItem = cfg.readEntry( "RightEnd", "Mail" );
if ( tempItem == "Mail" || tempItem == "qtmail" || tempItem.isEmpty() ) {
tempItem = "mail";
}
QCopEnvelope e("QPE/System","execute(QString)");
e << tempItem;
}
// autoStarts apps on resume and start
void Desktop::execAutoStart()
{
QString appName;
int delay;
QDateTime now = QDateTime::currentDateTime();
Config cfg( "autostart" );
cfg.setGroup( "AutoStart" );
appName = cfg.readEntry( "Apps", "" );
delay = ( cfg.readEntry( "Delay", "0" ) ).toInt();
// If the time between suspend and resume was longer then the
// value saved as delay, start the app
if ( suspendTime.secsTo( now ) >= ( delay * 60 ) && !appName.isEmpty() ) {
QCopEnvelope e( "QPE/System", "execute(QString)" );
e << QString( appName );
}
}