-rw-r--r-- | libopie/odevice.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 9e97c56..d5e3c5c 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -282,3 +282,2 @@ void ODevice::init ( ) b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); - d-> m_buttons. append ( b ); @@ -520,2 +519,3 @@ void ODevice::reloadButtonMapping ( ) b. setPressedAction ( OQCopMessage ( pch, pm, pdata )); + b. setHeldAction ( OQCopMessage ( hch, hm, hdata )); @@ -526,2 +526,4 @@ void ODevice::remapPressedAction ( int button, const OQCopMessage &action ) { + QString mb_chan; + if ( button >= (int) d-> m_buttons. count ( )) @@ -529,2 +531,3 @@ void ODevice::remapPressedAction ( int button, const OQCopMessage &action ) + ODeviceButton &b = d-> m_buttons [button]; @@ -532,5 +535,7 @@ void ODevice::remapPressedAction ( int button, const OQCopMessage &action ) + mb_chan=b. pressedAction ( ). channel ( ); + Config buttonFile ( "ButtonSettings" ); buttonFile. setGroup ( "Button" + QString::number ( button )); - buttonFile. writeEntry ( "PressedActionChannel", (const char*) b. pressedAction ( ). channel ( )); + buttonFile. writeEntry ( "PressedActionChannel", (const char*) mb_chan); buttonFile. writeEntry ( "PressedActionMessage", (const char*) b. pressedAction ( ). message ( )); |