Commit 7a165cdc authored by Sam Hocevar's avatar Sam Hocevar

* ./src/misc/modules.c: compilation fix.

  * ./modules/gui/win32/preferences.cpp: the Win32 interface doesn't use the
    old module linked list anymore.
parent 5dc2da73
...@@ -183,28 +183,31 @@ __fastcall TGroupBoxPlugin::TGroupBoxPlugin( TComponent* Owner, ...@@ -183,28 +183,31 @@ __fastcall TGroupBoxPlugin::TGroupBoxPlugin( TComponent* Owner,
void __fastcall TGroupBoxPlugin::ListViewSelectItem( TObject *Sender, void __fastcall TGroupBoxPlugin::ListViewSelectItem( TObject *Sender,
TListItem *Item, bool Selected ) TListItem *Item, bool Selected )
{ {
module_t *p_module; module_t **pp_parser;
vlc_list_t *p_list;
AnsiString Name; AnsiString Name;
Name = Item->Caption; Name = Item->Caption;
if( Name != "" ) if( Name == "" )
{ {
return;
}
/* look for module 'Name' */ /* look for module 'Name' */
for( p_module = p_intfGlobal->p_vlc->p_module_bank->first ; for( pp_parser = (module_t **)p_list->pp_objects ;
p_module != NULL ; *pp_parser ;
p_module = p_module->next ) pp_parser++ )
{ {
if( strcmp( p_module->psz_object_name, Name.c_str() ) == 0 ) if( strcmp( (*pp_parser)->psz_object_name, Name.c_str() ) == 0 )
{ {
ModuleSelected = p_module; ModuleSelected = (*pp_parser);
LabelHint->Caption = p_module->psz_longname ? LabelHint->Caption = (*pp_parser)->psz_longname ?
p_module->psz_longname : ""; (*pp_parser)->psz_longname : "";
ButtonConfig->Enabled = p_module->i_config_items ? true : false; ButtonConfig->Enabled = (*pp_parser)->i_config_items ? true : false;
break; break;
} }
} }
}
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TGroupBoxPlugin::ButtonSelectClick( TObject *Sender ) void __fastcall TGroupBoxPlugin::ButtonSelectClick( TObject *Sender )
...@@ -360,7 +363,6 @@ void __fastcall TPreferencesDlg::FormHide( TObject *Sender ) ...@@ -360,7 +363,6 @@ void __fastcall TPreferencesDlg::FormHide( TObject *Sender )
void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name ) void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
{ {
module_t *p_module;
module_t **pp_parser; module_t **pp_parser;
vlc_list_t *p_list; vlc_list_t *p_list;
...@@ -377,23 +379,30 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name ) ...@@ -377,23 +379,30 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
TListItem *ListItem; TListItem *ListItem;
/* Look for the selected module */ /* Look for the selected module */
for( p_module = p_intfGlobal->p_vlc->p_module_bank->first ; p_module != NULL ; p_list = vlc_list_find( p_intfGlobal, VLC_OBJECT_MODULE, FIND_ANYWHERE );
p_module = p_module->next )
for( pp_parser = (module_t **)p_list->pp_objects ;
*pp_parser ;
pp_parser++ )
{ {
if( psz_module_name if( psz_module_name
&& !strcmp( psz_module_name, p_module->psz_object_name ) ) && !strcmp( psz_module_name, (*pp_parser)->psz_object_name ) )
{ {
break; break;
} }
} }
if( !p_module ) return; if( !(*pp_parser) )
{
vlc_list_release( p_list );
return;
}
/* /*
* We found it, now we can start building its configuration interface * We found it, now we can start building its configuration interface
*/ */
/* Enumerate config options and add corresponding config boxes */ /* Enumerate config options and add corresponding config boxes */
p_item = p_module->p_config; p_item = (*pp_parser)->p_config;
if( p_item ) do if( p_item ) do
{ {
switch( p_item->i_type ) switch( p_item->i_type )
...@@ -426,7 +435,6 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name ) ...@@ -426,7 +435,6 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
ADD_PANEL; ADD_PANEL;
/* Look for valid modules */ /* Look for valid modules */
p_list = vlc_list_find( p_intfGlobal, VLC_OBJECT_MODULE, FIND_ANYWHERE );
pp_parser = (module_t **)p_list->pp_objects; pp_parser = (module_t **)p_list->pp_objects;
for( ; *pp_parser ; pp_parser++ ) for( ; *pp_parser ; pp_parser++ )
...@@ -438,8 +446,6 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name ) ...@@ -438,8 +446,6 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
} }
} }
vlc_list_release( p_list );
break; break;
case CONFIG_ITEM_FILE: case CONFIG_ITEM_FILE:
...@@ -494,6 +500,8 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name ) ...@@ -494,6 +500,8 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
} }
} }
vlc_list_release( p_list );
/* set active tabsheet /* set active tabsheet
* FIXME: i don't know why, but both lines are necessary */ * FIXME: i don't know why, but both lines are necessary */
PageControlPref->ActivePageIndex = 1; PageControlPref->ActivePageIndex = 1;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* modules.c : Builtin and plugin modules management functions * modules.c : Builtin and plugin modules management functions
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: modules.c,v 1.87 2002/08/15 12:11:15 sam Exp $ * $Id: modules.c,v 1.88 2002/08/15 12:22:45 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com> * Ethan C. Baldridge <BaldridgeE@cadmus.com>
...@@ -299,7 +299,6 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability, ...@@ -299,7 +299,6 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
{ {
p_submodule = p_submodule =
(module_t*)p_module->pp_children[ i_submodule ]; (module_t*)p_module->pp_children[ i_submodule ];
p_submodule->next = p_module->next;
break; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment