summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/desktop.cpp24
-rw-r--r--core/launcher/desktop.h2
2 files changed, 15 insertions, 11 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
@@ -40,11 +40,8 @@
#include <qpe/global.h>
#ifdef QT_QWS_CUSTOM
#include "qpe/custom.h"
#endif
-#if defined(QT_QWS_IPAQ)
-#include "qpe/custom-ipaq.h"
-#endif
#include <qgfx_qws.h>
#include <qmainwindow.h>
#include <qmessagebox.h>
@@ -167,14 +164,13 @@ void DesktopApplication::receive( const QCString &msg, const QByteArray &data )
if (msg == "keyRegister(int key, QString channel, QString message)")
{
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));
}
else if (msg == "suspend()"){
emit power();
@@ -199,12 +195,14 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
{
KeyRegisterList::Iterator it;
for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it )
{
- if ((*it).getKeyCode() == ke->simpleData.keycode && !autoRepeat)
+ if ((*it).getKeyCode() == ke->simpleData.keycode && !autoRepeat) {
+ if(press) qDebug("press"); else qDebug("release");
QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8());
}
}
+ }
if ( !keyboardGrabbed() ) {
if ( ke->simpleData.keycode == Key_F9 ) {
if ( press ) emit datebook();
@@ -740,12 +738,17 @@ 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");
}
void Desktop::keyClick()
{
@@ -765,8 +768,9 @@ void Desktop::screenClick()
void Desktop::soundAlarm()
{
#ifdef CUSTOM_SOUND_ALARM
+ if (alarmsound)
CUSTOM_SOUND_ALARM;
#endif
}
diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h
index e094dc0..9bc4be9 100644
--- a/core/launcher/desktop.h
+++ b/core/launcher/desktop.h
@@ -127,9 +127,9 @@ private:
TransferServer *transferServer;
PackageSlave *packageSlave;
QDateTime suspendTime;
- bool keyclick,touchclick;
+ bool keyclick,touchclick,alarmsound;
};
#endif // __DESKTOP_H__