-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 | |||
@@ -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()"){ |
@@ -194,14 +190,16 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) | |||
194 | if ( !loggedin && ke->simpleData.keycode != Key_F34 ) | 190 | if ( !loggedin && ke->simpleData.keycode != Key_F34 ) |
195 | return TRUE; | 191 | return TRUE; |
196 | bool press = ke->simpleData.is_press; | 192 | bool press = ke->simpleData.is_press; |
197 | bool autoRepeat = ke ->simpleData.is_auto_repeat; | 193 | bool autoRepeat= ke->simpleData.is_auto_repeat; |
198 | if (!keyRegisterList.isEmpty()) | 194 | if (!keyRegisterList.isEmpty()) |
199 | { | 195 | { |
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) { |
204 | QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8()); | 200 | if(press) qDebug("press"); else qDebug("release"); |
201 | QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8()); | ||
202 | } | ||
205 | } | 203 | } |
206 | } | 204 | } |
207 | 205 | ||
@@ -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 | } |