summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_simpad.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_simpad.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_simpad.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp
index 6c3253c..bf46e43 100644
--- a/libopie2/opiecore/device/odevice_simpad.cpp
+++ b/libopie2/opiecore/device/odevice_simpad.cpp
@@ -138,26 +138,25 @@ void SIMpad::init(const QString&)
138 m_leds [0] = m_leds [1] = Led_Off; 138 m_leds [0] = m_leds [1] = Led_Off;
139 139
140 m_power_timer = 0; 140 m_power_timer = 0;
141 141
142} 142}
143 143
144void SIMpad::initButtons() 144void SIMpad::initButtons()
145{ 145{
146 if ( d->m_buttons ) 146 if ( d->m_buttons )
147 return; 147 return;
148 148
149 if ( isQWS( ) ) { 149 if ( isQWS( ) ) {
150 Opie::Core::OKeyFilter::inst()->addPreHandler(this); 150 addPreHandler(this);
151// QWSServer::setKeyboardFilter ( this );
152 } 151 }
153 152
154 153
155 d->m_buttons = new QValueList <ODeviceButton>; 154 d->m_buttons = new QValueList <ODeviceButton>;
156 155
157 for ( uint i = 0; i < ( sizeof( simpad_buttons ) / sizeof( s_button )); i++ ) { 156 for ( uint i = 0; i < ( sizeof( simpad_buttons ) / sizeof( s_button )); i++ ) {
158 s_button *sb = simpad_buttons + i; 157 s_button *sb = simpad_buttons + i;
159 ODeviceButton b; 158 ODeviceButton b;
160 159
161 if (( sb->model & d->m_model ) == d->m_model ) { 160 if (( sb->model & d->m_model ) == d->m_model ) {
162 b. setKeycode ( sb->code ); 161 b. setKeycode ( sb->code );
163 b. setUserText ( QObject::tr ( "Button", sb->utext )); 162 b. setUserText ( QObject::tr ( "Button", sb->utext ));