X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fcomponents%2Fpreferences.cpp;h=54ba38b57d73549dc99ed3f76d9f794719510511;hb=bfffe8bfbce5ec499f4ab04f89c18b4b3752df93;hp=aeba7bb91e3991187cb72b34e70780866d85ec18;hpb=d5d5ebfa1834a3601e1f15969b06c7d6c949c6b8;p=vlc diff --git a/modules/gui/qt4/components/preferences.cpp b/modules/gui/qt4/components/preferences.cpp index aeba7bb91e..54ba38b57d 100644 --- a/modules/gui/qt4/components/preferences.cpp +++ b/modules/gui/qt4/components/preferences.cpp @@ -159,7 +159,7 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) : continue; } data = new PrefsItemData(); - data->name = QString( qfu( config_CategoryNameGet( + data->name = QString( qfu( config_CategoryNameGet( p_item->i_value)) ); psz_help = config_CategoryHelpGet( p_item->i_value ); if( psz_help ) @@ -413,7 +413,7 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, QLabel *label = new QLabel( head ); global_layout->addWidget( label ); - QFont myFont = QApplication::font(0); + QFont myFont = QApplication::font( static_cast(0) ); myFont.setPointSize( myFont.pointSize() + 3 ); myFont.setBold( true ); label->setFont( myFont ); @@ -431,6 +431,7 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, QGridLayout *layout = new QGridLayout(); int i_line = 0, i_boxline = 0; + bool has_hotkey = false; if( p_item ) do { @@ -454,6 +455,13 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, box = new QGroupBox( qfu(p_item->psz_text) ); boxlayout = new QGridLayout(); } + /* Only one hotkey control */ + if( has_hotkey && p_item->i_type & CONFIG_ITEM && p_item->psz_name && + strstr( p_item->psz_name, "key-" ) ) + continue; + if( p_item->i_type & CONFIG_ITEM && p_item->psz_name && + strstr( p_item->psz_name, "key-" ) ) + has_hotkey = true; ConfigControl *control; if( ! box ) @@ -465,6 +473,13 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, if( !control ) continue; + if( has_hotkey ) + { + /* A hotkey widget takes 2 lines */ + if( box ) i_boxline ++; + else i_line++; + } + if( box ) i_boxline++; else i_line++; controls.append( control );