-rw-r--r-- | core/launcher/desktop.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index a19e4c6..bca95b2 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp | |||
@@ -1,48 +1,48 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "desktop.h" | 21 | #include "desktop.h" |
22 | #include "info.h" | 22 | #include "info.h" |
23 | #include "launcher.h" | 23 | #include "launcher.h" |
24 | #include "mrulist.h" | 24 | //#include "mrulist.h" |
25 | #include "qcopbridge.h" | 25 | #include "qcopbridge.h" |
26 | #include "shutdownimpl.h" | 26 | #include "shutdownimpl.h" |
27 | #include "startmenu.h" | 27 | #include "startmenu.h" |
28 | #include "taskbar.h" | 28 | #include "taskbar.h" |
29 | #include "transferserver.h" | 29 | #include "transferserver.h" |
30 | #include "irserver.h" | 30 | #include "irserver.h" |
31 | #include "packageslave.h" | 31 | #include "packageslave.h" |
32 | 32 | ||
33 | #include <qpe/applnk.h> | 33 | #include <qpe/applnk.h> |
34 | #include <qpe/mimetype.h> | 34 | #include <qpe/mimetype.h> |
35 | #include <qpe/password.h> | 35 | #include <qpe/password.h> |
36 | #include <qpe/config.h> | 36 | #include <qpe/config.h> |
37 | #include <qpe/power.h> | 37 | #include <qpe/power.h> |
38 | #include <qpe/timeconversion.h> | 38 | #include <qpe/timeconversion.h> |
39 | #include <qpe/qcopenvelope_qws.h> | 39 | #include <qpe/qcopenvelope_qws.h> |
40 | #include <qpe/network.h> | 40 | #include <qpe/network.h> |
41 | #include <qpe/global.h> | 41 | #include <qpe/global.h> |
42 | 42 | ||
43 | #if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) | 43 | #if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) |
44 | #include <qpe/custom.h> | 44 | #include <qpe/custom.h> |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | #include <opie/odevice.h> | 47 | #include <opie/odevice.h> |
48 | 48 | ||
@@ -297,49 +297,49 @@ public: | |||
297 | 297 | ||
298 | bright = backlight ( ); | 298 | bright = backlight ( ); |
299 | ODevice::inst ( ) -> setDisplayBrightness ( bright ); | 299 | ODevice::inst ( ) -> setDisplayBrightness ( bright ); |
300 | 300 | ||
301 | m_backlight_bright = bright; | 301 | m_backlight_bright = bright; |
302 | } | 302 | } |
303 | 303 | ||
304 | private: | 304 | private: |
305 | int m_disable_suspend; | 305 | int m_disable_suspend; |
306 | bool m_enable_dim; | 306 | bool m_enable_dim; |
307 | bool m_enable_lightoff; | 307 | bool m_enable_lightoff; |
308 | bool m_enable_onlylcdoff; | 308 | bool m_enable_onlylcdoff; |
309 | 309 | ||
310 | bool m_lcd_status; | 310 | bool m_lcd_status; |
311 | 311 | ||
312 | int m_backlight_bright; | 312 | int m_backlight_bright; |
313 | bool m_backlight_forcedoff; | 313 | bool m_backlight_forcedoff; |
314 | }; | 314 | }; |
315 | 315 | ||
316 | 316 | ||
317 | void DesktopApplication::switchLCD ( bool on ) | 317 | void DesktopApplication::switchLCD ( bool on ) |
318 | { | 318 | { |
319 | if ( qApp ) { | 319 | if ( qApp ) { |
320 | DesktopApplication *dapp = (DesktopApplication *) qApp; | 320 | DesktopApplication *dapp = (DesktopApplication *) qApp; |
321 | 321 | ||
322 | if ( dapp-> m_screensaver ) | 322 | if ( dapp-> m_screensaver ) |
323 | dapp-> m_screensaver-> setBacklight ( on ? -3 : -1 ); | 323 | dapp-> m_screensaver-> setBacklight ( on ? -3 : -1 ); |
324 | } | 324 | } |
325 | } | 325 | } |
326 | 326 | ||
327 | 327 | ||
328 | DesktopApplication::DesktopApplication( int& argc, char **argv, Type appType ) | 328 | DesktopApplication::DesktopApplication( int& argc, char **argv, Type appType ) |
329 | : QPEApplication( argc, argv, appType ) | 329 | : QPEApplication( argc, argv, appType ) |
330 | { | 330 | { |
331 | 331 | ||
332 | QTimer * t = new QTimer( this ); | 332 | QTimer * t = new QTimer( this ); |
333 | connect( t, SIGNAL( timeout() ), this, SLOT( psTimeout() ) ); | 333 | connect( t, SIGNAL( timeout() ), this, SLOT( psTimeout() ) ); |
334 | t->start( 10000 ); | 334 | t->start( 10000 ); |
335 | ps = new PowerStatus; | 335 | ps = new PowerStatus; |
336 | pa = new DesktopPowerAlerter( 0 ); | 336 | pa = new DesktopPowerAlerter( 0 ); |
337 | 337 | ||
338 | channel = new QCopChannel( "QPE/Desktop", this ); | 338 | channel = new QCopChannel( "QPE/Desktop", this ); |
339 | connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), | 339 | connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), |
340 | this, SLOT( desktopMessage( const QCString&, const QByteArray& ) ) ); | 340 | this, SLOT( desktopMessage( const QCString&, const QByteArray& ) ) ); |
341 | 341 | ||
342 | channel = new QCopChannel( "QPE/System", this ); | 342 | channel = new QCopChannel( "QPE/System", this ); |
343 | connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), | 343 | connect( channel, SIGNAL( received( const QCString&, const QByteArray& ) ), |
344 | this, SLOT( systemMessage( const QCString&, const QByteArray& ) ) ); | 344 | this, SLOT( systemMessage( const QCString&, const QByteArray& ) ) ); |
345 | 345 | ||
@@ -706,49 +706,49 @@ void Desktop::raiseLauncher() | |||
706 | { | 706 | { |
707 | Config cfg( "qpe" ); //F12 'Home' | 707 | Config cfg( "qpe" ); //F12 'Home' |
708 | cfg.setGroup( "AppsKey" ); | 708 | cfg.setGroup( "AppsKey" ); |
709 | QString tempItem; | 709 | QString tempItem; |
710 | tempItem = cfg.readEntry( "Middle", "Home" ); | 710 | tempItem = cfg.readEntry( "Middle", "Home" ); |
711 | if ( tempItem == "Home" || tempItem.isEmpty() ) { | 711 | if ( tempItem == "Home" || tempItem.isEmpty() ) { |
712 | if ( isVisibleWindow( launcher->winId() ) ) | 712 | if ( isVisibleWindow( launcher->winId() ) ) |
713 | launcher->nextView(); | 713 | launcher->nextView(); |
714 | else | 714 | else |
715 | launcher->raise(); | 715 | launcher->raise(); |
716 | } | 716 | } |
717 | else { | 717 | else { |
718 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | 718 | QCopEnvelope e( "QPE/System", "execute(QString)" ); |
719 | e << tempItem; | 719 | e << tempItem; |
720 | } | 720 | } |
721 | } | 721 | } |
722 | 722 | ||
723 | void Desktop::executeOrModify( const QString& appLnkFile ) | 723 | void Desktop::executeOrModify( const QString& appLnkFile ) |
724 | { | 724 | { |
725 | AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile ); | 725 | AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile ); |
726 | if ( lnk.isValid() ) { | 726 | if ( lnk.isValid() ) { |
727 | QCString app = lnk.exec().utf8(); | 727 | QCString app = lnk.exec().utf8(); |
728 | Global::terminateBuiltin( "calibrate" ); | 728 | Global::terminateBuiltin( "calibrate" ); |
729 | if ( QCopChannel::isRegistered( "QPE/Application/" + app ) ) { | 729 | if ( QCopChannel::isRegistered( "QPE/Application/" + app ) ) { |
730 | MRUList::addTask( &lnk ); | 730 | //MRUList::addTask( &lnk ); |
731 | if ( hasVisibleWindow( app ) ) | 731 | if ( hasVisibleWindow( app ) ) |
732 | QCopChannel::send( "QPE/Application/" + app, "nextView()" ); | 732 | QCopChannel::send( "QPE/Application/" + app, "nextView()" ); |
733 | else | 733 | else |
734 | QCopChannel::send( "QPE/Application/" + app, "raise()" ); | 734 | QCopChannel::send( "QPE/Application/" + app, "raise()" ); |
735 | } | 735 | } |
736 | else { | 736 | else { |
737 | lnk.execute(); | 737 | lnk.execute(); |
738 | } | 738 | } |
739 | } | 739 | } |
740 | } | 740 | } |
741 | 741 | ||
742 | void Desktop::raiseDatebook() | 742 | void Desktop::raiseDatebook() |
743 | { | 743 | { |
744 | Config cfg( "qpe" ); //F9 'Activity' | 744 | Config cfg( "qpe" ); //F9 'Activity' |
745 | cfg.setGroup( "AppsKey" ); | 745 | cfg.setGroup( "AppsKey" ); |
746 | QString tempItem; | 746 | QString tempItem; |
747 | tempItem = cfg.readEntry( "LeftEnd" , "Calendar" ); | 747 | tempItem = cfg.readEntry( "LeftEnd" , "Calendar" ); |
748 | if ( tempItem == "Calendar" || tempItem.isEmpty() ) { | 748 | if ( tempItem == "Calendar" || tempItem.isEmpty() ) { |
749 | tempItem = "datebook"; | 749 | tempItem = "datebook"; |
750 | } | 750 | } |
751 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | 751 | QCopEnvelope e( "QPE/System", "execute(QString)" ); |
752 | e << tempItem; | 752 | e << tempItem; |
753 | } | 753 | } |
754 | 754 | ||