summaryrefslogtreecommitdiff
path: root/core/settings/button/buttonsettings.cpp
Unidiff
Diffstat (limited to 'core/settings/button/buttonsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/button/buttonsettings.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/settings/button/buttonsettings.cpp b/core/settings/button/buttonsettings.cpp
index 523e295..141e0f6 100644
--- a/core/settings/button/buttonsettings.cpp
+++ b/core/settings/button/buttonsettings.cpp
@@ -193,50 +193,49 @@ void ButtonSettings::keyReleaseEvent ( QKeyEvent *e )
193 m_timer-> stop ( ); 193 m_timer-> stop ( );
194 edit ( bi, false ); 194 edit ( bi, false );
195 } 195 }
196 else 196 else
197 QDialog::keyReleaseEvent ( e ); 197 QDialog::keyReleaseEvent ( e );
198} 198}
199 199
200void ButtonSettings::keyTimeout ( ) 200void ButtonSettings::keyTimeout ( )
201{ 201{
202 if ( m_last_button ) { 202 if ( m_last_button ) {
203 edit ( m_last_button, true ); 203 edit ( m_last_button, true );
204 m_last_button = false; 204 m_last_button = false;
205 } 205 }
206} 206}
207 207
208void ButtonSettings::edit ( buttoninfo *bi, bool hold ) 208void ButtonSettings::edit ( buttoninfo *bi, bool hold )
209{ 209{
210 210
211 if ( m_lock ) 211 if ( m_lock )
212 return; 212 return;
213 m_lock = true; 213 m_lock = true;
214 214
215 RemapDlg *d = new RemapDlg ( bi-> m_button, hold, this ); 215 RemapDlg *d = new RemapDlg ( bi-> m_button, hold, this );
216 216
217 d-> showMaximized ( ); 217 if ( QPEApplication::execDialog ( d ) == QDialog::Accepted ) {
218 if ( d-> exec ( ) == QDialog::Accepted ) {
219 218
220 219
221 if ( hold ) { 220 if ( hold ) {
222 bi-> m_hmsg = d-> message ( ); 221 bi-> m_hmsg = d-> message ( );
223 bi-> m_hdirty = true; 222 bi-> m_hdirty = true;
224 } 223 }
225 else { 224 else {
226 bi-> m_pmsg = d-> message ( ); 225 bi-> m_pmsg = d-> message ( );
227 bi-> m_pdirty = true; 226 bi-> m_pdirty = true;
228 } 227 }
229 228
230 updateLabels ( ); 229 updateLabels ( );
231 } 230 }
232 231
233 delete d; 232 delete d;
234 233
235 m_lock = false; 234 m_lock = false;
236} 235}
237 236
238void ButtonSettings::accept ( ) 237void ButtonSettings::accept ( )
239{ 238{
240 for ( QListIterator <buttoninfo> it ( m_infos ); *it; ++it ) { 239 for ( QListIterator <buttoninfo> it ( m_infos ); *it; ++it ) {
241 buttoninfo *bi = *it; 240 buttoninfo *bi = *it;
242 241