assert (i < (unsigned)p_list->i_count);
const module_t *p_main = (module_t *)p_list->p_values[i].p_object;
- if( strcmp( p_main->psz_object_name, "main" ) == 0 )
+ if( strcmp( module_GetObjName( p_main ), "main" ) == 0 )
p_module = p_main;
}
p_module = (module_t *)p_list->p_values[i_index].p_object;
// Main module excluded
- if( !strcmp( p_module->psz_object_name, "main" ) ) continue;
+ if( !strcmp( module_GetObjName( p_module ), "main" ) ) continue;
/* Exclude submodules; they have no config options of their own */
if( p_module->b_submodule ) continue;
PrefsItemData *module_data = new PrefsItemData();
module_data->b_submodule = p_module->b_submodule;
module_data->i_type = TYPE_MODULE;
- module_data->psz_name = strdup( p_module->psz_object_name );
+ module_data->psz_name = strdup( module_GetObjName( p_module ) );
module_data->i_object_id = p_module->b_submodule ?
((module_t *)p_module->p_parent)->i_object_id :
p_module->i_object_id;
module_data->help.clear();
// TODO image
QTreeWidgetItem *module_item = new QTreeWidgetItem();
- module_item->setText( 0, qtr( p_module->psz_shortname ?
- p_module->psz_shortname : p_module->psz_object_name) );
+ module_item->setText( 0, qtr( module_GetName( p_module, VLC_FALSE ) ) );
//item->setIcon( 0 , XXX );
module_item->setData( 0, Qt::UserRole,
QVariant::fromValue( module_data) );
}
else
{
- head = QString( qtr(p_module->psz_longname) );
+ head = QString( qtr( module_GetLongName( p_module ) ) );
if( p_module->psz_help )
{
help.append( "\n" );
- help.append( qtr( p_module->psz_help ) );
+ help.append( qtr( module_GetHelp( p_module ) ) );
}
}
if( bycat )
{
- if( !strcmp( p_parser->psz_object_name, "main" ) ) continue;
+ if( !strcmp( module_GetObjName( p_parser ), "main" ) ) continue;
for (size_t i = 0; i < p_parser->confsize; i++)
{
/* Hack: required subcategory is stored in i_min */
if( p_config->i_type == CONFIG_SUBCATEGORY &&
p_config->value.i == p_item->min.i )
- combo->addItem( qtr(p_parser->psz_longname),
- QVariant( p_parser->psz_object_name ) );
+ combo->addItem( qtr( module_GetLongName( p_parser )),
+ QVariant( module_GetObjName( p_parser ) ) );
if( p_item->value.psz && !strcmp( p_item->value.psz,
- p_parser->psz_object_name) )
+ module_GetObjName( p_parser ) ) )
combo->setCurrentIndex( combo->count() - 1 );
}
}
else if( module_IsCapable( p_parser, p_item->psz_type ) )
{
- combo->addItem( qtr(p_parser->psz_longname),
- QVariant( p_parser->psz_object_name ) );
+ combo->addItem( qtr(module_GetLongName( p_parser ) ),
+ QVariant( module_GetObjName( p_parser ) ) );
if( p_item->value.psz && !strcmp( p_item->value.psz,
- p_parser->psz_object_name) )
+ module_GetObjName( p_parser ) ) )
combo->setCurrentIndex( combo->count() - 1 );
}
}
#define CHECKBOX_LISTS \
{ \
- QCheckBox *cb = new QCheckBox( qtr( p_parser->psz_longname ) );\
+ QCheckBox *cb = new QCheckBox( qtr( module_GetLongName( p_parser ) ) );\
checkBoxListItem *cbl = new checkBoxListItem; \
\
CONNECT( cb, stateChanged( int ), this, onUpdate( int ) );\
- cb->setToolTip( formatTooltip( qtr(p_parser->psz_longname)) );\
+ cb->setToolTip( formatTooltip( qtr( module_GetLongName( p_parser ))));\
cbl->checkBox = cb; \
\
int i = -1; \
i--; \
\
cbl->psz_module = strdup( i>=0?p_parser->pp_shortcuts[i] \
- : p_parser->psz_object_name ); \
+ : module_GetObjName( p_parser ) ); \
modules.push_back( cbl ); \
}
if( bycat )
{
- if( !strcmp( p_parser->psz_object_name, "main" ) ) continue;
+ if( !strcmp( module_GetObjName( p_parser ), "main" ) ) continue;
for (size_t i = 0; i < p_parser->confsize; i++)
{
* Copyright (C) 2006-2007 the VideoLAN team
* $Id$
*
- * Authors: Clément Stenac <zorglub@videolan.org>
+ * Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Baptiste Kempf <jb@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
if( !module_IsCapable( p_parser, "services_discovery" ) )
continue;
- QAction *a = new QAction( qfu( p_parser->psz_longname ), menu );
+ QAction *a = new QAction( qfu( module_GetLongName( p_parser ) ), menu );
a->setCheckable( true );
/* hack to handle submodules properly */
int i = -1;
while( p_parser->pp_shortcuts[++i] != NULL );
i--;
if( playlist_IsServicesDiscoveryLoaded( THEPL,
- i>=0?p_parser->pp_shortcuts[i]
- : p_parser->psz_object_name ) )
+ p_parser->pp_shortcuts[i] ?: module_GetObjName( p_parser ) ) )
a->setChecked( true );
CONNECT( a , triggered(), THEDP->SDMapper, map() );
THEDP->SDMapper->setMapping( a, i>=0? p_parser->pp_shortcuts[i] :
- p_parser->psz_object_name );
+ module_GetObjName( p_parser ) );
menu->addAction( a );
}
vlc_list_release( p_list );