summaryrefslogtreecommitdiff
path: root/core
authorllornkcor <llornkcor>2002-05-23 02:01:23 (UTC)
committer llornkcor <llornkcor>2002-05-23 02:01:23 (UTC)
commit7cec3bc3d3b8945e80c9171b9173d3d2dbdd2eaf (patch) (unidiff)
tree6c196a83ee8688a692e843279dae918960418163 /core
parentae177d167999f204a968ea21ae4a4a804d939e6d (diff)
downloadopie-7cec3bc3d3b8945e80c9171b9173d3d2dbdd2eaf.zip
opie-7cec3bc3d3b8945e80c9171b9173d3d2dbdd2eaf.tar.gz
opie-7cec3bc3d3b8945e80c9171b9173d3d2dbdd2eaf.tar.bz2
make sound conform to sharps sense of conf
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp28
-rw-r--r--core/launcher/desktop.h4
2 files changed, 18 insertions, 14 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
742void Desktop::rereadVolumes() 740void 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
750void Desktop::keyClick() 753void Desktop::keyClick()
@@ -766,6 +769,7 @@ void Desktop::screenClick()
766void Desktop::soundAlarm() 769void 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
@@ -75,7 +75,7 @@ private:
75 DesktopPowerAlerter *pa; 75 DesktopPowerAlerter *pa;
76 PowerStatus *ps; 76 PowerStatus *ps;
77 QTimer *cardSendTimer; 77 QTimer *cardSendTimer;
78 QCopChannel *channel; 78 QCopChannel *channel;
79}; 79};
80 80
81 81
@@ -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