-rw-r--r-- | core/launcher/desktop.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 649862b..6771a66 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -42,7 +42,4 @@ #include "qpe/custom.h" #endif -#if defined(QT_QWS_IPAQ) -#include "qpe/custom-ipaq.h" -#endif #include <qgfx_qws.h> @@ -169,10 +166,9 @@ void DesktopApplication::receive( const QCString &msg, const QByteArray &data ) int k; QString c, m; - stream >> k; stream >> c; stream >> m; - qWarning("KeyRegisterRecieved: %i, %s, %s", k, (const char*)c, (const char *)m); + qWarning("KeyRegisterReceived: %i, %s, %s", k, (const char*)c, (const char *)m ); keyRegisterList.append(QCopKeyRegister(k,c,m)); } @@ -195,5 +191,5 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) return TRUE; bool press = ke->simpleData.is_press; - bool autoRepeat = ke ->simpleData.is_auto_repeat; + bool autoRepeat= ke->simpleData.is_auto_repeat; if (!keyRegisterList.isEmpty()) { @@ -201,6 +197,8 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) { - if ((*it).getKeyCode() == ke->simpleData.keycode && !autoRepeat) - QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8()); + if ((*it).getKeyCode() == ke->simpleData.keycode && !autoRepeat) { + if(press) qDebug("press"); else qDebug("release"); + QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8()); + } } } @@ -742,8 +740,13 @@ void Desktop::terminateServers() void Desktop::rereadVolumes() { - Config cfg("Sound"); - cfg.setGroup("System"); - touchclick = cfg.readBoolEntry("Touch"); - keyclick = cfg.readBoolEntry("Key"); + Config cfg("qpe"); + cfg.setGroup("Volume"); + touchclick = cfg.readBoolEntry("TouchSound"); + keyclick = cfg.readBoolEntry("KeySound"); + alarmsound = cfg.readBoolEntry("AlarmSound"); +// Config cfg("Sound"); +// cfg.setGroup("System"); +// touchclick = cfg.readBoolEntry("Touch"); +// keyclick = cfg.readBoolEntry("Key"); } @@ -767,4 +770,5 @@ void Desktop::soundAlarm() { #ifdef CUSTOM_SOUND_ALARM + if (alarmsound) CUSTOM_SOUND_ALARM; #endif |