author | groucho <groucho> | 2003-03-19 11:36:34 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-03-19 11:36:34 (UTC) |
commit | 28be0fcc9bda71175c3ee17e79fce2ac24340ff2 (patch) (side-by-side diff) | |
tree | f09c80460e4f0219eb308d612a2e67df57f2c254 /core/launcher | |
parent | 18c6c51705de3b1897f671e54b25929e74d11f23 (diff) | |
download | opie-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
-rw-r--r-- | core/launcher/desktop.cpp | 25 | ||||
-rw-r--r-- | core/launcher/desktop.h | 2 |
2 files changed, 18 insertions, 9 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 @@ -344,3 +344,3 @@ 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 ) { @@ -349,4 +349,9 @@ void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc 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; } @@ -355,6 +360,10 @@ void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc 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; } @@ -362,2 +371,3 @@ void DesktopApplication::checkButtonAction ( const ODeviceButton *db, int /*keyc } + return true; } @@ -372,4 +382,3 @@ bool DesktopApplication::eventFilter ( QObject *o, QEvent *e ) 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 ( )); } diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h index db0173e..4024c38 100644 --- a/core/launcher/desktop.h +++ b/core/launcher/desktop.h @@ -85,3 +85,3 @@ protected: virtual bool eventFilter ( QObject *o, QEvent *e ); - void checkButtonAction ( const Opie::ODeviceButton *db, int keycode, bool press, bool autoRepeat ); + bool checkButtonAction ( const Opie::ODeviceButton *db, int keycode, bool press, bool autoRepeat ); |