PrefsDialog *p_prefs_dialog;
wxBoxSizer *p_sizer;
wxWindow *p_parent;
- vlc_bool_t b_advanced;
+ bool b_advanced;
wxPanel *p_current;
virtual ~PrefsPanel() {}
void ApplyChanges();
- void SwitchAdvanced( vlc_bool_t );
+ void SwitchAdvanced( bool );
private:
intf_thread_t *p_intf;
PrefsDialog *p_prefs_dialog;
- vlc_bool_t b_advanced;
+ bool b_advanced;
wxStaticText *hidden_text;
wxBoxSizer *config_sizer;
ConfigTreeData() { b_submodule = 0; panel = NULL; psz_name = NULL;
psz_help = NULL; }
virtual ~ConfigTreeData() {
- if( panel ) delete panel;
- if( psz_name ) free( psz_name );
- if( psz_help ) free( psz_help );
+ delete panel;
+ free( psz_name );
+ free( psz_help );
};
- vlc_bool_t b_submodule;
+ bool b_submodule;
PrefsPanel *panel;
wxBoxSizer *sizer;
+ module_t *p_module;
int i_object_id;
int i_subcat_id;
int i_type;
p_prefs_dialog = _p_prefs_dialog;
p_sizer = _p_sizer;
p_parent = _p_parent;
- b_advanced = VLC_FALSE;
+ b_advanced = false;
root_item = AddRoot( wxT("") );
wxASSERT_MSG(root_item.IsOk(), wxT("Could not add root item"));
for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
p_module = (module_t *)p_list->p_values[i_index].p_object;
- if( !strcmp( module_GetObjName(p_module), "main" ) )
+ if( !strcmp( module_get_object(p_module), "main" ) )
break;
}
if( i_index < p_list->i_count )
/* Enumerate config categories and store a reference so we can
* generate their config panel them when it is asked by the user. */
- p_config = module_GetConfig( p_module, &i_confsize );
+ p_config = module_config_get( p_module, &i_confsize );
for( size_t i = 0; i < i_confsize; i++ )
{
module_config_t *p_item = p_config + i;
GetItemData( current_item );
cd->i_type = TYPE_CATSUBCAT;
cd->i_subcat_id = p_item->value.i;
- if( cd->psz_name ) free( cd->psz_name );
+ free( cd->psz_name );
cd->psz_name = strdup( config_CategoryNameGet(
p_item->value.i ) );
- if( cd->psz_help ) free( cd->psz_help );
+ free( cd->psz_help );
const char *psz_help = config_CategoryHelpGet( p_item->value.i );
if( psz_help )
{
}
}
- module_PutConfig( p_config );
+ module_config_free( p_config );
}
p_module = (module_t *)p_list->p_values[i_index].p_object;
/* Exclude the main module */
- if( !strcmp( module_GetObjName(p_module), "main" ) )
+ if( !strcmp( module_get_object(p_module), "main" ) )
continue;
#if 0
/* Exclude empty plugins (submodules don't have config options, they
if( module_IsSubModule(p_module) )
continue;
#endif
- p_config = module_GetConfig( p_module, &i_confsize );
+ p_config = module_config_get( p_module, &i_confsize );
for( size_t i = 0; i < i_confsize; i++ )
{
module_config_t *p_item = p_config + i;
/* Find the right category item */
wxTreeItemIdValue cookie;
- vlc_bool_t b_found = VLC_FALSE;
+ bool b_found = false;
wxTreeItemId category_item = GetFirstChild( root_item , cookie);
while( category_item.IsOk() )
(ConfigTreeData *)GetItemData( category_item );
if( config_data->i_object_id == i_category )
{
- b_found = VLC_TRUE;
+ b_found = true;
break;
}
category_item = GetNextChild( root_item, cookie );
if( !b_found ) continue;
/* Find subcategory item */
- b_found = VLC_FALSE;
+ b_found = false;
//cookie = -1;
wxTreeItemId subcategory_item = GetFirstChild( category_item, cookie );
while( subcategory_item.IsOk() )
(ConfigTreeData *)GetItemData( subcategory_item );
if( config_data->i_object_id == i_subcategory )
{
- b_found = VLC_TRUE;
+ b_found = true;
break;
}
subcategory_item = GetNextChild( category_item, cookie );
config_data->b_submodule = module_IsSubModule(p_module);
#endif
config_data->i_type = TYPE_MODULE;
- config_data->i_object_id = config_data->b_submodule ?
- ((vlc_object_t *)p_module)->p_parent->i_object_id :
- ((vlc_object_t *)p_module)->i_object_id;
+ config_data->p_module = config_data->b_submodule ?
+ ((module_t*)((vlc_object_t*)p_module)->p_parent) : p_module;
config_data->psz_help = NULL;
/* WXMSW doesn't know image -1 ... FIXME */
#else
i_image = -1;
#endif
- AppendItem( subcategory_item, wxU( module_GetName(p_module, 0) ),
+ AppendItem( subcategory_item, wxU( module_get_name(p_module, 0) ),
i_image, -1, config_data );
}
{
config_new = (ConfigTreeData *)GetItemData( module );
if( config_new && !config_new->b_submodule &&
- config_new->i_object_id == config_data->i_object_id )
+ config_new->p_module == config_data->p_module )
{
return config_new;
}
p_intf = _p_intf;
p_prefs_dialog =_p_prefs_dialog,
- b_advanced = VLC_TRUE;
+ b_advanced = true;
SetAutoLayout( TRUE );
Hide();
/* Get a pointer to the module */
if( config_data->i_type == TYPE_MODULE )
{
- p_module = (module_t *)
- vlc_object_get( config_data->i_object_id );
+ p_module = config_data->p_module;
}
else
{
/* List the plugins */
int i_index;
- vlc_bool_t b_found = VLC_FALSE;
+ bool b_found = false;
p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
if( !p_list ) return;
for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
p_module = (module_t *)p_list->p_values[i_index].p_object;
- if( !strcmp( module_GetObjName(p_module), "main" ) )
+ if( !strcmp( module_get_object(p_module), "main" ) )
{
- b_found = VLC_TRUE;
+ b_found = true;
break;
}
}
* parent module) */
#if 0
if( module_IsSubModule(p_module) )
- p_start = module_GetConfig((module_t *)(((vlc_object_t *)p_module)->p_parent), &i_confsize);
+ p_start = module_config_get((module_t *)(((vlc_object_t *)p_module)->p_parent), &i_confsize);
else
#endif
- p_start = module_GetConfig(p_module, &i_confsize);
+ p_start = module_config_get(p_module, &i_confsize);
p_item = p_start;
p_end = p_start + i_confsize;
config_sizer->Add( control, 0, wxEXPAND | wxALL, 2 );
}
- module_PutConfig( p_start );
+ module_config_free( p_start );
config_sizer->Layout();
config_window->SetSizer( config_sizer );
if( config_data->i_type == TYPE_MODULE )
{
- module_Put( p_module );
+ module_release (p_module);
}
else
{
}
}
-void PrefsPanel::SwitchAdvanced( vlc_bool_t b_new_advanced )
+void PrefsPanel::SwitchAdvanced( bool b_new_advanced )
{
bool hidden = false;