- char *psz_intf;
-
- /* Variable used for interface switching */
- p_intf->psz_switch_intf = NULL;
- var_Create( p_intf, "intf-switch", VLC_VAR_STRING |
- VLC_VAR_HASCHOICE | VLC_VAR_ISCOMMAND );
- text.psz_string = _("Switch interface");
- var_Change( p_intf, "intf-switch", VLC_VAR_SETTEXT, &text, NULL );
-
- /* Only fill the list with available modules */
- p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
- for( ppsz_parser = ppsz_interfaces; *ppsz_parser; ppsz_parser += 2 )
- {
- for( i = 0; i < p_list->i_count; i++ )
- {
- module_t *p_module = (module_t *)p_list->p_values[i].p_object;
- if( !strcmp( p_module->psz_object_name, ppsz_parser[0] ) )
- {
- val.psz_string = ppsz_parser[0];
- text.psz_string = ppsz_parser[1];
- var_Change( p_intf, "intf-switch", VLC_VAR_ADDCHOICE,
- &val, &text );
- break;
- }
- }
- }
- vlc_list_release( p_list );
-
- var_AddCallback( p_intf, "intf-switch", SwitchIntfCallback, NULL );