-rw-r--r-- | core/launcher/desktop.cpp | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index ab4f14a..7662e48 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -44,4 +44,6 @@ #endif +#include <opie/odevice.h> + #include <qgfx_qws.h> #include <qmainwindow.h> @@ -268,5 +270,5 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) if ( press ) emit capsLockStateToggle(); } - if ( press ) + if (( press && !autoRepeat ) || ( !press && autoRepeat )) qpedesktop->keyClick(); } else { @@ -328,8 +330,4 @@ QPE_MEMALERTER_IMPL #endif -#if defined(CUSTOM_SOUND_IMPL) -CUSTOM_SOUND_IMPL -#endif - //=========================================================================== @@ -340,8 +338,4 @@ Desktop::Desktop() : packageSlave( 0 ) { -#ifdef CUSTOM_SOUND_INIT - CUSTOM_SOUND_INIT; -#endif - qpedesktop = this; @@ -757,27 +751,21 @@ void Desktop::rereadVolumes() void Desktop::keyClick() { -#ifdef CUSTOM_SOUND_KEYCLICK if ( keyclick ) - CUSTOM_SOUND_KEYCLICK; -#endif + ODevice::inst ( )-> keySound ( ); } void Desktop::screenClick() { -#ifdef CUSTOM_SOUND_TOUCH if ( touchclick ) - CUSTOM_SOUND_TOUCH; -#endif + ODevice::inst ( )-> touchSound ( ); } void Desktop::soundAlarm() { -#ifdef CUSTOM_SOUND_ALARM if (qpedesktop->alarmsound) - CUSTOM_SOUND_ALARM; -#endif + ODevice::inst ( )-> alarmSound ( ); } -bool Desktop::eventFilter( QObject *w, QEvent *ev ) +bool Desktop::eventFilter( QObject *, QEvent *ev ) { if ( ev->type() == QEvent::KeyPress ) { @@ -785,12 +773,12 @@ bool Desktop::eventFilter( QObject *w, QEvent *ev ) if ( ke->key() == Qt::Key_F11 ) { // menu key QWidget *active = qApp->activeWindow(); - if ( active && active->isPopup() ) { + + if ( active && active-> isPopup ( )) active->close(); - } + raiseMenu(); - return TRUE; + return true; } } - return FALSE; + return false; } - |