summaryrefslogtreecommitdiff
path: root/core
authorllornkcor <llornkcor>2002-05-19 16:35:56 (UTC)
committer llornkcor <llornkcor>2002-05-19 16:35:56 (UTC)
commit602ff2a6f588584bf47afa6faae08ce60b49047f (patch) (unidiff)
treec319da92b22a1a81be1e52f5bf2fe855d646cae3 /core
parent7b05e648c1f7c29dee80d5731aacaab1a1b01b05 (diff)
downloadopie-602ff2a6f588584bf47afa6faae08ce60b49047f.zip
opie-602ff2a6f588584bf47afa6faae08ce60b49047f.tar.gz
opie-602ff2a6f588584bf47afa6faae08ce60b49047f.tar.bz2
don't send keyRegister QCop message if autoRepeated, and fixed spelling error
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/desktop.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index d5c16b3..85ba160 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -170,55 +170,55 @@ void DesktopApplication::receive( const QCString &msg, const QByteArray &data )
170 stream >> c; 170 stream >> c;
171 stream >> m; 171 stream >> m;
172 172
173 qWarning("KeyRegisterRecieved: %i, %s, %s", k, (const char*)c, (const char *)m); 173 qWarning("KeyRegisterRecieved: %i, %s, %s", k, (const char*)c, (const char *)m);
174 keyRegisterList.append(QCopKeyRegister(k,c,m)); 174 keyRegisterList.append(QCopKeyRegister(k,c,m));
175 } 175 }
176 else if (msg == "suspend()"){ 176 else if (msg == "suspend()"){
177 emit power(); 177 emit power();
178 } 178 }
179 179
180} 180}
181 181
182enum MemState { Unknown, VeryLow, Low, Normal } memstate=Unknown; 182enum MemState { Unknown, VeryLow, Low, Normal } memstate=Unknown;
183 183
184#ifdef Q_WS_QWS 184#ifdef Q_WS_QWS
185bool DesktopApplication::qwsEventFilter( QWSEvent *e ) 185bool DesktopApplication::qwsEventFilter( QWSEvent *e )
186{ 186{
187 qpedesktop->checkMemory(); 187 qpedesktop->checkMemory();
188 188
189 if ( e->type == QWSEvent::Key ) { 189 if ( e->type == QWSEvent::Key ) {
190 QWSKeyEvent *ke = (QWSKeyEvent *)e; 190 QWSKeyEvent *ke = (QWSKeyEvent *)e;
191 if ( !loggedin && ke->simpleData.keycode != Key_F34 ) 191 if ( !loggedin && ke->simpleData.keycode != Key_F34 )
192 return TRUE; 192 return TRUE;
193 bool press = ke->simpleData.is_press; 193 bool press = ke->simpleData.is_press;
194 194 bool autoRepeat = ke ->simpleData.is_auto_repeat;
195 if (!keyRegisterList.isEmpty()) 195 if (!keyRegisterList.isEmpty())
196 { 196 {
197 KeyRegisterList::Iterator it; 197 KeyRegisterList::Iterator it;
198 for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) 198 for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it )
199 { 199 {
200 if ((*it).getKeyCode() == ke->simpleData.keycode) 200 if ((*it).getKeyCode() == ke->simpleData.keycode && !autoRepeat)
201 QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8()); 201 QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8());
202 } 202 }
203 } 203 }
204 204
205 if ( !keyboardGrabbed() ) { 205 if ( !keyboardGrabbed() ) {
206 if ( ke->simpleData.keycode == Key_F9 ) { 206 if ( ke->simpleData.keycode == Key_F9 ) {
207 if ( press ) emit datebook(); 207 if ( press ) emit datebook();
208 return TRUE; 208 return TRUE;
209 } 209 }
210 if ( ke->simpleData.keycode == Key_F10 ) { 210 if ( ke->simpleData.keycode == Key_F10 ) {
211 if ( !press && cardSendTimer ) { 211 if ( !press && cardSendTimer ) {
212 emit contacts(); 212 emit contacts();
213 delete cardSendTimer; 213 delete cardSendTimer;
214 } else if ( press ) { 214 } else if ( press ) {
215 cardSendTimer = new QTimer(); 215 cardSendTimer = new QTimer();
216 cardSendTimer->start( 2000, TRUE ); 216 cardSendTimer->start( 2000, TRUE );
217 connect( cardSendTimer, SIGNAL( timeout() ), this, SLOT( sendCard() ) ); 217 connect( cardSendTimer, SIGNAL( timeout() ), this, SLOT( sendCard() ) );
218 } 218 }
219 return TRUE; 219 return TRUE;
220 } 220 }
221 /* menu key now opens application menu/toolbar 221 /* menu key now opens application menu/toolbar
222 if ( ke->simpleData.keycode == Key_F11 ) { 222 if ( ke->simpleData.keycode == Key_F11 ) {
223 if ( press ) emit menu(); 223 if ( press ) emit menu();
224 return TRUE; 224 return TRUE;