@implementation VLCTreePluginItem
- (id)initWithPlugin:(module_t *)plugin
{
- const char * psz_name = module_get_name( plugin, false );
- NSString * name;
- if (psz_name)
- name = _NS(psz_name);
- else
- name = @"";
-
+ NSString * name = _NS( module_get_name( plugin, false )?:"" );
if(self = [super initWithName:name])
{
_configItems = module_config_get( plugin, &_configSize );
//_plugin = plugin;
//_help = [_NS(config_CategoryHelpGet( subCategory )) retain];
}
-
return self;
}
- (void)setupButton: (NSButton *)object forBoolValue: (const char *)name
{
[object setState: config_GetInt( p_intf, name )];
-
- char * psz_label = config_GetLabel( p_intf, name );
- NSString * o_label;
-
- if (psz_label)
- {
- o_label = _NS(psz_label);
- free( psz_label );
- }
- else
- o_label = @"";
-
- [object setToolTip: o_label];
+ [object setToolTip: _NS(config_GetLabel( p_intf, name ) ?: "")];
}
- (void)setupField:(NSTextField *)o_object forOption:(const char *)psz_option