author | sandman <sandman> | 2002-09-30 23:09:04 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-09-30 23:09:04 (UTC) |
commit | 61fdbd044d40cb3c93eab5a1ba262964a9413c66 (patch) (side-by-side diff) | |
tree | db5cadc832dc402b53fc910b1d0ba3c7f26474ee | |
parent | 37a8266f4a32d07a27d453897febf1f25963a4d0 (diff) | |
download | opie-61fdbd044d40cb3c93eab5a1ba262964a9413c66.zip opie-61fdbd044d40cb3c93eab5a1ba262964a9413c66.tar.gz opie-61fdbd044d40cb3c93eab5a1ba262964a9413c66.tar.bz2 |
Removed the button mapping for H3800, since this is now handled in the
ODevice iPAQ keyfilter
-rw-r--r-- | core/launcher/desktop.cpp | 40 | ||||
-rw-r--r-- | core/launcher/desktop.h | 1 |
2 files changed, 10 insertions, 31 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 4640a12..68949e6 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -53,16 +53,18 @@ #include <qwindowsystem_qws.h> #include <qvaluelist.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> +using namespace Opie; + class QCopKeyRegister { public: QCopKeyRegister() : keyCode( 0 ) { } QCopKeyRegister( int k, const QString &c, const QString &m ) : keyCode( k ), channel( c ), message( m ) { } @@ -172,17 +174,17 @@ public: // Make sure the LCD is in fact on, (if opie was killed while the LCD is off it would still be off) ODevice::inst ( ) -> setDisplayStatus ( true ); } void restore() { if ( !m_lcd_status ) // We must have turned it off ODevice::inst ( ) -> setDisplayStatus ( true ); - setBacklight ( -1 ); + setBacklight ( -3 ); } bool save( int level ) { switch ( level ) { case 0: if ( m_disable_suspend > 0 && m_enable_dim ) { if ( backlight() > 1 ) setBacklight( 1 ); // lowest non-off @@ -314,18 +316,23 @@ private: }; void DesktopApplication::switchLCD ( bool on ) { if ( qApp ) { DesktopApplication *dapp = (DesktopApplication *) qApp; - if ( dapp-> m_screensaver ) - dapp-> m_screensaver-> setBacklight ( on ? -3 : -1 ); + if ( dapp-> m_screensaver ) { + if ( on ) + dapp-> m_screensaver-> restore ( ); //setBacklight ( on ? -3 : -1 ); + else + dapp-> m_screensaver-> save ( 1 ); + + } } } DesktopApplication::DesktopApplication( int& argc, char **argv, Type appType ) : QPEApplication( argc, argv, appType ) { @@ -1001,35 +1008,8 @@ void Desktop::screenClick() } void Desktop::soundAlarm() { if ( qpedesktop-> alarmsound ) ODevice::inst ( ) -> alarmSound ( ); } -bool Desktop::eventFilter( QObject *, QEvent *ev ) -{ - if ( ev-> type ( ) == QEvent::KeyPress ) { - QKeyEvent * ke = ( QKeyEvent * ) ev; - if ( ke-> key ( ) == Qt::Key_F11 ) { // menu key - QWidget * active = qApp-> activeWindow ( ); - - if ( active && active-> isPopup ( ) ) - active->close(); - - /* - * On iPAQ 38xx that key is not the "menu key" but the mail key - * To not confuse the users, make it launch the mail app on 38xx - */ - if ( ODevice::inst() ->model() == OMODEL_iPAQ_H38xx ) { - QCopEnvelope e( "QPE/System", "execute(QString)" ); - e << QString( "mail" ); - return true; - } - else { - raiseMenu ( ); - return true; - } - } - } - return false; -} diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h index b9ff39f..f7c3e3f 100644 --- a/core/launcher/desktop.h +++ b/core/launcher/desktop.h @@ -117,17 +117,16 @@ public slots: void toggleSymbolInput(); void terminateServers(); void rereadVolumes(); protected: void executeOrModify( const QString& appLnkFile ); void styleChange( QStyle & ); void timerEvent( QTimerEvent *e ); - bool eventFilter( QObject *, QEvent * ); QWidget *bg; Launcher *launcher; TaskBar *tb; private: void startTransferServer(); bool recoverMemory(); |