summaryrefslogtreecommitdiff
authorsandman <sandman>2002-10-13 16:12:08 (UTC)
committer sandman <sandman>2002-10-13 16:12:08 (UTC)
commit467451d6d19a2cf5245afa2d219b7d2b1cd008f5 (patch) (unidiff)
tree8c59b58615a817377c0ae1db10a4093387fdaa77
parent92aabc976e4a8e58d7db0bba42cb8d0f3ebe8982 (diff)
downloadopie-467451d6d19a2cf5245afa2d219b7d2b1cd008f5.zip
opie-467451d6d19a2cf5245afa2d219b7d2b1cd008f5.tar.gz
opie-467451d6d19a2cf5245afa2d219b7d2b1cd008f5.tar.bz2
- added qcop "QPE/System" "setDisplayState(int)" to toggle the LCD on/off
- removed qcop "QPE/Desktop" "home()" -- this is now handled via qcop "QPE/Application/qpe" "raise()" - renamed qcop "QPE/Desktop" "suspend()" to qcop "QPE/System" "suspend()"
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp28
1 files changed, 21 insertions, 7 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 6ee7132..0e60839 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -176,8 +176,10 @@ public:
176 } 176 }
177 void restore() 177 void restore()
178 { 178 {
179 if ( !m_lcd_status ) // We must have turned it off 179 if ( !m_lcd_status ) { // We must have turned it off
180 ODevice::inst ( ) -> setDisplayStatus ( true ); 180 ODevice::inst ( ) -> setDisplayStatus ( true );
181 m_lcd_status = true;
182 }
181 183
182 setBacklight ( -3 ); 184 setBacklight ( -3 );
183 } 185 }
@@ -303,6 +305,14 @@ public:
303 m_backlight_bright = bright; 305 m_backlight_bright = bright;
304 } 306 }
305 307
308 void setDisplayState ( bool on )
309 {
310 if ( m_lcd_status != on ) {
311 ODevice::inst ( ) -> setDisplayStatus ( on );
312 m_lcd_status = on;
313 }
314 }
315
306private: 316private:
307 int m_disable_suspend; 317 int m_disable_suspend;
308 bool m_enable_dim; 318 bool m_enable_dim;
@@ -377,12 +387,6 @@ void DesktopApplication::desktopMessage( const QCString &msg, const QByteArray &
377 qWarning( "KeyRegisterReceived: %i, %s, %s", k, ( const char* ) c, ( const char * ) m ); 387 qWarning( "KeyRegisterReceived: %i, %s, %s", k, ( const char* ) c, ( const char * ) m );
378 keyRegisterList.append( QCopKeyRegister( k, c, m ) ); 388 keyRegisterList.append( QCopKeyRegister( k, c, m ) );
379 } 389 }
380 else if ( msg == "suspend()" ) {
381 emit power();
382 }
383 else if ( msg == "home()" ) {
384 qpedesktop-> home ( );
385 }
386#endif 390#endif
387} 391}
388 392
@@ -412,6 +416,14 @@ void DesktopApplication::systemMessage( const QCString & msg, const QByteArray &
412 stream >> mode; 416 stream >> mode;
413 m_screensaver-> setMode ( mode ); 417 m_screensaver-> setMode ( mode );
414 } 418 }
419 else if ( msg == "setDisplayState(int)" ) {
420 int state;
421 stream >> state;
422 m_screensaver-> setDisplayState ( state != 0 );
423 }
424 else if ( msg == "suspend()" ) {
425 emit power();
426 }
415#endif 427#endif
416} 428}
417 429
@@ -628,6 +640,8 @@ Desktop::Desktop() :
628 connect( qApp, SIGNAL( volumeChanged( bool ) ), this, SLOT( rereadVolumes() ) ); 640 connect( qApp, SIGNAL( volumeChanged( bool ) ), this, SLOT( rereadVolumes() ) );
629 641
630 qApp->installEventFilter( this ); 642 qApp->installEventFilter( this );
643
644 qApp-> setMainWidget ( launcher );
631} 645}
632 646
633void Desktop::show() 647void Desktop::show()