]> git.sesse.net Git - vlc/commitdiff
* plugins/win32/preferences.cpp: fixed a compilation bug
authorOlivier Teulière <ipkiss@videolan.org>
Tue, 23 Apr 2002 23:37:48 +0000 (23:37 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Tue, 23 Apr 2002 23:37:48 +0000 (23:37 +0000)
plugins/win32/preferences.cpp

index 06ed68988e6167539ced12f3ca2493d393d79e0f..dc6c4b78a07a290642c13f28948dba6a19313100 100644 (file)
@@ -357,9 +357,8 @@ void __fastcall TPreferencesDlg::FormHide( TObject *Sender )
 \r
 void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )\r
 {\r
-    module_t           *p_module;\r
-    module_t           *p_module_plugins;\r
-    unsigned int        i;\r
+    module_t           *p_module, *p_module_plugins;\r
+    module_config_t    *p_item;\r
     int                 i_pages, i_ctrl;\r
     \r
     TTabSheet          *TabSheet;\r
@@ -385,16 +384,17 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
      */\r
 \r
     /* Enumerate config options and add corresponding config boxes */\r
-    for( i = 0; i < p_module->i_config_lines; i++ )\r
+    p_item = p_module->p_config;\r
+    do\r
     {\r
-        switch( p_module->p_config[i].i_type )\r
+        switch( p_item->i_type )\r
         {\r
         case MODULE_CONFIG_HINT_CATEGORY:\r
 \r
             /* create a new tabsheet. */\r
             TabSheet = new TTabSheet( this );\r
             TabSheet->PageControl = PageControlPref;\r
-            TabSheet->Caption = p_module->p_config[i].psz_text;\r
+            TabSheet->Caption = p_item->psz_text;\r
             TabSheet->Visible = true;\r
 \r
             /* pack a scrollbox into the tabsheet */\r
@@ -410,7 +410,7 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
         case MODULE_CONFIG_ITEM_MODULE:\r
 \r
             /* add new groupbox for the config option */\r
-            GroupBoxPlugin = new TGroupBoxPlugin( this, &p_module->p_config[i] );\r
+            GroupBoxPlugin = new TGroupBoxPlugin( this, p_item );\r
             GroupBoxPlugin->Parent = ScrollBox;\r
 \r
             /* add panel as separator */\r
@@ -422,7 +422,7 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
                  p_module_plugins = p_module_plugins->next )\r
             {\r
                 if( p_module_plugins->i_capabilities &\r
-                    ( 1 << p_module->p_config[i].i_value ) )\r
+                    ( 1 << p_item->i_value ) )\r
                 {\r
                     ListItem = GroupBoxPlugin->ListView->Items->Add();\r
                     ListItem->Caption = p_module_plugins->psz_name;\r
@@ -436,7 +436,7 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
         case MODULE_CONFIG_ITEM_STRING:\r
 \r
             /* add new groupbox for the config option */\r
-            GroupBoxString = new TGroupBoxString( this, &p_module->p_config[i] );\r
+            GroupBoxString = new TGroupBoxString( this, p_item );\r
             GroupBoxString->Parent = ScrollBox;\r
 \r
             /* add panel as separator */\r
@@ -447,7 +447,7 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
         case MODULE_CONFIG_ITEM_INTEGER:\r
 \r
             /* add new groupbox for the config option */\r
-            GroupBoxInteger = new TGroupBoxInteger( this, &p_module->p_config[i] );\r
+            GroupBoxInteger = new TGroupBoxInteger( this, p_item );\r
             GroupBoxInteger->Parent = ScrollBox;\r
 \r
             /* add panel as separator */\r
@@ -458,7 +458,7 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
         case MODULE_CONFIG_ITEM_BOOL:\r
 \r
             /* add new groupbox for the config option */\r
-            GroupBoxBool = new TGroupBoxBool( this, &p_module->p_config[i] );\r
+            GroupBoxBool = new TGroupBoxBool( this, p_item );\r
             GroupBoxBool->Parent = ScrollBox;\r
 \r
             /* add panel as separator */\r
@@ -466,7 +466,10 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
 \r
             break;\r
         }\r
+        \r
+        p_item++;\r
     }\r
+    while( p_item->i_type != MODULE_CONFIG_HINT_END );\r
 \r
     /* Reorder groupboxes inside the tabsheets */\r
     for( i_pages = 0; i_pages < PageControlPref->PageCount; i_pages++ )\r