+void ExtVideo::initComboBoxItems( QObject *widget )
+{
+ QComboBox *combobox = qobject_cast<QComboBox*>(widget);
+ if( !combobox ) return;
+ QString option = OptionFromWidgetName( widget );
+ module_config_t *p_item = config_FindConfig( VLC_OBJECT(p_intf),
+ option.toStdString().c_str() );
+ if( p_item )
+ {
+ int i_type = p_item->i_type & CONFIG_ITEM;
+ for( int i_index = 0; i_index < p_item->i_list; i_index++ )
+ {
+ if( i_type == CONFIG_ITEM_INTEGER
+ || i_type == CONFIG_ITEM_BOOL )
+ combobox->addItem( qfu( p_item->ppsz_list_text[i_index] ), p_item->pi_list[i_index] );
+ else if( i_type == CONFIG_ITEM_STRING )
+ combobox->addItem( qfu( p_item->ppsz_list_text[i_index] ), p_item->ppsz_list[i_index] );
+ }
+ }
+ else
+ {
+ msg_Err( p_intf, "Couldn't find option \"%s\".",
+ option.toStdString().c_str() );
+ }
+}
+