#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_GetMainModule( p_intf );
+ module_t *p_module = module_get_main();
/* Initialisation and get the confsize */
PrefsItemData *data = NULL;
PrefsItemData *data_sub = NULL;
QTreeWidgetItem *current_item = NULL;
unsigned confsize;
- module_config_t *const p_config = module_GetConfig (p_module, &confsize);
+ module_config_t *const p_config = module_config_get (p_module, &confsize);
/* Go through the list of conf */
for( size_t i = 0; i < confsize; i++ )
/* Other items don't need yet a place on the tree */
}
}
- module_PutConfig( p_config );
- vlc_object_release( (vlc_object_t*)p_module );
+ module_config_free( p_config );
+ 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_IsMainModule( p_module) ) continue;
+ if( module_is_main( p_module) ) continue;
+
+ unsigned confsize;
+ int i_subcategory = 0, i_category = 0;
- unsigned i_subcategory = 0, i_category = 0, confsize;
bool b_options = false;
- module_config_t *const p_config = module_GetConfig (p_module, &confsize);
+ module_config_t *const p_config = module_config_get (p_module, &confsize);
/* Loop through the configurations items */
for (size_t i = 0; i < confsize; i++)
if( b_options && i_category && i_subcategory )
break;
}
- module_PutConfig (p_config);
+ module_config_free (p_config);
/* Dummy item, please proceed */
if( !b_options || i_category == 0 || i_subcategory == 0 ) continue;
PrefsItemData *module_data = new PrefsItemData();
module_data->i_type = TYPE_MODULE;
- module_data->psz_name = strdup( module_GetObjName( p_module ) );
+ module_data->psz_name = strdup( module_get_object( p_module ) );
module_data->help.clear();
QTreeWidgetItem *module_item = new QTreeWidgetItem();
- module_item->setText( 0, qtr( module_GetName( p_module, false ) ) );
+ module_item->setText( 0, qtr( module_get_name( p_module, false ) ) );
module_item->setData( 0, Qt::UserRole,
QVariant::fromValue( module_data) );
module_item->setSizeHint( 0, QSize( -1, ITEM_HEIGHT ) );
/* 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_GetMainModule( p_intf );
+ p_module = module_get_main();
assert( p_module );
}
unsigned confsize;
- module_config_t *const p_config = module_GetConfig (p_module, &confsize),
+ module_config_t *const p_config = module_config_get (p_module, &confsize),
*p_item = p_config,
*p_end = p_config + confsize;
{
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++;
}
}
else
{
- const char *psz_help = module_GetHelp (p_module);
+ const char *psz_help = module_get_help (p_module);
head = QString( qtr( module_GetLongName( p_module ) ) );
if( psz_help )
{
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();
}