#include <QGroupBox>
#include <QScrollArea>
#include <QVBoxLayout>
-#include <QHBoxLayout>
#include <QGridLayout>
#include <QHeaderView>
-#include <QPalette>
-#include <QColor>
#include "components/complete_preferences.hpp"
#include "components/preferences_widgets.hpp"
setTextElideMode( Qt::ElideNone );
/* Nice icons */
-#define BI( a,b) QIcon a##_icon = QIcon( QPixmap( b ))
- BI( audio, ":/advprefs_audio" );
- BI( video, ":/advprefs_video" );
- BI( input, ":/advprefs_codec" );
- BI( sout, ":/advprefs_sout" );
- BI( advanced, ":/advprefs_extended" );
- BI( playlist, ":/advprefs_playlist" );
- BI( interface, ":/advprefs_intf" );
+#define BI( a,b) QIcon a##_icon = QIcon( b )
+ BI( audio, ":/prefsmenu/advanced/audio" );
+ BI( video, ":/prefsmenu/advanced/video" );
+ BI( input, ":/prefsmenu/advanced/codec" );
+ BI( sout, ":/prefsmenu/advanced/sout" );
+ BI( advanced, ":/prefsmenu/advanced/extended" );
+ BI( playlist, ":/prefsmenu/advanced/playlist" );
+ BI( interface, ":/prefsmenu/advanced/intf" );
#undef BI
/* Build the tree for the main module */
- module_t *p_module = module_get_main( p_intf );
+ module_t *p_module = module_get_main();
/* Initialisation and get the confsize */
PrefsItemData *data = NULL;
module_release( p_module );
- vlc_list_t *p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE,
- FIND_ANYWHERE );
+ module_t **p_list = module_list_get( NULL );
/* Build the tree of plugins */
- for( int i_index = 0; i_index < p_list->i_count; i_index++ )
+ for( size_t i = 0; (p_module = p_list[i]) != NULL; i++ )
{
- /* Take every module */
- p_module = (module_t *)p_list->p_values[i_index].p_object;
-
// Main module excluded
if( module_is_main( p_module) ) continue;
- unsigned i_subcategory = 0, i_category = 0, confsize;
+ unsigned confsize;
+ int i_subcategory = 0, i_category = 0;
+
bool b_options = false;
module_config_t *const p_config = module_config_get (p_module, &confsize);
/* We got everything, just sort a bit */
sortItems( 0, Qt::AscendingOrder );
- vlc_list_release( p_list );
+ module_list_free( p_list );
}
PrefsTree::~PrefsTree() {}
if( data->i_type == TYPE_CATEGORY )
return;
else if( data->i_type == TYPE_MODULE )
- p_module = module_find( p_intf, data->psz_name );
+ p_module = module_find( data->psz_name );
else
{
- p_module = module_get_main( p_intf );
+ p_module = module_get_main();
assert( p_module );
}
{
while (p_item < p_end)
{
- if( p_item->i_type == CONFIG_SUBCATEGORY &&
- ( data->i_type == TYPE_SUBCATEGORY &&
+ if( p_item->i_type == CONFIG_SUBCATEGORY &&
+ ( ( data->i_type == TYPE_SUBCATEGORY &&
p_item->value.i == data->i_object_id ) ||
( data->i_type == TYPE_CATSUBCAT &&
- p_item->value.i == data->i_subcat_id ) )
+ p_item->value.i == data->i_subcat_id ) ) )
break;
p_item++;
}
layout->addWidget( box, i_line, 0, 1, -1 );
i_line++;
}
- box = new QGroupBox( qtr( p_item->psz_text ) );
+ box = new QGroupBox( qtr( p_item->psz_text ), this );
box->hide();
boxlayout = new QGridLayout();
}