author | llornkcor <llornkcor> | 2002-04-04 02:55:56 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-04 02:55:56 (UTC) |
commit | 431ff3f7fd9996236c6d82a3644b3915bd4c7b38 (patch) (unidiff) | |
tree | 693e873c51efc5c43cfa7ebd5dd0755fb254500a /core | |
parent | e18dab7b6b00ad3ba8117666998de6db52257bdb (diff) | |
download | opie-431ff3f7fd9996236c6d82a3644b3915bd4c7b38.zip opie-431ff3f7fd9996236c6d82a3644b3915bd4c7b38.tar.gz opie-431ff3f7fd9996236c6d82a3644b3915bd4c7b38.tar.bz2 |
added support for configuring with AppKeys, F9 - F13 (Zaurus' cover buttons)
-rw-r--r-- | core/launcher/desktop.cpp | 48 |
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 | |||
@@ -461,2 +461,7 @@ void 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()) ) |
@@ -465,2 +470,6 @@ void Desktop::raiseLauncher() | |||
465 | launcher->raise(); | 470 | launcher->raise(); |
471 | } else { | ||
472 | QCopEnvelope e("QPE/System","execute(QString)"); | ||
473 | e << tempItem; | ||
474 | } | ||
466 | } | 475 | } |
@@ -487,3 +496,11 @@ void 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 | } |
@@ -492,3 +509,11 @@ void 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 | } |
@@ -497,4 +522,13 @@ void 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 | } |
@@ -503,3 +537,11 @@ void 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 | } |