Commit eeda90f3 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* fixed a bug which prevented the display of Input's and Interface's...

* fixed a bug which prevented the display of Input's and Interface's general-nodes. Thanks to zorglub and DiDjCodt
parent c07454de
...@@ -303,7 +303,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -303,7 +303,7 @@ static VLCTreeItem *o_root_item = nil;
* generate their config panel them when it is asked by the user. */ * generate their config panel them when it is asked by the user. */
VLCTreeItem *p_last_category = NULL; VLCTreeItem *p_last_category = NULL;
p_item = p_module->p_config; p_item = p_module->p_config;
o_children = [[NSMutableArray alloc] initWithCapacity:10]; o_children = [[NSMutableArray alloc] initWithCapacity:20];
if( p_item ) do if( p_item ) do
{ {
NSString *o_child_name; NSString *o_child_name;
...@@ -312,7 +312,8 @@ static VLCTreeItem *o_root_item = nil; ...@@ -312,7 +312,8 @@ static VLCTreeItem *o_root_item = nil;
switch( p_item->i_type ) switch( p_item->i_type )
{ {
case CONFIG_CATEGORY: case CONFIG_CATEGORY:
if( p_item->i_value == -1 ) break; if( p_item->i_value == -1 ) break;
o_child_name = [[VLCMain sharedInstance] o_child_name = [[VLCMain sharedInstance]
localizedString: config_CategoryNameGet( p_item->i_value ) ]; localizedString: config_CategoryNameGet( p_item->i_value ) ];
o_child_title = o_child_name; o_child_title = o_child_name;
...@@ -330,12 +331,8 @@ static VLCTreeItem *o_root_item = nil; ...@@ -330,12 +331,8 @@ static VLCTreeItem *o_root_item = nil;
whithCategory: p_item - p_module->p_config]]; whithCategory: p_item - p_module->p_config]];
break; break;
case CONFIG_SUBCATEGORY: case CONFIG_SUBCATEGORY:
if( p_item->i_value == -1 ) break; if( p_item->i_value == -1 ) break;
o_child_name = [[VLCMain sharedInstance]
localizedString: config_CategoryNameGet( p_item->i_value ) ];
o_child_title = o_child_name;
o_child_help = [[VLCMain sharedInstance]
localizedString: config_CategoryHelpGet( p_item->i_value ) ];
if( p_item->i_value != SUBCAT_PLAYLIST_GENERAL && if( p_item->i_value != SUBCAT_PLAYLIST_GENERAL &&
p_item->i_value != SUBCAT_VIDEO_GENERAL && p_item->i_value != SUBCAT_VIDEO_GENERAL &&
p_item->i_value != SUBCAT_INPUT_GENERAL && p_item->i_value != SUBCAT_INPUT_GENERAL &&
...@@ -343,6 +340,13 @@ static VLCTreeItem *o_root_item = nil; ...@@ -343,6 +340,13 @@ static VLCTreeItem *o_root_item = nil;
p_item->i_value != SUBCAT_SOUT_GENERAL && p_item->i_value != SUBCAT_SOUT_GENERAL &&
p_item->i_value != SUBCAT_ADVANCED_MISC && p_item->i_value != SUBCAT_ADVANCED_MISC &&
p_item->i_value != SUBCAT_AUDIO_GENERAL ) p_item->i_value != SUBCAT_AUDIO_GENERAL )
{
o_child_name = [[VLCMain sharedInstance]
localizedString: config_CategoryNameGet( p_item->i_value ) ];
o_child_title = o_child_name;
o_child_help = [[VLCMain sharedInstance]
localizedString: config_CategoryHelpGet( p_item->i_value ) ];
[p_last_category->o_children [p_last_category->o_children
addObject:[[VLCTreeItem alloc] addObject:[[VLCTreeItem alloc]
initWithName: o_child_name initWithName: o_child_name
...@@ -353,6 +357,8 @@ static VLCTreeItem *o_root_item = nil; ...@@ -353,6 +357,8 @@ static VLCTreeItem *o_root_item = nil;
children:[[NSMutableArray alloc] children:[[NSMutableArray alloc]
initWithCapacity:10] initWithCapacity:10]
whithCategory: p_item - p_module->p_config]]; whithCategory: p_item - p_module->p_config]];
}
break; break;
default: default:
break; break;
...@@ -440,7 +446,7 @@ static VLCTreeItem *o_root_item = nil; ...@@ -440,7 +446,7 @@ static VLCTreeItem *o_root_item = nil;
parent:p_subcategory_item parent:p_subcategory_item
children:IsALeafNode children:IsALeafNode
whithCategory: -1]]; whithCategory: -1]];
} }
} }
vlc_list_release( p_list ); vlc_list_release( p_list );
} }
...@@ -606,7 +612,10 @@ static VLCTreeItem *o_root_item = nil; ...@@ -606,7 +612,10 @@ static VLCTreeItem *o_root_item = nil;
if( ( p_item->i_type == CONFIG_CATEGORY ) && if( ( p_item->i_type == CONFIG_CATEGORY ) &&
( ( p_item->i_value == CAT_PLAYLIST ) || ( ( p_item->i_value == CAT_PLAYLIST ) ||
( p_item->i_value == CAT_AUDIO ) || ( p_item->i_value == CAT_AUDIO ) ||
( p_item->i_value == CAT_VIDEO ) ) ) ( p_item->i_value == CAT_VIDEO ) ||
( p_item->i_value == CAT_INTERFACE ) ||
( p_item->i_value == CAT_INPUT ) ||
( p_item->i_value == CAT_SOUT ) ) )
p_item++; p_item++;
do do
......
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