summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp76
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
@@ -471,98 +471,98 @@ void Desktop::raiseLauncher()
471 tempItem = cfg.readEntry("Middle","Home"); 471 tempItem = cfg.readEntry("Middle","Home");
472 if(tempItem == "Home" || tempItem.isEmpty()) { 472 if(tempItem == "Home" || tempItem.isEmpty()) {
473 if ( isVisibleWindow(launcher->winId()) ) 473 if ( isVisibleWindow(launcher->winId()) )
474 launcher->nextView(); 474 launcher->nextView();
475 else 475 else
476 launcher->raise(); 476 launcher->raise();
477 } else { 477 } else {
478 QCopEnvelope e("QPE/System","execute(QString)"); 478 QCopEnvelope e("QPE/System","execute(QString)");
479 e << tempItem; 479 e << tempItem;
480 } 480 }
481} 481}
482 482
483void Desktop::executeOrModify(const QString& appLnkFile) 483void Desktop::executeOrModify(const QString& appLnkFile)
484{ 484{
485 AppLnk lnk(MimeType::appsFolderName() + "/" + appLnkFile); 485 AppLnk lnk(MimeType::appsFolderName() + "/" + 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 }
499} 499}
500 500
501void Desktop::raiseDatebook() 501void 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}
513 513
514void Desktop::raiseContacts() 514void 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}
526 526
527void Desktop::raiseMenu() 527void 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 {
537 QCopEnvelope e("QPE/System","execute(QString)"); 537 QCopEnvelope e("QPE/System","execute(QString)");
538 e << tempItem; 538 e << tempItem;
539 } 539 }
540} 540}
541 541
542void Desktop::raiseEmail() 542void 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}
554 554
555// autoStarts apps on resume and start 555// autoStarts apps on resume and start
556void Desktop::execAutoStart() { 556void Desktop::execAutoStart() {
557 QString appName; 557 QString appName;
558 int delay; 558 int delay;
559 QDateTime now = QDateTime::currentDateTime(); 559 QDateTime now = QDateTime::currentDateTime();
560 Config cfg( "autostart" ); 560 Config cfg( "autostart" );
561 cfg.setGroup( "AutoStart" ); 561 cfg.setGroup( "AutoStart" );
562 appName = cfg.readEntry( "Apps", "" ); 562 appName = cfg.readEntry( "Apps", "" );
563 delay = ( cfg.readEntry( "Delay", "0" ) ).toInt(); 563 delay = ( cfg.readEntry( "Delay", "0" ) ).toInt();
564 // If the time between suspend and resume was longer then the 564 // If the time between suspend and resume was longer then the
565 // value saved as delay, start the app 565 // value saved as delay, start the app
566 if ( suspendTime.secsTo( now ) >= ( delay * 60 ) && !appName.isEmpty() ) { 566 if ( suspendTime.secsTo( now ) >= ( delay * 60 ) && !appName.isEmpty() ) {
567 QCopEnvelope e( "QPE/System", "execute(QString)" ); 567 QCopEnvelope e( "QPE/System", "execute(QString)" );
568 e << QString( appName ); 568 e << QString( appName );