-rw-r--r-- | core/launcher/desktop.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 6def126..ef0bf4c 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp | |||
@@ -77,49 +77,48 @@ public: | |||
77 | return keyCode; | 77 | return keyCode; |
78 | } | 78 | } |
79 | QCString getChannel() const | 79 | QCString getChannel() const |
80 | { | 80 | { |
81 | return channel; | 81 | return channel; |
82 | } | 82 | } |
83 | QCString getMessage() const | 83 | QCString getMessage() const |
84 | { | 84 | { |
85 | return message; | 85 | return message; |
86 | } | 86 | } |
87 | 87 | ||
88 | private: | 88 | private: |
89 | int keyCode; | 89 | int keyCode; |
90 | QCString channel, message; | 90 | QCString channel, message; |
91 | }; | 91 | }; |
92 | 92 | ||
93 | typedef QValueList<QCopKeyRegister> KeyRegisterList; | 93 | typedef QValueList<QCopKeyRegister> KeyRegisterList; |
94 | KeyRegisterList keyRegisterList; | 94 | KeyRegisterList keyRegisterList; |
95 | 95 | ||
96 | static Desktop* qpedesktop = 0; | 96 | static Desktop* qpedesktop = 0; |
97 | static int loggedin = 0; | 97 | static int loggedin = 0; |
98 | static void login( bool at_poweron ) | 98 | static void login( bool at_poweron ) |
99 | { | 99 | { |
100 | if ( !loggedin ) { | 100 | if ( !loggedin ) { |
101 | Global::terminateBuiltin( "calibrate" ); | ||
102 | Password::authenticate( at_poweron ); | 101 | Password::authenticate( at_poweron ); |
103 | loggedin = 1; | 102 | loggedin = 1; |
104 | QCopEnvelope e( "QPE/Desktop", "unlocked()" ); | 103 | QCopEnvelope e( "QPE/Desktop", "unlocked()" ); |
105 | } | 104 | } |
106 | } | 105 | } |
107 | 106 | ||
108 | bool Desktop::screenLocked() | 107 | bool Desktop::screenLocked() |
109 | { | 108 | { |
110 | return loggedin == 0; | 109 | return loggedin == 0; |
111 | } | 110 | } |
112 | 111 | ||
113 | /* | 112 | /* |
114 | Priority is number of alerts that are needed to pop up | 113 | Priority is number of alerts that are needed to pop up |
115 | alert. | 114 | alert. |
116 | */ | 115 | */ |
117 | class DesktopPowerAlerter : public QMessageBox | 116 | class DesktopPowerAlerter : public QMessageBox |
118 | { | 117 | { |
119 | public: | 118 | public: |
120 | DesktopPowerAlerter( QWidget *parent, const char *name = 0 ) | 119 | DesktopPowerAlerter( QWidget *parent, const char *name = 0 ) |
121 | : QMessageBox( tr( "Battery Status" ), "Low Battery", | 120 | : QMessageBox( tr( "Battery Status" ), "Low Battery", |
122 | QMessageBox::Critical, | 121 | QMessageBox::Critical, |
123 | QMessageBox::Ok | QMessageBox::Default, | 122 | QMessageBox::Ok | QMessageBox::Default, |
124 | QMessageBox::NoButton, QMessageBox::NoButton, | 123 | QMessageBox::NoButton, QMessageBox::NoButton, |
125 | parent, name, FALSE ) | 124 | parent, name, FALSE ) |
@@ -601,49 +600,48 @@ static bool isVisibleWindow( int wid ) | |||
601 | } | 600 | } |
602 | #endif | 601 | #endif |
603 | return FALSE; | 602 | return FALSE; |
604 | } | 603 | } |
605 | 604 | ||
606 | static bool hasVisibleWindow( const QString& clientname ) | 605 | static bool hasVisibleWindow( const QString& clientname ) |
607 | { | 606 | { |
608 | #ifdef QWS | 607 | #ifdef QWS |
609 | const QList<QWSWindow> &list = qwsServer->clientWindows(); | 608 | const QList<QWSWindow> &list = qwsServer->clientWindows(); |
610 | QWSWindow* w; | 609 | QWSWindow* w; |
611 | for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) { | 610 | for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) { |
612 | if ( w->client() ->identity() == clientname && !w->isFullyObscured() ) | 611 | if ( w->client() ->identity() == clientname && !w->isFullyObscured() ) |
613 | return TRUE; | 612 | return TRUE; |
614 | } | 613 | } |
615 | #endif | 614 | #endif |
616 | return FALSE; | 615 | return FALSE; |
617 | } | 616 | } |
618 | 617 | ||
619 | 618 | ||
620 | void Desktop::executeOrModify( const QString& appLnkFile ) | 619 | void Desktop::executeOrModify( const QString& appLnkFile ) |
621 | { | 620 | { |
622 | AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile ); | 621 | AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile ); |
623 | if ( lnk.isValid() ) { | 622 | if ( lnk.isValid() ) { |
624 | QCString app = lnk.exec().utf8(); | 623 | QCString app = lnk.exec().utf8(); |
625 | Global::terminateBuiltin( "calibrate" ); | ||
626 | if ( QCopChannel::isRegistered( "QPE/Application/" + app ) ) { | 624 | if ( QCopChannel::isRegistered( "QPE/Application/" + app ) ) { |
627 | // MRUList::addTask( &lnk ); | 625 | // MRUList::addTask( &lnk ); |
628 | if ( hasVisibleWindow( app ) ) | 626 | if ( hasVisibleWindow( app ) ) |
629 | QCopChannel::send( "QPE/Application/" + app, "nextView()" ); | 627 | QCopChannel::send( "QPE/Application/" + app, "nextView()" ); |
630 | else | 628 | else |
631 | QCopChannel::send( "QPE/Application/" + app, "raise()" ); | 629 | QCopChannel::send( "QPE/Application/" + app, "raise()" ); |
632 | } | 630 | } |
633 | else { | 631 | else { |
634 | lnk.execute(); | 632 | lnk.execute(); |
635 | } | 633 | } |
636 | } | 634 | } |
637 | } | 635 | } |
638 | 636 | ||
639 | // autoStarts apps on resume and start | 637 | // autoStarts apps on resume and start |
640 | void Desktop::execAutoStart() | 638 | void Desktop::execAutoStart() |
641 | { | 639 | { |
642 | QString appName; | 640 | QString appName; |
643 | int delay; | 641 | int delay; |
644 | QDateTime now = QDateTime::currentDateTime(); | 642 | QDateTime now = QDateTime::currentDateTime(); |
645 | Config cfg( "autostart" ); | 643 | Config cfg( "autostart" ); |
646 | cfg.setGroup( "AutoStart" ); | 644 | cfg.setGroup( "AutoStart" ); |
647 | appName = cfg.readEntry( "Apps", "" ); | 645 | appName = cfg.readEntry( "Apps", "" ); |
648 | delay = ( cfg.readEntry( "Delay", "0" ) ).toInt(); | 646 | delay = ( cfg.readEntry( "Delay", "0" ) ).toInt(); |
649 | // If the time between suspend and resume was longer then the | 647 | // If the time between suspend and resume was longer then the |