-rw-r--r-- | core/launcher/desktop.cpp | 24 | ||||
-rw-r--r-- | core/launcher/desktop.h | 2 |
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 | |||
@@ -41,9 +41,6 @@ | |||
41 | #ifdef QT_QWS_CUSTOM | 41 | #ifdef QT_QWS_CUSTOM |
42 | #include "qpe/custom.h" | 42 | #include "qpe/custom.h" |
43 | #endif | 43 | #endif |
44 | #if defined(QT_QWS_IPAQ) | ||
45 | #include "qpe/custom-ipaq.h" | ||
46 | #endif | ||
47 | 44 | ||
48 | #include <qgfx_qws.h> | 45 | #include <qgfx_qws.h> |
49 | #include <qmainwindow.h> | 46 | #include <qmainwindow.h> |
@@ -168,12 +165,11 @@ void DesktopApplication::receive( const QCString &msg, const QByteArray &data ) | |||
168 | { | 165 | { |
169 | int k; | 166 | int k; |
170 | QString c, m; | 167 | QString c, m; |
171 | |||
172 | stream >> k; | 168 | stream >> k; |
173 | stream >> c; | 169 | stream >> c; |
174 | stream >> m; | 170 | stream >> m; |
175 | 171 | ||
176 | qWarning("KeyRegisterRecieved: %i, %s, %s", k, (const char*)c, (const char *)m); | 172 | qWarning("KeyRegisterReceived: %i, %s, %s", k, (const char*)c, (const char *)m ); |
177 | keyRegisterList.append(QCopKeyRegister(k,c,m)); | 173 | keyRegisterList.append(QCopKeyRegister(k,c,m)); |
178 | } | 174 | } |
179 | else if (msg == "suspend()"){ | 175 | else if (msg == "suspend()"){ |
@@ -200,10 +196,12 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) | |||
200 | KeyRegisterList::Iterator it; | 196 | KeyRegisterList::Iterator it; |
201 | for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) | 197 | for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) |
202 | { | 198 | { |
203 | if ((*it).getKeyCode() == ke->simpleData.keycode && !autoRepeat) | 199 | if ((*it).getKeyCode() == ke->simpleData.keycode && !autoRepeat) { |
200 | if(press) qDebug("press"); else qDebug("release"); | ||
204 | QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8()); | 201 | QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8()); |
205 | } | 202 | } |
206 | } | 203 | } |
204 | } | ||
207 | 205 | ||
208 | if ( !keyboardGrabbed() ) { | 206 | if ( !keyboardGrabbed() ) { |
209 | if ( ke->simpleData.keycode == Key_F9 ) { | 207 | if ( ke->simpleData.keycode == Key_F9 ) { |
@@ -741,10 +739,15 @@ void Desktop::terminateServers() | |||
741 | 739 | ||
742 | void Desktop::rereadVolumes() | 740 | void Desktop::rereadVolumes() |
743 | { | 741 | { |
744 | Config cfg("Sound"); | 742 | Config cfg("qpe"); |
745 | cfg.setGroup("System"); | 743 | cfg.setGroup("Volume"); |
746 | touchclick = cfg.readBoolEntry("Touch"); | 744 | touchclick = cfg.readBoolEntry("TouchSound"); |
747 | keyclick = cfg.readBoolEntry("Key"); | 745 | keyclick = cfg.readBoolEntry("KeySound"); |
746 | alarmsound = cfg.readBoolEntry("AlarmSound"); | ||
747 | // Config cfg("Sound"); | ||
748 | // cfg.setGroup("System"); | ||
749 | // touchclick = cfg.readBoolEntry("Touch"); | ||
750 | // keyclick = cfg.readBoolEntry("Key"); | ||
748 | } | 751 | } |
749 | 752 | ||
750 | void Desktop::keyClick() | 753 | void Desktop::keyClick() |
@@ -766,6 +769,7 @@ void Desktop::screenClick() | |||
766 | void Desktop::soundAlarm() | 769 | void Desktop::soundAlarm() |
767 | { | 770 | { |
768 | #ifdef CUSTOM_SOUND_ALARM | 771 | #ifdef CUSTOM_SOUND_ALARM |
772 | if (alarmsound) | ||
769 | CUSTOM_SOUND_ALARM; | 773 | CUSTOM_SOUND_ALARM; |
770 | #endif | 774 | #endif |
771 | } | 775 | } |
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 | |||
@@ -128,7 +128,7 @@ private: | |||
128 | PackageSlave *packageSlave; | 128 | PackageSlave *packageSlave; |
129 | 129 | ||
130 | QDateTime suspendTime; | 130 | QDateTime suspendTime; |
131 | bool keyclick,touchclick; | 131 | bool keyclick,touchclick,alarmsound; |
132 | }; | 132 | }; |
133 | 133 | ||
134 | 134 | ||