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

macosx: fixed use of [VLCMain localizedString] pointed by David Fuhrmann

this fixes the l10n of the advanced prefs and a few other strings

note that this facility is broken by design and should be replaced for 2.0-next
parent 41d7819d
...@@ -916,8 +916,7 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -916,8 +916,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
/* Get the descriptive name of the variable */ /* Get the descriptive name of the variable */
var_Change( p_object, psz_variable, VLC_VAR_GETTEXT, &text, NULL ); var_Change( p_object, psz_variable, VLC_VAR_GETTEXT, &text, NULL );
[o_mi setTitle: [[VLCMain sharedInstance] localizedString: text.psz_string ? [o_mi setTitle: _NS( text.psz_string ? text.psz_string : psz_variable )];
text.psz_string : psz_variable ]];
if( i_type & VLC_VAR_HASCHOICE ) if( i_type & VLC_VAR_HASCHOICE )
{ {
...@@ -1058,8 +1057,7 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -1058,8 +1057,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
{ {
case VLC_VAR_STRING: case VLC_VAR_STRING:
o_title = [[VLCMain sharedInstance] localizedString: text_list.p_list->p_values[i].psz_string ? o_title = _NS( text_list.p_list->p_values[i].psz_string ? text_list.p_list->p_values[i].psz_string : val_list.p_list->p_values[i].psz_string );
text_list.p_list->p_values[i].psz_string : val_list.p_list->p_values[i].psz_string ];
o_lmi = [o_menu addItemWithTitle: o_title action: pf_callback keyEquivalent: @""]; o_lmi = [o_menu addItemWithTitle: o_title action: pf_callback keyEquivalent: @""];
o_data = [[VLCAutoGeneratedMenuContent alloc] initWithVariableName: psz_variable ofObject: p_object o_data = [[VLCAutoGeneratedMenuContent alloc] initWithVariableName: psz_variable ofObject: p_object
...@@ -1075,9 +1073,7 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -1075,9 +1073,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
case VLC_VAR_INTEGER: case VLC_VAR_INTEGER:
o_title = text_list.p_list->p_values[i].psz_string ? o_title = text_list.p_list->p_values[i].psz_string ?
[[VLCMain sharedInstance] localizedString: text_list.p_list->p_values[i].psz_string] : _NS( text_list.p_list->p_values[i].psz_string ) : [NSString stringWithFormat: @"%"PRId64, val_list.p_list->p_values[i].i_int];
[NSString stringWithFormat: @"%"PRId64,
val_list.p_list->p_values[i].i_int];
o_lmi = [o_menu addItemWithTitle: o_title action: pf_callback keyEquivalent: @""]; o_lmi = [o_menu addItemWithTitle: o_title action: pf_callback keyEquivalent: @""];
o_data = [[VLCAutoGeneratedMenuContent alloc] initWithVariableName: psz_variable ofObject: p_object o_data = [[VLCAutoGeneratedMenuContent alloc] initWithVariableName: psz_variable ofObject: p_object
......
...@@ -420,11 +420,11 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -420,11 +420,11 @@ static VLCPrefs *_o_sharedMainInstance = nil;
} }
- (id)initWithCategory:(int)category - (id)initWithCategory:(int)category
{ {
NSString * name = [[VLCMain sharedInstance] localizedString: config_CategoryNameGet( category )]; NSString * name = _NS(config_CategoryNameGet( category ));
if(self = [super initWithName:name]) if(self = [super initWithName:name])
{ {
_category = category; _category = category;
//_help = [[[VLCMain sharedInstance] localizedString: config_CategoryHelpGet( category )] retain]; //_help = [_NS(config_CategoryHelpGet( category )) retain];
} }
return self; return self;
} }
...@@ -452,11 +452,11 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -452,11 +452,11 @@ static VLCPrefs *_o_sharedMainInstance = nil;
@implementation VLCTreeSubCategoryItem @implementation VLCTreeSubCategoryItem
- (id)initWithSubCategory:(int)subCategory - (id)initWithSubCategory:(int)subCategory
{ {
NSString * name = [[VLCMain sharedInstance] localizedString: config_CategoryNameGet( subCategory )]; NSString * name = _NS(config_CategoryNameGet( subCategory ));
if(self = [super initWithName:name]) if(self = [super initWithName:name])
{ {
_subCategory = subCategory; _subCategory = subCategory;
//_help = [[[VLCMain sharedInstance] localizedString: config_CategoryHelpGet( subCategory )] retain]; //_help = [_NS(config_CategoryHelpGet( subCategory )) retain];
} }
return self; return self;
} }
...@@ -478,12 +478,12 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -478,12 +478,12 @@ static VLCPrefs *_o_sharedMainInstance = nil;
@implementation VLCTreePluginItem @implementation VLCTreePluginItem
- (id)initWithPlugin:(module_t *)plugin - (id)initWithPlugin:(module_t *)plugin
{ {
NSString * name = [[VLCMain sharedInstance] localizedString: module_get_name( plugin, false )?:""]; NSString * name = _NS( module_get_name( plugin, false )?:"" );
if(self = [super initWithName:name]) if(self = [super initWithName:name])
{ {
_configItems = module_config_get( plugin, &_configSize ); _configItems = module_config_get( plugin, &_configSize );
//_plugin = plugin; //_plugin = plugin;
//_help = [[[VLCMain sharedInstance] localizedString: config_CategoryHelpGet( subCategory )] retain]; //_help = [_NS(config_CategoryHelpGet( subCategory )) retain];
} }
return self; return self;
} }
...@@ -516,7 +516,7 @@ static VLCPrefs *_o_sharedMainInstance = nil; ...@@ -516,7 +516,7 @@ static VLCPrefs *_o_sharedMainInstance = nil;
- (id)initWithConfigItem: (module_config_t *) configItem - (id)initWithConfigItem: (module_config_t *) configItem
{ {
NSString * name = [[VLCMain sharedInstance] localizedString:configItem->psz_name]; NSString * name = _NS(configItem->psz_name);
self = [super initWithName:name]; self = [super initWithName:name];
[name release]; [name release];
if( self != nil ) if( self != nil )
......
...@@ -880,7 +880,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -880,7 +880,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
- (NSString *)name - (NSString *)name
{ {
return [[VLCMain sharedInstance] localizedString: psz_name]; return _NS(psz_name);
} }
- (int)type - (int)type
...@@ -976,14 +976,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -976,14 +976,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
else else
i_view_type = CONFIG_ITEM_STRING; i_view_type = CONFIG_ITEM_STRING;
o_textfieldTooltip = [[VLCMain sharedInstance] wrapString: o_textfieldTooltip = [[VLCMain sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
[[VLCMain sharedInstance] localizedString: (char *)p_item->psz_longtext]
toWidth: PREFS_WRAP];
/* add the label */ /* add the label */
if( p_item->psz_text ) if( p_item->psz_text )
o_labelString = [[VLCMain sharedInstance] o_labelString = _NS((char *)p_item->psz_text);
localizedString: (char *)p_item->psz_text];
else else
o_labelString = [NSString stringWithString:@""]; o_labelString = [NSString stringWithString:@""];
ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip ) ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip )
...@@ -992,8 +989,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -992,8 +989,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
/* build the textfield */ /* build the textfield */
if( p_item->value.psz ) if( p_item->value.psz )
o_textfieldString = [[VLCMain sharedInstance] o_textfieldString = _NS((char *)p_item->value.psz);
localizedString: (char *)p_item->value.psz];
else else
o_textfieldString = [NSString stringWithString: @""]; o_textfieldString = [NSString stringWithString: @""];
if( p_item->i_type == CONFIG_ITEM_PASSWORD ) if( p_item->i_type == CONFIG_ITEM_PASSWORD )
...@@ -1046,8 +1042,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1046,8 +1042,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
NSString *o_textfieldString; NSString *o_textfieldString;
char *psz_value = config_GetPsz( VLCIntf, p_item->psz_name ); char *psz_value = config_GetPsz( VLCIntf, p_item->psz_name );
if( psz_value ) if( psz_value )
o_textfieldString = [[VLCMain sharedInstance] o_textfieldString = _NS(psz_value);
localizedString: psz_value];
else else
o_textfieldString = [NSString stringWithString: @""]; o_textfieldString = [NSString stringWithString: @""];
free( psz_value ); free( psz_value );
...@@ -1071,14 +1066,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1071,14 +1066,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
int i_index; int i_index;
i_view_type = CONFIG_ITEM_STRING_LIST; i_view_type = CONFIG_ITEM_STRING_LIST;
o_textfieldTooltip = [[VLCMain sharedInstance] wrapString: o_textfieldTooltip = [[VLCMain sharedInstance] wrapString: _NS(p_item->psz_longtext) toWidth: PREFS_WRAP];
[[VLCMain sharedInstance]
localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
/* add the label */ /* add the label */
if( p_item->psz_text ) if( p_item->psz_text )
o_labelString = [[VLCMain sharedInstance] o_labelString = _NS((char *)p_item->psz_text);
localizedString: (char *)p_item->psz_text];
else else
o_labelString = [NSString stringWithString:@""]; o_labelString = [NSString stringWithString:@""];
ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip ) ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip )
...@@ -1164,10 +1156,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1164,10 +1156,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{ {
if( p_item->ppsz_list_text && p_item->ppsz_list_text[i_index] ) if( p_item->ppsz_list_text && p_item->ppsz_list_text[i_index] )
{ {
return [[VLCMain sharedInstance] return _NS((char *)p_item->ppsz_list_text[i_index]);
localizedString: (char *)p_item->ppsz_list_text[i_index]]; } else
} else return [[VLCMain sharedInstance] return _NS((char *)p_item->ppsz_list[i_index]);
localizedString: (char *)p_item->ppsz_list[i_index]];
} }
@end @end
...@@ -1187,16 +1178,14 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1187,16 +1178,14 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
i_view_type = CONFIG_ITEM_LOADFILE; i_view_type = CONFIG_ITEM_LOADFILE;
o_itemTooltip = [[VLCMain sharedInstance] o_itemTooltip = [[VLCMain sharedInstance]
wrapString: [[VLCMain sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
/* is it a directory */ /* is it a directory */
b_directory = ( [self type] == CONFIG_ITEM_DIRECTORY ) ? YES : NO; b_directory = ( [self type] == CONFIG_ITEM_DIRECTORY ) ? YES : NO;
/* add the label */ /* add the label */
if( p_item->psz_text ) if( p_item->psz_text )
o_labelString = [[VLCMain sharedInstance] o_labelString = _NS((char *)p_item->psz_text);
localizedString: (char *)p_item->psz_text];
else else
o_labelString = [NSString stringWithString:@""]; o_labelString = [NSString stringWithString:@""];
ADD_LABEL( o_label, mainFrame, 0, 3, o_labelString, o_itemTooltip ) ADD_LABEL( o_label, mainFrame, 0, 3, o_labelString, o_itemTooltip )
...@@ -1303,14 +1292,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1303,14 +1292,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{ {
i_view_type = CONFIG_ITEM_MODULE; i_view_type = CONFIG_ITEM_MODULE;
o_popupTooltip = [[VLCMain sharedInstance] wrapString: o_popupTooltip = [[VLCMain sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
[[VLCMain sharedInstance]
localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
/* add the label */ /* add the label */
if( p_item->psz_text ) if( p_item->psz_text )
o_labelString = [[VLCMain sharedInstance] o_labelString = _NS((char *)p_item->psz_text);
localizedString: (char *)p_item->psz_text];
else else
o_labelString = [NSString stringWithString:@""]; o_labelString = [NSString stringWithString:@""];
...@@ -1368,8 +1354,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1368,8 +1354,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{ {
if( module_provides( p_parser, p_item->psz_type ) ) if( module_provides( p_parser, p_item->psz_type ) )
{ {
NSString *o_description = [[VLCMain sharedInstance] NSString *o_description = _NS(module_get_name( p_parser, TRUE ));
localizedString: module_get_name( p_parser, TRUE )];
if( [newval isEqualToString: o_description] ) if( [newval isEqualToString: o_description] )
{ {
returnval = strdup( module_get_object( p_parser )); returnval = strdup( module_get_object( p_parser ));
...@@ -1391,8 +1376,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1391,8 +1376,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
if( p_cfg->i_type == CONFIG_SUBCATEGORY && if( p_cfg->i_type == CONFIG_SUBCATEGORY &&
p_cfg->value.i == p_cfg->min.i ) p_cfg->value.i == p_cfg->min.i )
{ {
NSString *o_description = [[VLCMain sharedInstance] NSString *o_description = _NS(module_get_name( p_parser, TRUE ));
localizedString: module_get_name( p_parser, TRUE )];
if( [newval isEqualToString: o_description] ) if( [newval isEqualToString: o_description] )
{ {
returnval = strdup(module_get_object( p_parser )); returnval = strdup(module_get_object( p_parser ));
...@@ -1422,8 +1406,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1422,8 +1406,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{ {
if( module_provides( p_parser, p_item->psz_type ) ) if( module_provides( p_parser, p_item->psz_type ) )
{ {
NSString *o_description = [[VLCMain sharedInstance] NSString *o_description = _NS(module_get_name( p_parser, TRUE ));
localizedString: module_get_name( p_parser, TRUE )];
[o_popup addItemWithTitle: o_description]; [o_popup addItemWithTitle: o_description];
char *psz_value = config_GetPsz( VLCIntf, p_item->psz_name ); char *psz_value = config_GetPsz( VLCIntf, p_item->psz_name );
...@@ -1448,8 +1431,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1448,8 +1431,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
if( p_config->i_type == CONFIG_SUBCATEGORY && if( p_config->i_type == CONFIG_SUBCATEGORY &&
p_config->value.i == p_item->min.i ) p_config->value.i == p_item->min.i )
{ {
NSString *o_description = [[VLCMain sharedInstance] NSString *o_description = _NS(module_get_name( p_parser, TRUE ));
localizedString: module_get_name( p_parser, TRUE )];
[o_popup addItemWithTitle: o_description]; [o_popup addItemWithTitle: o_description];
if( p_item->value.psz && !strcmp(p_item->value.psz, if( p_item->value.psz && !strcmp(p_item->value.psz,
...@@ -1480,14 +1462,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1480,14 +1462,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{ {
i_view_type = CONFIG_ITEM_INTEGER; i_view_type = CONFIG_ITEM_INTEGER;
o_tooltip = [[VLCMain sharedInstance] wrapString: o_tooltip = [[VLCMain sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
[[VLCMain sharedInstance]
localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
/* add the label */ /* add the label */
if( p_item->psz_text ) if( p_item->psz_text )
o_labelString = [[VLCMain sharedInstance] o_labelString = _NS((char *)p_item->psz_text);
localizedString: (char *)p_item->psz_text];
else else
o_labelString = [NSString stringWithString:@""]; o_labelString = [NSString stringWithString:@""];
ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_tooltip ) ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_tooltip )
...@@ -1578,14 +1557,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1578,14 +1557,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
int i_index; int i_index;
i_view_type = CONFIG_ITEM_STRING_LIST; i_view_type = CONFIG_ITEM_STRING_LIST;
o_textfieldTooltip = [[VLCMain sharedInstance] wrapString: o_textfieldTooltip = [[VLCMain sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
[[VLCMain sharedInstance]
localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
/* add the label */ /* add the label */
if( p_item->psz_text ) if( p_item->psz_text )
o_labelString = [[VLCMain sharedInstance] o_labelString = _NS((char *)p_item->psz_text);
localizedString: (char *)p_item->psz_text];
else else
o_labelString = [NSString stringWithString:@""]; o_labelString = [NSString stringWithString:@""];
ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip ) ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_textfieldTooltip )
...@@ -1660,8 +1636,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1660,8 +1636,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)i_index - (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)i_index
{ {
if( p_item->ppsz_list_text && p_item->ppsz_list_text[i_index] ) if( p_item->ppsz_list_text && p_item->ppsz_list_text[i_index] )
return [[VLCMain sharedInstance] return _NS((char *)p_item->ppsz_list_text[i_index]);
localizedString: (char *)p_item->ppsz_list_text[i_index]];
else else
return [NSString stringWithFormat: @"%i", p_item->pi_list[i_index]]; return [NSString stringWithFormat: @"%i", p_item->pi_list[i_index]];
} }
...@@ -1682,14 +1657,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1682,14 +1657,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{ {
i_view_type = CONFIG_ITEM_RANGED_INTEGER; i_view_type = CONFIG_ITEM_RANGED_INTEGER;
o_tooltip = [[VLCMain sharedInstance] wrapString: o_tooltip = [[VLCMain sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
[[VLCMain sharedInstance]
localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
/* add the label */ /* add the label */
if( p_item->psz_text ) if( p_item->psz_text )
o_labelString = [[VLCMain sharedInstance] o_labelString = _NS((char *)p_item->psz_text);
localizedString: (char *)p_item->psz_text];
else else
o_labelString = [NSString stringWithString:@""]; o_labelString = [NSString stringWithString:@""];
ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_tooltip ) ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_tooltip )
...@@ -1801,14 +1773,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1801,14 +1773,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{ {
i_view_type = CONFIG_ITEM_INTEGER; i_view_type = CONFIG_ITEM_INTEGER;
o_tooltip = [[VLCMain sharedInstance] wrapString: o_tooltip = [[VLCMain sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
[[VLCMain sharedInstance]
localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
/* add the label */ /* add the label */
if( p_item->psz_text ) if( p_item->psz_text )
o_labelString = [[VLCMain sharedInstance] o_labelString = _NS((char *)p_item->psz_text);
localizedString: (char *)p_item->psz_text];
else else
o_labelString = [NSString stringWithString:@""]; o_labelString = [NSString stringWithString:@""];
ADD_LABEL( o_label, mainFrame, 0, -2, o_labelString, o_tooltip ) ADD_LABEL( o_label, mainFrame, 0, -2, o_labelString, o_tooltip )
...@@ -1897,14 +1866,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -1897,14 +1866,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{ {
i_view_type = CONFIG_ITEM_RANGED_INTEGER; i_view_type = CONFIG_ITEM_RANGED_INTEGER;
o_tooltip = [[VLCMain sharedInstance] wrapString: o_tooltip = [[VLCMain sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
[[VLCMain sharedInstance]
localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
/* add the label */ /* add the label */
if( p_item->psz_text ) if( p_item->psz_text )
o_labelString = [[VLCMain sharedInstance] o_labelString = _NS((char *)p_item->psz_text);
localizedString: (char *)p_item->psz_text];
else else
o_labelString = [NSString stringWithString:@""]; o_labelString = [NSString stringWithString:@""];
ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_tooltip ) ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_tooltip )
...@@ -2017,17 +1983,14 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -2017,17 +1983,14 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
i_view_type = CONFIG_ITEM_BOOL; i_view_type = CONFIG_ITEM_BOOL;
/* add the checkbox */ /* add the checkbox */
o_tooltip = [[VLCMain sharedInstance] o_tooltip = [[VLCMain sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
wrapString: [[VLCMain sharedInstance]
localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
ADD_CHECKBOX( o_checkbox, mainFrame, 0, ADD_CHECKBOX( o_checkbox, mainFrame, 0,
0, @"", o_tooltip, p_item->value.i, NSImageLeft) 0, @"", o_tooltip, p_item->value.i, NSImageLeft)
[o_checkbox setAutoresizingMask:NSViewNotSizable ]; [o_checkbox setAutoresizingMask:NSViewNotSizable ];
[self addSubview: o_checkbox]; [self addSubview: o_checkbox];
/* add the label */ /* add the label */
if( p_item->psz_text ) if( p_item->psz_text )
o_labelString = [[VLCMain sharedInstance] o_labelString = _NS((char *)p_item->psz_text);
localizedString: (char *)p_item->psz_text];
else else
o_labelString = [NSString stringWithString:@""]; o_labelString = [NSString stringWithString:@""];
ADD_LABEL( o_label, mainFrame, [o_checkbox frame].size.width, 0, o_labelString, o_tooltip ) ADD_LABEL( o_label, mainFrame, [o_checkbox frame].size.width, 0, o_labelString, o_tooltip )
...@@ -2070,14 +2033,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -2070,14 +2033,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{ {
i_view_type = CONFIG_ITEM_KEY; i_view_type = CONFIG_ITEM_KEY;
o_tooltip = [[VLCMain sharedInstance] wrapString: o_tooltip = [[VLCMain sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
[[VLCMain sharedInstance]
localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
/* add the label */ /* add the label */
if( p_item->psz_text ) if( p_item->psz_text )
o_labelString = [[VLCMain sharedInstance] o_labelString = _NS((char *)p_item->psz_text);
localizedString: (char *)p_item->psz_text];
else else
o_labelString = [NSString stringWithString:@""]; o_labelString = [NSString stringWithString:@""];
ADD_LABEL( o_label, mainFrame, 0, -1, o_labelString, o_tooltip ) ADD_LABEL( o_label, mainFrame, 0, -1, o_labelString, o_tooltip )
...@@ -2210,14 +2170,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -2210,14 +2170,11 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{ {
i_view_type = CONFIG_ITEM_MODULE_LIST; i_view_type = CONFIG_ITEM_MODULE_LIST;
o_tooltip = [[VLCMain sharedInstance] wrapString: o_tooltip = [[VLCMain sharedInstance] wrapString: _NS((char *)p_item->psz_longtext) toWidth: PREFS_WRAP];
[[VLCMain sharedInstance]
localizedString: (char *)p_item->psz_longtext ] toWidth: PREFS_WRAP];
/* add the label */ /* add the label */
if( p_item->psz_text ) if( p_item->psz_text )
o_labelString = [[VLCMain sharedInstance] o_labelString = _NS((char *)p_item->psz_text);
localizedString: (char *)p_item->psz_text];
else else
o_labelString = [NSString stringWithString:@""]; o_labelString = [NSString stringWithString:@""];
ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_tooltip ) ADD_LABEL( o_label, mainFrame, 0, -3, o_labelString, o_tooltip )
...@@ -2226,8 +2183,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -2226,8 +2183,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
/* build the textfield */ /* build the textfield */
if( p_item->value.psz ) if( p_item->value.psz )
o_textfieldString = [[VLCMain sharedInstance] o_textfieldString = _NS((char *)p_item->value.psz);
localizedString: (char *)p_item->value.psz];
else else
o_textfieldString = [NSString stringWithString: @""]; o_textfieldString = [NSString stringWithString: @""];
ADD_TEXTFIELD( o_textfield, mainFrame, [o_label frame].size.width + 2, ADD_TEXTFIELD( o_textfield, mainFrame, [o_label frame].size.width + 2,
......
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