summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 1a33b36..6ee7132 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -314,29 +314,29 @@ private:
314 int m_backlight_bright; 314 int m_backlight_bright;
315 bool m_backlight_forcedoff; 315 bool m_backlight_forcedoff;
316}; 316};
317 317
318 318
319void DesktopApplication::switchLCD ( bool on ) 319void DesktopApplication::switchLCD ( bool on )
320{ 320{
321 if ( qApp ) { 321 if ( qApp ) {
322 DesktopApplication *dapp = (DesktopApplication *) qApp; 322 DesktopApplication *dapp = (DesktopApplication *) qApp;
323 323
324 if ( dapp-> m_screensaver ) { 324 if ( dapp-> m_screensaver ) {
325 if ( on ) 325 if ( on )
326 dapp-> m_screensaver-> restore ( ); //setBacklight ( on ? -3 : -1 ); 326 dapp-> m_screensaver-> restore ( ); //setBacklight ( on ? -3 : -1 );
327 else 327 else
328 dapp-> m_screensaver-> save ( 1 ); 328 dapp-> m_screensaver-> save ( 1 );
329 329
330 } 330 }
331 } 331 }
332} 332}
333 333
334 334
335DesktopApplication::DesktopApplication( int& argc, char **argv, Type appType ) 335DesktopApplication::DesktopApplication( int& argc, char **argv, Type appType )
336 : QPEApplication( argc, argv, appType ) 336 : QPEApplication( argc, argv, appType )
337{ 337{
338 338
339 QTimer * t = new QTimer( this ); 339 QTimer * t = new QTimer( this );
340 connect( t, SIGNAL( timeout() ), this, SLOT( psTimeout() ) ); 340 connect( t, SIGNAL( timeout() ), this, SLOT( psTimeout() ) );
341 t->start( 10000 ); 341 t->start( 10000 );
342 ps = new PowerStatus; 342 ps = new PowerStatus;
@@ -372,25 +372,25 @@ void DesktopApplication::desktopMessage( const QCString &msg, const QByteArray &
372 QString c, m; 372 QString c, m;
373 stream >> k; 373 stream >> k;
374 stream >> c; 374 stream >> c;
375 stream >> m; 375 stream >> m;
376 376
377 qWarning( "KeyRegisterReceived: %i, %s, %s", k, ( const char* ) c, ( const char * ) m ); 377 qWarning( "KeyRegisterReceived: %i, %s, %s", k, ( const char* ) c, ( const char * ) m );
378 keyRegisterList.append( QCopKeyRegister( k, c, m ) ); 378 keyRegisterList.append( QCopKeyRegister( k, c, m ) );
379 } 379 }
380 else if ( msg == "suspend()" ) { 380 else if ( msg == "suspend()" ) {
381 emit power(); 381 emit power();
382 } 382 }
383 else if ( msg == "home()" ) { 383 else if ( msg == "home()" ) {
384 qpedesktop-> home ( ); 384 qpedesktop-> home ( );
385 } 385 }
386#endif 386#endif
387} 387}
388 388
389 389
390void DesktopApplication::systemMessage( const QCString & msg, const QByteArray & data ) 390void DesktopApplication::systemMessage( const QCString & msg, const QByteArray & data )
391{ 391{
392#ifdef Q_WS_QWS 392#ifdef Q_WS_QWS
393 QDataStream stream ( data, IO_ReadOnly ); 393 QDataStream stream ( data, IO_ReadOnly );
394 394
395 if ( msg == "setScreenSaverInterval(int)" ) { 395 if ( msg == "setScreenSaverInterval(int)" ) {
396 int time; 396 int time;
@@ -666,27 +666,27 @@ void Desktop::checkMemory()
666 memstate = Unknown; 666 memstate = Unknown;
667 if ( recoverMemory() ) 667 if ( recoverMemory() )
668 ignoreNormal = TRUE; 668 ignoreNormal = TRUE;
669 else 669 else
670 QMessageBox::warning( 0 , "Memory Status", 670 QMessageBox::warning( 0 , "Memory Status",
671 "The memory smacks of shortage. \n" 671 "The memory smacks of shortage. \n"
672 "Please save data. " ); 672 "Please save data. " );
673 break; 673 break;
674 case Normal: 674 case Normal:
675 memstate = Unknown; 675 memstate = Unknown;
676 if ( ignoreNormal ) 676 if ( ignoreNormal )
677 ignoreNormal = FALSE; 677 ignoreNormal = FALSE;
678 else 678// else
679 QMessageBox::information ( 0 , "Memory Status", 679// QMessageBox::information ( 0 , "Memory Status",
680 "There is enough memory again." ); 680// "There is enough memory again." );
681 break; 681 break;
682 case VeryLow: 682 case VeryLow:
683 memstate = Unknown; 683 memstate = Unknown;
684 QMessageBox::critical( 0 , "Memory Status", 684 QMessageBox::critical( 0 , "Memory Status",
685 "The memory is very low. \n" 685 "The memory is very low. \n"
686 "Please end this application \n" 686 "Please end this application \n"
687 "immediately." ); 687 "immediately." );
688 recoverMemory(); 688 recoverMemory();
689 } 689 }
690 existingMessage = FALSE; 690 existingMessage = FALSE;
691#endif 691#endif
692} 692}
@@ -711,34 +711,34 @@ static bool hasVisibleWindow( const QString& clientname )
711 return TRUE; 711 return TRUE;
712 } 712 }
713 return FALSE; 713 return FALSE;
714} 714}
715 715
716void Desktop::raiseLauncher() 716void Desktop::raiseLauncher()
717{ 717{
718 Config cfg( "qpe" ); //F12 'Home' 718 Config cfg( "qpe" ); //F12 'Home'
719 cfg.setGroup( "AppsKey" ); 719 cfg.setGroup( "AppsKey" );
720 QString tempItem; 720 QString tempItem;
721 tempItem = cfg.readEntry( "Middle", "Home" ); 721 tempItem = cfg.readEntry( "Middle", "Home" );
722 if ( tempItem == "Home" || tempItem.isEmpty() ) { 722 if ( tempItem == "Home" || tempItem.isEmpty() ) {
723 home ( ); 723 home ( );
724 } 724 }
725 else { 725 else {
726 QCopEnvelope e( "QPE/System", "execute(QString)" ); 726 QCopEnvelope e( "QPE/System", "execute(QString)" );
727 e << tempItem; 727 e << tempItem;
728 } 728 }
729} 729}
730 730
731void Desktop::home ( ) 731void Desktop::home ( )
732 { 732{
733 if ( isVisibleWindow( launcher->winId() ) ) 733 if ( isVisibleWindow( launcher->winId() ) )
734 launcher->nextView(); 734 launcher->nextView();
735 else 735 else
736 launcher->raise(); 736 launcher->raise();
737} 737}
738 738
739void Desktop::executeOrModify( const QString& appLnkFile ) 739void Desktop::executeOrModify( const QString& appLnkFile )
740{ 740{
741 AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile ); 741 AppLnk lnk( MimeType::appsFolderName() + "/" + appLnkFile );
742 if ( lnk.isValid() ) { 742 if ( lnk.isValid() ) {
743 QCString app = lnk.exec().utf8(); 743 QCString app = lnk.exec().utf8();
744 Global::terminateBuiltin( "calibrate" ); 744 Global::terminateBuiltin( "calibrate" );