author | harlekin <harlekin> | 2002-08-29 13:18:26 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-29 13:18:26 (UTC) |
commit | 4eb76f825e6dd06252316f4fe682d6ec4c7a1a2f (patch) (unidiff) | |
tree | 037a96053aff72cc0e708f80f11570599b28c156 /core/launcher/desktop.cpp | |
parent | 178bd471d12a88862fb4ac1a17842ea0fd63c160 (diff) | |
download | opie-4eb76f825e6dd06252316f4fe682d6ec4c7a1a2f.zip opie-4eb76f825e6dd06252316f4fe682d6ec4c7a1a2f.tar.gz opie-4eb76f825e6dd06252316f4fe682d6ec4c7a1a2f.tar.bz2 |
fixed hardware start keys to be more flexible
-rw-r--r-- | core/launcher/desktop.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 1ec477c..5aba8dd 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp | |||
@@ -486,13 +486,13 @@ void Desktop::executeOrModify(const QString& appLnkFile) | |||
486 | if ( lnk.isValid() ) { | 486 | if ( lnk.isValid() ) { |
487 | QCString app = lnk.exec().utf8(); | 487 | QCString app = lnk.exec().utf8(); |
488 | Global::terminateBuiltin("calibrate"); | 488 | Global::terminateBuiltin("calibrate"); |
489 | if ( QCopChannel::isRegistered("QPE/Application/" + app) ) { | 489 | if ( QCopChannel::isRegistered("QPE/Application/" + app) ) { |
490 | MRUList::addTask(&lnk); | 490 | MRUList::addTask(&lnk); |
491 | if ( hasVisibleWindow(app) ) | 491 | if ( hasVisibleWindow(app) ) |
492 | QCopChannel::send("QPE/Application/" + app, "nextView()"); | 492 | QCopChannel::send("QPE/Application/" + app, "nextView()"); |
493 | else | 493 | else |
494 | QCopChannel::send("QPE/Application/" + app, "raise()"); | 494 | QCopChannel::send("QPE/Application/" + app, "raise()"); |
495 | } else { | 495 | } else { |
496 | lnk.execute(); | 496 | lnk.execute(); |
497 | } | 497 | } |
498 | } | 498 | } |
@@ -502,11 +502,11 @@ void Desktop::raiseDatebook() | |||
502 | { | 502 | { |
503 | Config cfg("qpe"); //F9 'Activity' | 503 | Config cfg( "qpe" ); //F9 'Activity' |
504 | cfg.setGroup("AppsKey"); | 504 | cfg.setGroup( "AppsKey" ); |
505 | QString tempItem; | 505 | QString tempItem; |
506 | tempItem = cfg.readEntry("LeftEnd","Calender"); | 506 | tempItem = cfg.readEntry( "LeftEnd" , "Calender" ); |
507 | if(tempItem == "Calender" || tempItem.isEmpty()) executeOrModify("Applications/datebook.desktop"); | 507 | if ( tempItem == "Calender" || tempItem.isEmpty() ) { |
508 | else { | 508 | tempItem = "datebook"; |
509 | QCopEnvelope e("QPE/System","execute(QString)"); | ||
510 | e << tempItem; | ||
511 | } | 509 | } |
510 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | ||
511 | e << tempItem; | ||
512 | } | 512 | } |
@@ -515,11 +515,11 @@ void Desktop::raiseContacts() | |||
515 | { | 515 | { |
516 | Config cfg("qpe"); //F10, 'Contacts' | 516 | Config cfg( "qpe" ); //F10, 'Contacts' |
517 | cfg.setGroup("AppsKey"); | 517 | cfg.setGroup( "AppsKey" ); |
518 | QString tempItem; | 518 | QString tempItem; |
519 | tempItem = cfg.readEntry("Left2nd","Address Book"); | 519 | tempItem = cfg.readEntry( "Left2nd", "Address Book" ); |
520 | if(tempItem == "Address Book" || tempItem.isEmpty()) executeOrModify("Applications/addressbook.desktop"); | 520 | if ( tempItem == "Address Book" || tempItem.isEmpty() ) { |
521 | else { | 521 | tempItem = "addressbook"; |
522 | QCopEnvelope e("QPE/System","execute(QString)"); | ||
523 | e << tempItem; | ||
524 | } | 522 | } |
523 | QCopEnvelope e("QPE/System","execute(QString)"); | ||
524 | e << tempItem; | ||
525 | } | 525 | } |
@@ -528,9 +528,9 @@ void Desktop::raiseMenu() | |||
528 | { | 528 | { |
529 | Config cfg("qpe"); //F11, 'Menu' | 529 | Config cfg( "qpe" ); //F11, 'Menu |
530 | cfg.setGroup("AppsKey"); | 530 | cfg.setGroup( "AppsKey" ); |
531 | QString tempItem; | 531 | QString tempItem; |
532 | tempItem = cfg.readEntry("Right2nd","Popup Menu"); | 532 | tempItem = cfg.readEntry( "Right2nd" , "Popup Menu" ); |
533 | if(tempItem == "Popup Menu" || tempItem.isEmpty()) { | 533 | if ( tempItem == "Popup Menu" || tempItem.isEmpty() ) { |
534 | Global::terminateBuiltin("calibrate"); | 534 | Global::terminateBuiltin("calibrate"); |
535 | tb->startMenu()->launch(); | 535 | tb->startMenu()->launch(); |
536 | } else { | 536 | } else { |
@@ -543,11 +543,11 @@ void Desktop::raiseEmail() | |||
543 | { | 543 | { |
544 | Config cfg("qpe"); //F13, 'Mail' | 544 | Config cfg( "qpe" ); //F13, 'Mail' |
545 | cfg.setGroup("AppsKey"); | 545 | cfg.setGroup( "AppsKey" ); |
546 | QString tempItem; | 546 | QString tempItem; |
547 | tempItem = cfg.readEntry("RightEnd","Mail"); | 547 | tempItem = cfg.readEntry( "RightEnd", "Mail" ); |
548 | if(tempItem == "Mail" || tempItem == "qtmail" || tempItem.isEmpty()) executeOrModify("Applications/qtmail.desktop"); | 548 | if ( tempItem == "Mail" || tempItem == "qtmail" || tempItem.isEmpty() ) { |
549 | else { | 549 | tempItem = "mail"; |
550 | QCopEnvelope e("QPE/System","execute(QString)"); | ||
551 | e << tempItem; | ||
552 | } | 550 | } |
551 | QCopEnvelope e("QPE/System","execute(QString)"); | ||
552 | e << tempItem; | ||
553 | } | 553 | } |