summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-05-19 16:35:56 (UTC)
committer llornkcor <llornkcor>2002-05-19 16:35:56 (UTC)
commit602ff2a6f588584bf47afa6faae08ce60b49047f (patch) (side-by-side diff)
treec319da92b22a1a81be1e52f5bf2fe855d646cae3
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 (more/less context) (ignore 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 )
stream >> c;
stream >> m;
qWarning("KeyRegisterRecieved: %i, %s, %s", k, (const char*)c, (const char *)m);
keyRegisterList.append(QCopKeyRegister(k,c,m));
}
else if (msg == "suspend()"){
emit power();
}
}
enum MemState { Unknown, VeryLow, Low, Normal } memstate=Unknown;
#ifdef Q_WS_QWS
bool DesktopApplication::qwsEventFilter( QWSEvent *e )
{
qpedesktop->checkMemory();
if ( e->type == QWSEvent::Key ) {
QWSKeyEvent *ke = (QWSKeyEvent *)e;
if ( !loggedin && ke->simpleData.keycode != Key_F34 )
return TRUE;
bool press = ke->simpleData.is_press;
-
+ bool autoRepeat = ke ->simpleData.is_auto_repeat;
if (!keyRegisterList.isEmpty())
{
KeyRegisterList::Iterator it;
for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it )
{
- if ((*it).getKeyCode() == ke->simpleData.keycode)
+ if ((*it).getKeyCode() == ke->simpleData.keycode && !autoRepeat)
QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8());
}
}
if ( !keyboardGrabbed() ) {
if ( ke->simpleData.keycode == Key_F9 ) {
if ( press ) emit datebook();
return TRUE;
}
if ( ke->simpleData.keycode == Key_F10 ) {
if ( !press && cardSendTimer ) {
emit contacts();
delete cardSendTimer;
} else if ( press ) {
cardSendTimer = new QTimer();
cardSendTimer->start( 2000, TRUE );
connect( cardSendTimer, SIGNAL( timeout() ), this, SLOT( sendCard() ) );
}
return TRUE;
}
/* menu key now opens application menu/toolbar
if ( ke->simpleData.keycode == Key_F11 ) {
if ( press ) emit menu();
return TRUE;