summaryrefslogtreecommitdiff
path: root/core/launcher/desktop.cpp
authorgroucho <groucho>2003-03-19 11:36:34 (UTC)
committer groucho <groucho>2003-03-19 11:36:34 (UTC)
commit28be0fcc9bda71175c3ee17e79fce2ac24340ff2 (patch) (side-by-side diff)
treef09c80460e4f0219eb308d612a2e67df57f2c254 /core/launcher/desktop.cpp
parent18c6c51705de3b1897f671e54b25929e74d11f23 (diff)
downloadopie-28be0fcc9bda71175c3ee17e79fce2ac24340ff2.zip
opie-28be0fcc9bda71175c3ee17e79fce2ac24340ff2.tar.gz
opie-28be0fcc9bda71175c3ee17e79fce2ac24340ff2.tar.bz2
Fixed bug #744 where non mapped buttons in buttonsettings were not saved by introducing the "
ignore" statement. Also removed unsed debug code
Diffstat (limited to 'core/launcher/desktop.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 59f2aea..fbcce7c 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -342,24 +342,34 @@ void DesktopApplication::sendHeldAction ( )
-void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keycode*/, bool press, bool autoRepeat )
+bool DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keycode*/, bool press, bool autoRepeat )
{
if ( db ) {
if ( !press && !autoRepeat && m_button_timer-> isActive ( )) {
m_button_timer-> stop ( );
- if ( !db-> pressedAction ( ). channel ( ). isEmpty ( )) {
- db-> pressedAction ( ). send ( );
+
+ if (!db-> pressedAction ( ). channel ( ) .isEmpty())
+ {
+ if ( db-> pressedAction ( ). channel ( )!="ignore") {
+ db-> pressedAction ( ). send ( );
+ }
+ else return false;
}
}
else if ( press && !autoRepeat ) {
m_button_timer-> stop ( );
+ if (!db-> pressedAction ( ). channel ( ) .isEmpty())
+ {
- if ( !db-> heldAction ( ). channel ( ). isEmpty ( )) {
- m_last_button = db;
- m_button_timer-> start ( ODevice::inst ( )-> buttonHoldTime ( ), true );
+ if ( db-> heldAction ( ). channel ( )!="ignore") {
+ m_last_button = db;
+ m_button_timer-> start ( ODevice::inst ( )-> buttonHoldTime ( ), true );
+ }
+ else return false;
}
}
}
+ return true;
}
bool DesktopApplication::eventFilter ( QObject *o, QEvent *e )
@@ -370,8 +380,7 @@ bool DesktopApplication::eventFilter ( QObject *o, QEvent *e )
const ODeviceButton *db = ODevice::inst ( )-> buttonForKeycode ( ke-> key ( ));
if ( db ) {
- checkButtonAction ( db, ke-> key ( ), e-> type ( ) == QEvent::KeyPress, ke-> isAutoRepeat ( ));
- return true;
+ return checkButtonAction ( db, ke-> key ( ), e-> type ( ) == QEvent::KeyPress, ke-> isAutoRepeat ( ));
}
}
return QPEApplication::eventFilter ( o, e );