Diffstat (limited to 'core/settings/button/remapdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/button/remapdlg.cpp | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/core/settings/button/remapdlg.cpp b/core/settings/button/remapdlg.cpp index a251bd4..b6ee60b 100644 --- a/core/settings/button/remapdlg.cpp +++ b/core/settings/button/remapdlg.cpp @@ -61,3 +61,14 @@ RemapDlg::RemapDlg ( const Opie::ODeviceButton *b, bool hold, QWidget *parent, c ((NoSortItem *) m_map_preset )-> setDefault ( true ); - m_map_custom = new NoSortItem ( w_list, 2, tr( "Custom" ), m_msg. channel ( ), m_msg. message ( )); + + if (m_msg. channel ( ) == "ignore") + { + m_map_custom = new NoSortItem ( w_list, 2, tr( "Custom" ), m_msg_preset. channel ( ), m_msg_preset. message ( )); + + m_current = m_map_none; + } + else + { + m_map_custom = new NoSortItem ( w_list, 2, tr( "Custom" ), m_msg. channel ( ), m_msg. message ( )); + m_current = m_map_custom; + } @@ -69,3 +80,2 @@ RemapDlg::RemapDlg ( const Opie::ODeviceButton *b, bool hold, QWidget *parent, c - m_current = m_map_custom; w_list-> setCurrentItem ( m_current ); @@ -99,6 +109,14 @@ void RemapDlg::itemChanged ( QListViewItem *it ) if ( it == m_map_none ) - m_msg = m = OQCopMessage ( 0, 0 ); + { + m_msg = m = OQCopMessage ( "ignore", 0 ); + qDebug ("***ignoring"); + } else if ( it == m_map_preset ) + { m_msg = m = m_msg_preset; - else if ( it && !it-> childCount ( )) { + qDebug ("***Preset"); + } + else if ( it && !it-> childCount ( )) + { + qDebug ("***Custom: %s %s ",it-> text ( 1 ). latin1 ( ), it-> text ( 2 ). latin1 ( )); enabled = ( it == m_map_custom ); |