[vlc-commits] MacOS X: fix preferences for ModulesConfig
Jean-Baptiste Kempf
git at videolan.org
Fri Nov 18 19:01:03 CET 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Nov 18 19:00:06 2011 +0100| [4d8b6d1032c2a481264847acdca94446f75ba6c1] | committer: Jean-Baptiste Kempf
MacOS X: fix preferences for ModulesConfig
Close #5024
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4d8b6d1032c2a481264847acdca94446f75ba6c1
---
modules/gui/macosx/prefs_widgets.m | 27 +++++++++++----------------
1 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index b1c2001..c1ed074 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -1313,6 +1313,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
localizedString: (char *)p_item->psz_text];
else
o_labelString = [NSString stringWithString:@""];
+
ADD_LABEL( o_label, mainFrame, 0, -1, o_labelString, o_popupTooltip )
[o_label setAutoresizingMask:NSViewNotSizable ];
[self addSubview: o_label];
@@ -1378,18 +1379,17 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
}
else
{
- int i;
-
if( module_is_main( p_parser) )
continue;
- unsigned int confsize, unused;
+
+ unsigned int confsize;
module_config_t *p_config = module_config_get( p_parser, &confsize );
- for ( i = 0; i < confsize; i++ )
+ for ( size_t i = 0; i < confsize; i++ )
{
- module_config_t *p_item = p_config + i;
+ module_config_t *p_cfg = p_config + i;
/* Hack: required subcategory is stored in i_min */
- if( p_item->i_type == CONFIG_SUBCATEGORY &&
- p_item->value.i == p_item->min.i )
+ if( p_cfg->i_type == CONFIG_SUBCATEGORY &&
+ p_cfg->value.i == p_cfg->min.i )
{
NSString *o_description = [[VLCMain sharedInstance]
localizedString: module_get_name( p_parser, TRUE )];
@@ -1436,30 +1436,25 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
}
else
{
- int i;
-
if( module_is_main( p_parser ) )
continue;
unsigned int confsize;
- unsigned int unused;
+
module_config_t *p_configlist = module_config_get( p_parser, &confsize );
- for ( i = 0; i < confsize; i++ )
+ for ( size_t i = 0; i < confsize; i++ )
{
module_config_t *p_config = &p_configlist[i];
/* Hack: required subcategory is stored in i_min */
if( p_config->i_type == CONFIG_SUBCATEGORY &&
- config_GetInt( VLCIntf, p_item->psz_name) == p_item->min.i )
+ p_config->value.i == p_item->min.i )
{
NSString *o_description = [[VLCMain sharedInstance]
localizedString: module_get_name( p_parser, TRUE )];
[o_popup addItemWithTitle: o_description];
- char *psz_value = config_GetPsz( VLCIntf, p_item->psz_name );
- if( psz_value && !strcmp(psz_value,
+ if( p_item->value.psz && !strcmp(p_item->value.psz,
module_get_object( p_parser )) )
[o_popup selectItem:[o_popup lastItem]];
-
- free( psz_value );
}
}
module_config_free( p_configlist );
More information about the vlc-commits
mailing list