summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/desktop.cpp48
1 files changed, 45 insertions, 3 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 64043e7..cf33011 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -459,10 +459,19 @@ static bool hasVisibleWindow(const QString& clientname)
459 459
460void Desktop::raiseLauncher() 460void Desktop::raiseLauncher()
461{ 461{
462 Config cfg("qpe"); //F12 'Home'
463 cfg.setGroup("AppsKey");
464 QString tempItem;
465 tempItem = cfg.readEntry("Middle","Home");
466 if(tempItem == "Home" || tempItem.isEmpty()) {
462 if ( isVisibleWindow(launcher->winId()) ) 467 if ( isVisibleWindow(launcher->winId()) )
463 launcher->nextView(); 468 launcher->nextView();
464 else 469 else
465 launcher->raise(); 470 launcher->raise();
471 } else {
472 QCopEnvelope e("QPE/System","execute(QString)");
473 e << tempItem;
474 }
466} 475}
467 476
468void Desktop::executeOrModify(const QString& appLnkFile) 477void Desktop::executeOrModify(const QString& appLnkFile)
@@ -485,23 +494,56 @@ void Desktop::executeOrModify(const QString& appLnkFile)
485 494
486void Desktop::raiseDatebook() 495void Desktop::raiseDatebook()
487{ 496{
488 executeOrModify("Applications/datebook.desktop"); 497 Config cfg("qpe"); //F9 'Activity'
498 cfg.setGroup("AppsKey");
499 QString tempItem;
500 tempItem = cfg.readEntry("LeftEnd","Calender");
501 if(tempItem == "Calender" || tempItem.isEmpty()) executeOrModify("Applications/datebook.desktop");
502 else {
503 QCopEnvelope e("QPE/System","execute(QString)");
504 e << tempItem;
505 }
489} 506}
490 507
491void Desktop::raiseContacts() 508void Desktop::raiseContacts()
492{ 509{
493 executeOrModify("Applications/addressbook.desktop"); 510 Config cfg("qpe"); //F10, 'Contacts'
511 cfg.setGroup("AppsKey");
512 QString tempItem;
513 tempItem = cfg.readEntry("Left2nd","Address Book");
514 if(tempItem == "Address Book" || tempItem.isEmpty()) executeOrModify("Applications/addressbook.desktop");
515 else {
516 QCopEnvelope e("QPE/System","execute(QString)");
517 e << tempItem;
518 }
494} 519}
495 520
496void Desktop::raiseMenu() 521void Desktop::raiseMenu()
497{ 522{
523 Config cfg("qpe"); //F11, 'Menu'
524 cfg.setGroup("AppsKey");
525 QString tempItem;
526 tempItem = cfg.readEntry("Right2nd","Popup Menu");
527 if(tempItem == "Popup Menu" || tempItem.isEmpty()) {
498 Global::terminateBuiltin("calibrate"); 528 Global::terminateBuiltin("calibrate");
499 tb->startMenu()->launch(); 529 tb->startMenu()->launch();
530 } else {
531 QCopEnvelope e("QPE/System","execute(QString)");
532 e << tempItem;
533 }
500} 534}
501 535
502void Desktop::raiseEmail() 536void Desktop::raiseEmail()
503{ 537{
504 executeOrModify("Applications/qtmail.desktop"); 538 Config cfg("qpe"); //F13, 'Mail'
539 cfg.setGroup("AppsKey");
540 QString tempItem;
541 tempItem = cfg.readEntry("RightEnd","Mail");
542 if(tempItem == "Mail" || tempItem == "qtmail" || tempItem.isEmpty()) executeOrModify("Applications/qtmail.desktop");
543 else {
544 QCopEnvelope e("QPE/System","execute(QString)");
545 e << tempItem;
546 }
505} 547}
506 548
507// autoStarts apps on resume and start 549// autoStarts apps on resume and start