-rw-r--r-- | core/launcher/desktop.cpp | 48 |
1 files changed, 24 insertions, 24 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 | |||
@@ -481,50 +481,50 @@ void Desktop::raiseLauncher() | |||
481 | 481 | ||
482 | void Desktop::executeOrModify(const QString& appLnkFile) | 482 | void Desktop::executeOrModify(const QString& appLnkFile) |
483 | { | 483 | { |
484 | AppLnk lnk(MimeType::appsFolderName() + "/" + appLnkFile); | 484 | AppLnk lnk(MimeType::appsFolderName() + "/" + appLnkFile); |
485 | if ( lnk.isValid() ) { | 485 | if ( lnk.isValid() ) { |
486 | QCString app = lnk.exec().utf8(); | 486 | QCString app = lnk.exec().utf8(); |
487 | Global::terminateBuiltin("calibrate"); | 487 | Global::terminateBuiltin("calibrate"); |
488 | if ( QCopChannel::isRegistered("QPE/Application/" + app) ) { | 488 | if ( QCopChannel::isRegistered("QPE/Application/" + app) ) { |
489 | MRUList::addTask(&lnk); | 489 | MRUList::addTask(&lnk); |
490 | if ( hasVisibleWindow(app) ) | 490 | if ( hasVisibleWindow(app) ) |
491 | QCopChannel::send("QPE/Application/" + app, "nextView()"); | 491 | QCopChannel::send("QPE/Application/" + app, "nextView()"); |
492 | else | 492 | else |
493 | QCopChannel::send("QPE/Application/" + app, "raise()"); | 493 | QCopChannel::send("QPE/Application/" + app, "raise()"); |
494 | } else { | 494 | } else { |
495 | lnk.execute(); | 495 | lnk.execute(); |
496 | } | 496 | } |
497 | } | 497 | } |
498 | } | 498 | } |
499 | 499 | ||
500 | void Desktop::raiseDatebook() | 500 | void Desktop::raiseDatebook() |
501 | { | 501 | { |
502 | Config cfg( "qpe" ); //F9 'Activity' | 502 | Config cfg( "qpe" ); //F9 'Activity' |
503 | cfg.setGroup( "AppsKey" ); | 503 | cfg.setGroup( "AppsKey" ); |
504 | QString tempItem; | 504 | QString tempItem; |
505 | tempItem = cfg.readEntry( "LeftEnd" , "Calender" ); | 505 | tempItem = cfg.readEntry( "LeftEnd" , "Calendar" ); |
506 | if ( tempItem == "Calender" || tempItem.isEmpty() ) { | 506 | if ( tempItem == "Calendar" || tempItem.isEmpty() ) { |
507 | tempItem = "datebook"; | 507 | tempItem = "datebook"; |
508 | } | 508 | } |
509 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | 509 | QCopEnvelope e( "QPE/System", "execute(QString)" ); |
510 | e << tempItem; | 510 | e << tempItem; |
511 | } | 511 | } |
512 | 512 | ||
513 | void Desktop::raiseContacts() | 513 | void Desktop::raiseContacts() |
514 | { | 514 | { |
515 | Config cfg( "qpe" ); //F10, 'Contacts' | 515 | Config cfg( "qpe" ); //F10, 'Contacts' |
516 | cfg.setGroup( "AppsKey" ); | 516 | cfg.setGroup( "AppsKey" ); |
517 | QString tempItem; | 517 | QString tempItem; |
518 | tempItem = cfg.readEntry( "Left2nd", "Address Book" ); | 518 | tempItem = cfg.readEntry( "Left2nd", "Address Book" ); |
519 | if ( tempItem == "Address Book" || tempItem.isEmpty() ) { | 519 | if ( tempItem == "Address Book" || tempItem.isEmpty() ) { |
520 | tempItem = "addressbook"; | 520 | tempItem = "addressbook"; |
521 | } | 521 | } |
522 | QCopEnvelope e("QPE/System","execute(QString)"); | 522 | QCopEnvelope e("QPE/System","execute(QString)"); |
523 | e << tempItem; | 523 | e << tempItem; |
524 | } | 524 | } |
525 | 525 | ||
526 | void Desktop::raiseMenu() | 526 | void Desktop::raiseMenu() |
527 | { | 527 | { |
528 | Config cfg( "qpe" ); //F11, 'Menu | 528 | Config cfg( "qpe" ); //F11, 'Menu |
529 | cfg.setGroup( "AppsKey" ); | 529 | cfg.setGroup( "AppsKey" ); |
530 | QString tempItem; | 530 | QString tempItem; |
@@ -582,83 +582,83 @@ void Desktop::execAutoStart() | |||
582 | #endif | 582 | #endif |
583 | 583 | ||
584 | static bool blanked=FALSE; | 584 | static bool blanked=FALSE; |
585 | 585 | ||
586 | static void blankScreen() | 586 | static void blankScreen() |
587 | { | 587 | { |
588 | if ( !qt_screen ) return; | 588 | if ( !qt_screen ) return; |
589 | /* Should use a big black window instead. | 589 | /* Should use a big black window instead. |
590 | QGfx* g = qt_screen->screenGfx(); | 590 | QGfx* g = qt_screen->screenGfx(); |
591 | g->fillRect(0,0,qt_screen->width(),qt_screen->height()); | 591 | g->fillRect(0,0,qt_screen->width(),qt_screen->height()); |
592 | delete g; | 592 | delete g; |
593 | */ | 593 | */ |
594 | blanked = TRUE; | 594 | blanked = TRUE; |
595 | } | 595 | } |
596 | 596 | ||
597 | static void darkScreen() | 597 | static void darkScreen() |
598 | { | 598 | { |
599 | extern void qpe_setBacklight(int); | 599 | extern void qpe_setBacklight(int); |
600 | qpe_setBacklight(0); // force off | 600 | qpe_setBacklight(0); // force off |
601 | } | 601 | } |
602 | 602 | ||
603 | 603 | ||
604 | void Desktop::togglePower() | 604 | void Desktop::togglePower() |
605 | { | 605 | { |
606 | extern void qpe_setBacklight ( int ); // We need to toggle the LCD fast - no time to send a QCop | 606 | extern void qpe_setBacklight ( int ); // We need to toggle the LCD fast - no time to send a QCop |
607 | 607 | ||
608 | static bool excllock = false; | 608 | static bool excllock = false; |
609 | 609 | ||
610 | if ( excllock ) | 610 | if ( excllock ) |
611 | return; | 611 | return; |
612 | 612 | ||
613 | excllock = true; | 613 | excllock = true; |
614 | 614 | ||
615 | bool wasloggedin = loggedin; | 615 | bool wasloggedin = loggedin; |
616 | loggedin=0; | 616 | loggedin=0; |
617 | suspendTime = QDateTime::currentDateTime(); | 617 | suspendTime = QDateTime::currentDateTime(); |
618 | 618 | ||
619 | //qpe_setBacklight ( 0 ); // force LCD off (sandman: why ????) | 619 | // qpe_setBacklight ( 0 ); // force LCD off (sandman: why ????) |
620 | 620 | ||
621 | if ( wasloggedin ) | 621 | if ( wasloggedin ) |
622 | blankScreen(); | 622 | blankScreen(); |
623 | 623 | ||
624 | ODevice::inst ( )-> suspend ( ); | 624 | ODevice::inst ( )-> suspend ( ); |
625 | 625 | ||
626 | QWSServer::screenSaverActivate ( false ); | 626 | QWSServer::screenSaverActivate ( false ); |
627 | 627 | ||
628 | qpe_setBacklight ( -3 ); // force LCD on | 628 | qpe_setBacklight ( -3 ); // force LCD on |
629 | 629 | ||
630 | { | 630 | { |
631 | QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep | 631 | QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep |
632 | } | 632 | } |
633 | 633 | ||
634 | if ( wasloggedin ) | 634 | if ( wasloggedin ) |
635 | login(TRUE); | 635 | login(TRUE); |
636 | 636 | ||
637 | execAutoStart(); | 637 | execAutoStart(); |
638 | //qcopBridge->closeOpenConnections(); | 638 | //qcopBridge->closeOpenConnections(); |
639 | 639 | ||
640 | excllock = false; | 640 | excllock = false; |
641 | } | 641 | } |
642 | 642 | ||
643 | void Desktop::toggleLight() | 643 | void Desktop::toggleLight() |
644 | { | 644 | { |
645 | QCopEnvelope e("QPE/System", "setBacklight(int)"); | 645 | QCopEnvelope e("QPE/System", "setBacklight(int)"); |
646 | e << -2; // toggle | 646 | e << -2; // toggle |
647 | } | 647 | } |
648 | 648 | ||
649 | void Desktop::toggleSymbolInput() | 649 | void Desktop::toggleSymbolInput() |
650 | { | 650 | { |
651 | tb->toggleSymbolInput(); | 651 | tb->toggleSymbolInput(); |
652 | } | 652 | } |
653 | 653 | ||
654 | void Desktop::toggleNumLockState() | 654 | void Desktop::toggleNumLockState() |
655 | { | 655 | { |
656 | tb->toggleNumLockState(); | 656 | tb->toggleNumLockState(); |
657 | } | 657 | } |
658 | 658 | ||
659 | void Desktop::toggleCapsLockState() | 659 | void Desktop::toggleCapsLockState() |
660 | { | 660 | { |
661 | tb->toggleCapsLockState(); | 661 | tb->toggleCapsLockState(); |
662 | } | 662 | } |
663 | 663 | ||
664 | void Desktop::styleChange( QStyle &s ) | 664 | void Desktop::styleChange( QStyle &s ) |