[vlc-commits] [Git][videolan/vlc][master] 4 commits: macos: add a separate alternative macro for non-translation marker use
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Fri Jan 28 17:38:11 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
8038904e by Lyndon Brown at 2022-01-28T16:55:12+00:00
macos: add a separate alternative macro for non-translation marker use
essentially the macos side of 6cd08480f5c3c0d7505c17c1a77ef5668c47c9a2,
as requested in !1172 discussion.
the new `NSTR()` macro is the equivalent of `qfut()`. it is intended for
use instead of `_NS()` when wrapping a define name, variable or function
call, where the system that scans for strings we want to be translated
should not apply, leaving `_NS()` to just be used for marking such strings.
i have avoided renaming `_NS()` to avoid unnecessary widespread change.
- - - - -
a785740a by Lyndon Brown at 2022-01-28T16:55:12+00:00
macos: replace all use of `_NS()` on defines and variables
...with `NSTR()` to prevent unwanted assessment in translatable string
searches, as per the previous commit.
note that in a few cases it might actually be wrong for translation to be
occurring, which will be addressed separately in the next commit(s).
- - - - -
ce1b46c3 by Lyndon Brown at 2022-01-28T16:55:12+00:00
macos: fix duplicate translation of cat/subcat labels
already done within the functions being called.
- - - - -
e791b513 by Lyndon Brown at 2022-01-28T16:55:12+00:00
macos: fix unwanted translation lookup of option names
- - - - -
8 changed files:
- modules/gui/macosx/extensions/NSString+Helpers.h
- modules/gui/macosx/menus/VLCMainMenu.m
- modules/gui/macosx/panels/VLCInformationWindowController.m
- modules/gui/macosx/preferences/VLCSimplePrefsController.m
- modules/gui/macosx/preferences/prefs.m
- modules/gui/macosx/preferences/prefs_widgets.m
- modules/gui/macosx/windows/VLCHelpWindowController.m
- modules/gui/macosx/windows/VLCOpenWindowController.m
Changes:
=====================================
modules/gui/macosx/extensions/NSString+Helpers.h
=====================================
@@ -28,7 +28,12 @@
#import <Cocoa/Cocoa.h>
#import <vlc_input.h>
-#define _NS(s) ((s) ? toNSStr(vlc_gettext(s)) : @"")
+#define NSTR(s) ((s) ? toNSStr(vlc_gettext(s)) : @"")
+
+/**
+ * For marking translatable static strings (like `_()`)
+ */
+#define _NS(s) NSTR(s)
/**
* Get a contextualized translation string
=====================================
modules/gui/macosx/menus/VLCMainMenu.m
=====================================
@@ -314,7 +314,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
for (int i = 0; i < p_item->list_count; i++) {
NSMenuItem *mi;
if (p_item->list_text != NULL)
- mi = [[NSMenuItem alloc] initWithTitle: _NS(p_item->list_text[i]) action:NULL keyEquivalent: @""];
+ mi = [[NSMenuItem alloc] initWithTitle: NSTR(p_item->list_text[i]) action:NULL keyEquivalent: @""];
else if (p_item->list.i[i])
mi = [[NSMenuItem alloc] initWithTitle: [NSString stringWithFormat: @"%d", p_item->list.i[i]] action:NULL keyEquivalent: @""];
else {
@@ -1609,7 +1609,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
/* Get the descriptive name of the variable */
var_Change(p_object, psz_variable, VLC_VAR_GETTEXT, &text);
- [menuItem setTitle: _NS(text ? text : psz_variable)];
+ [menuItem setTitle: NSTR(text ? text : psz_variable)];
if (i_type & VLC_VAR_HASCHOICE) {
NSMenu *menu = [menuItem submenu];
@@ -1739,7 +1739,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
switch(i_type & VLC_VAR_TYPE) {
case VLC_VAR_STRING:
- title = _NS(text_list[i] ? text_list[i] : val_list[i].psz_string);
+ title = NSTR(text_list[i] ? text_list[i] : val_list[i].psz_string);
lmi = [menu addItemWithTitle:title action:pf_callback keyEquivalent:@""];
data = [[VLCAutoGeneratedMenuContent alloc] initWithVariableName:psz_variable
@@ -1760,7 +1760,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
case VLC_VAR_INTEGER:
title = text_list[i] ?
- _NS(text_list[i]) : [NSString stringWithFormat:@"%"PRId64, val_list[i].i_int];
+ NSTR(text_list[i]) : [NSString stringWithFormat:@"%"PRId64, val_list[i].i_int];
lmi = [menu addItemWithTitle: title action: pf_callback keyEquivalent: @""];
data = [[VLCAutoGeneratedMenuContent alloc] initWithVariableName:psz_variable
=====================================
modules/gui/macosx/panels/VLCInformationWindowController.m
=====================================
@@ -126,8 +126,8 @@
[self.window setTitle: _NS("Media Information")];
[_uriLabel setStringValue: _NS("Location")];
- [_titleLabel setStringValue: _NS(VLC_META_TITLE)];
- [_artistLabel setStringValue: _NS(VLC_META_ARTIST)];
+ [_titleLabel setStringValue: NSTR(VLC_META_TITLE)];
+ [_artistLabel setStringValue: NSTR(VLC_META_ARTIST)];
[_saveMetaDataButton setStringValue: _NS("Save Metadata")];
[_segmentedView setLabel:_NS("General") forSegment:0];
@@ -135,22 +135,22 @@
[_segmentedView setLabel:_NS("Statistics") forSegment:2];
/* constants defined in vlc_meta.h */
- [_genreLabel setStringValue: _NS(VLC_META_GENRE)];
- [_copyrightLabel setStringValue: _NS(VLC_META_COPYRIGHT)];
- [_albumLabel setStringValue: _NS(VLC_META_ALBUM)];
- [_trackNumberLabel setStringValue: _NS(VLC_META_TRACK_NUMBER)];
+ [_genreLabel setStringValue: NSTR(VLC_META_GENRE)];
+ [_copyrightLabel setStringValue: NSTR(VLC_META_COPYRIGHT)];
+ [_albumLabel setStringValue: NSTR(VLC_META_ALBUM)];
+ [_trackNumberLabel setStringValue: NSTR(VLC_META_TRACK_NUMBER)];
[_trackTotalLabel setStringValue: _NS("Track Total")];
- [_descriptionLabel setStringValue: _NS(VLC_META_DESCRIPTION)];
- [_dateLabel setStringValue: _NS(VLC_META_DATE)];
- [_languageLabel setStringValue: _NS(VLC_META_LANGUAGE)];
- [_nowPlayingLabel setStringValue: _NS(VLC_META_NOW_PLAYING)];
- [_publisherLabel setStringValue: _NS(VLC_META_PUBLISHER)];
- [_encodedbyLabel setStringValue: _NS(VLC_META_ENCODED_BY)];
- [_showNameLabel setStringValue: _NS(VLC_META_SHOW_NAME)];
- [_episodeLabel setStringValue: _NS(VLC_META_EPISODE)];
- [_seasonLabel setStringValue: _NS(VLC_META_SEASON)];
- [_actorsLabel setStringValue: _NS(VLC_META_ACTORS)];
- [_directorLabel setStringValue: _NS(VLC_META_DIRECTOR)];
+ [_descriptionLabel setStringValue: NSTR(VLC_META_DESCRIPTION)];
+ [_dateLabel setStringValue: NSTR(VLC_META_DATE)];
+ [_languageLabel setStringValue: NSTR(VLC_META_LANGUAGE)];
+ [_nowPlayingLabel setStringValue: NSTR(VLC_META_NOW_PLAYING)];
+ [_publisherLabel setStringValue: NSTR(VLC_META_PUBLISHER)];
+ [_encodedbyLabel setStringValue: NSTR(VLC_META_ENCODED_BY)];
+ [_showNameLabel setStringValue: NSTR(VLC_META_SHOW_NAME)];
+ [_episodeLabel setStringValue: NSTR(VLC_META_EPISODE)];
+ [_seasonLabel setStringValue: NSTR(VLC_META_SEASON)];
+ [_actorsLabel setStringValue: NSTR(VLC_META_ACTORS)];
+ [_directorLabel setStringValue: NSTR(VLC_META_DIRECTOR)];
/* statistics */
[_inputLabel setStringValue: _NS("Input")];
=====================================
modules/gui/macosx/preferences/VLCSimplePrefsController.m
=====================================
@@ -286,9 +286,9 @@ create_toolbar_item(NSString *itemIdent, NSString *name, NSString *desc, NSStrin
} else if ([itemIdent isEqual: VLCVideoSettingToolbarIdentifier]) {
CreateToolbarItem(_NS("Video"), _NS("Video Settings"), @"VLCVideoCone", showVideoSettings);
} else if ([itemIdent isEqual: VLCOSDSettingToolbarIdentifier]) {
- CreateToolbarItem(_NS(SUBPIC_TITLE), _NS("Subtitle & On Screen Display Settings"), @"VLCSubtitleCone", showOSDSettings);
+ CreateToolbarItem(NSTR(SUBPIC_TITLE), _NS("Subtitle & On Screen Display Settings"), @"VLCSubtitleCone", showOSDSettings);
} else if ([itemIdent isEqual: VLCInputSettingToolbarIdentifier]) {
- CreateToolbarItem(_NS(INPUT_TITLE), _NS("Input & Codec Settings"), @"VLCInputCone", showInputSettings);
+ CreateToolbarItem(NSTR(INPUT_TITLE), _NS("Input & Codec Settings"), @"VLCInputCone", showInputSettings);
} else if ([itemIdent isEqual: VLCMediaLibrarySettingToolbarIdentifier]) {
CreateToolbarItem(_NS("Media Library"), _NS("Media Library settings"), @"NXHelpBacktrack", showMediaLibrarySettings);
} else if ([itemIdent isEqual: VLCHotkeysSettingToolbarIdentifier]) {
@@ -530,7 +530,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
free(values);
if (p_item->psz_longtext)
- [object setToolTip: _NS(p_item->psz_longtext)];
+ [object setToolTip: NSTR(p_item->psz_longtext)];
}
// just for clarification that this is a module list
@@ -565,20 +565,20 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
free(texts);
if (p_item->psz_longtext)
- [object setToolTip: _NS(p_item->psz_longtext)];
+ [object setToolTip: NSTR(p_item->psz_longtext)];
}
- (void)setupButton: (NSButton *)object forBoolValue: (const char *)name
{
[object setState: config_GetInt(name)];
- [object setToolTip: _NS(config_GetLabel(p_intf, name))];
+ [object setToolTip: NSTR(config_GetLabel(p_intf, name))];
}
- (void)setupField:(NSTextField *)object forOption:(const char *)psz_option
{
char *psz_tmp = config_GetPsz(psz_option);
[object setStringValue: toNSStr(psz_tmp)];
- [object setToolTip: _NS(config_GetLabel(p_intf, psz_option))];
+ [object setToolTip: NSTR(config_GetLabel(p_intf, psz_option))];
free(psz_tmp);
}
@@ -810,7 +810,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
i = config_GetInt("freetype-opacity") * 100.0 / 255.0 + 0.5;
[_osd_opacityTextField setIntValue: i];
[_osd_opacitySlider setIntValue: i];
- [_osd_opacitySlider setToolTip: _NS(config_GetLabel(p_intf, "freetype-opacity"))];
+ [_osd_opacitySlider setToolTip: NSTR(config_GetLabel(p_intf, "freetype-opacity"))];
[_osd_opacityTextField setToolTip: [_osd_opacitySlider toolTip]];
[self setupButton:_osd_forceboldCheckbox forBoolValue: "freetype-bold"];
[self setupButton:_osd_outline_colorPopup forIntList: "freetype-outline-color"];
@@ -837,7 +837,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
if (p_item->i_type == CONFIG_ITEM_KEY
&& strncmp(p_item->psz_name, "global-", 7) != 0
&& !EMPTY_STR(p_item->psz_text)) {
- [tempArray_desc addObject: _NS(p_item->psz_text)];
+ [tempArray_desc addObject: NSTR(p_item->psz_text)];
[tempArray_names addObject: toNSStr(p_item->psz_name)];
if (p_item->value.psz)
[_hotkeySettings addObject: toNSStr(p_item->value.psz)];
=====================================
modules/gui/macosx/preferences/prefs.m
=====================================
@@ -626,42 +626,42 @@ enum VLCTreeBranchType {
- (id)initWithCategory:(enum vlc_config_cat)category
{
- NSString * name = _NS(vlc_config_cat_GetName(category));
+ NSString * name = toNSStr(vlc_config_cat_GetName(category));
if (self = [super initWithName:name]) {
_branchType = CategoryBranch;
_category = category;
_subcategory = SUBCAT_UNKNOWN;
_configItems = nil;
_configSize = 0;
- //_help = [_NS(vlc_config_cat_GetHelp(category)) retain];
+ //_help = [toNSStr(vlc_config_cat_GetHelp(category)) retain];
}
return self;
}
- (id)initWithSubcategory:(enum vlc_config_subcat)subcategory
{
- NSString * name = _NS(vlc_config_subcat_GetName(subcategory));
+ NSString * name = toNSStr(vlc_config_subcat_GetName(subcategory));
if (self = [super initWithName:name]) {
_branchType = SubcategoryBranch;
_category = CAT_UNKNOWN;
_subcategory = subcategory;
_configItems = nil;
_configSize = 0;
- //_help = [_NS(vlc_config_subcat_GetHelp(subcategory)) retain];
+ //_help = [toNSStr(vlc_config_subcat_GetHelp(subcategory)) retain];
}
return self;
}
- (id)initWithPlugin:(module_t *)plugin
{
- NSString * name = _NS(module_get_name(plugin, false));
+ NSString * name = NSTR(module_get_name(plugin, false));
if (self = [super initWithName:name]) {
_branchType = PluginBranch;
_category = CAT_UNKNOWN;
_subcategory = SUBCAT_UNKNOWN;
_configItems = module_config_get(plugin, &_configSize);
//_plugin = plugin;
- //_help = [_NS(vlc_config_subcat_GetHelp(subcategory)) retain];
+ //_help = [toNSStr(vlc_config_subcat_GetHelp(subcategory)) retain];
}
return self;
}
=====================================
modules/gui/macosx/preferences/prefs_widgets.m
=====================================
@@ -840,7 +840,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
- (NSString *)name
{
- return _NS(psz_name);
+ return toNSStr(psz_name);
}
- (int)intValue
@@ -927,10 +927,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
else
self.viewType = CONFIG_ITEM_STRING;
- o_textfieldTooltip = [_NS(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
+ o_textfieldTooltip = [NSTR(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
/* add the label */
- labelString = _NS(p_item->psz_text);
+ labelString = NSTR(p_item->psz_text);
ADD_LABEL(self.label, mainFrame, 0, -3, labelString, o_textfieldTooltip)
[self.label setAutoresizingMask:NSViewNotSizable ];
[self addSubview: self.label];
@@ -1004,10 +1004,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
else
self.viewType = CONFIG_ITEM_MODULE;
- o_textfieldTooltip = [_NS(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
+ o_textfieldTooltip = [NSTR(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
/* add the label */
- labelString = _NS(p_item->psz_text);
+ labelString = NSTR(p_item->psz_text);
ADD_LABEL(self.label, mainFrame, 0, -3, labelString, o_textfieldTooltip)
[self.label setAutoresizingMask:NSViewNotSizable ];
[self addSubview: self.label];
@@ -1102,13 +1102,13 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
if (self = [super initWithFrame:mainFrame item:p_item]) {
self.viewType = CONFIG_ITEM_LOADFILE;
- o_itemTooltip = [_NS(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
+ o_itemTooltip = [NSTR(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
/* is it a directory */
b_directory = ([self type] == CONFIG_ITEM_DIRECTORY) ? YES : NO;
/* add the label */
- labelString = _NS(p_item->psz_text);
+ labelString = NSTR(p_item->psz_text);
ADD_LABEL(self.label, mainFrame, 0, 3, labelString, o_itemTooltip)
[self.label setAutoresizingMask:NSViewNotSizable ];
[self addSubview: self.label];
@@ -1190,10 +1190,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
if (self = [super initWithFrame:mainFrame item:p_item]) {
self.viewType = CONFIG_ITEM_MODULE;
- o_popupTooltip = [_NS(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
+ o_popupTooltip = [NSTR(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
/* add the label */
- labelString = _NS(p_item->psz_text);
+ labelString = NSTR(p_item->psz_text);
ADD_LABEL(self.label, mainFrame, 0, -1, labelString, o_popupTooltip)
[self.label setAutoresizingMask:NSViewNotSizable ];
@@ -1249,7 +1249,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
/* Hack: required subcategory is stored in i_min */
if (p_cfg->i_type == CONFIG_SUBCATEGORY &&
p_cfg->value.i == self.p_item->min.i) {
- NSString *o_description = _NS(module_GetLongName(p_parser));
+ NSString *o_description = NSTR(module_GetLongName(p_parser));
if ([newval isEqualToString: o_description]) {
returnval = strdup(module_get_object(p_parser));
break;
@@ -1286,7 +1286,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
/* Hack: required subcategory is stored in i_min */
if (p_config->i_type == CONFIG_SUBCATEGORY &&
p_config->value.i == self.p_item->min.i) {
- NSString *o_description = _NS(module_GetLongName(p_parser));
+ NSString *o_description = NSTR(module_GetLongName(p_parser));
[o_popup addItemWithTitle: o_description];
if (self.p_item->value.psz && !strcmp(self.p_item->value.psz,
@@ -1322,10 +1322,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
if (self = [super initWithFrame:mainFrame item:p_item]) {
self.viewType = CONFIG_ITEM_INTEGER;
- toolTip = [_NS(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
+ toolTip = [NSTR(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
/* add the label */
- labelString = _NS((char *)p_item->psz_text);
+ labelString = NSTR((char *)p_item->psz_text);
ADD_LABEL(self.label, mainFrame, 0, -3, labelString, toolTip)
[self.label setAutoresizingMask:NSViewNotSizable ];
[self addSubview: self.label];
@@ -1411,10 +1411,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
if (self = [super initWithFrame:mainFrame item:p_item]) {
self.viewType = CONFIG_ITEM_STRING_LIST;
- o_textfieldTooltip = [_NS(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
+ o_textfieldTooltip = [NSTR(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
/* add the label */
- labelString = _NS(p_item->psz_text);
+ labelString = NSTR(p_item->psz_text);
ADD_LABEL(self.label, mainFrame, 0, -3, labelString, o_textfieldTooltip)
[self.label setAutoresizingMask:NSViewNotSizable ];
[self addSubview: self.label];
@@ -1501,10 +1501,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
if (self = [super initWithFrame: mainFrame item:p_item]) {
self.viewType = CONFIG_ITEM_RANGED_INTEGER;
- toolTip = [_NS(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
+ toolTip = [NSTR(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
/* add the label */
- labelString = _NS(p_item->psz_text);
+ labelString = NSTR(p_item->psz_text);
ADD_LABEL(self.label, mainFrame, 0, -3, labelString, toolTip)
[self.label setAutoresizingMask:NSViewNotSizable ];
[self addSubview: self.label];
@@ -1613,10 +1613,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
if (self = [super initWithFrame:mainFrame item:p_item]) {
self.viewType = CONFIG_ITEM_INTEGER;
- toolTip = [_NS(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
+ toolTip = [NSTR(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
/* add the label */
- labelString = _NS(p_item->psz_text);
+ labelString = NSTR(p_item->psz_text);
ADD_LABEL(self.label, mainFrame, 0, -2, labelString, toolTip)
[self.label setAutoresizingMask:NSViewNotSizable ];
[self addSubview: self.label];
@@ -1704,10 +1704,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
if (self = [super initWithFrame:mainFrame item:p_item]) {
self.viewType = CONFIG_ITEM_RANGED_INTEGER;
- toolTip = [_NS(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
+ toolTip = [NSTR(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
/* add the label */
- labelString = _NS(p_item->psz_text);
+ labelString = NSTR(p_item->psz_text);
ADD_LABEL(self.label, mainFrame, 0, -3, labelString, toolTip)
[self.label setAutoresizingMask:NSViewNotSizable ];
[self addSubview: self.label];
@@ -1815,9 +1815,9 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
if (self != nil) {
self.viewType = CONFIG_ITEM_BOOL;
- labelString = _NS(p_item->psz_text);
+ labelString = NSTR(p_item->psz_text);
- toolTip = [_NS(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
+ toolTip = [NSTR(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
/* add the checkbox */
ADD_CHECKBOX(o_checkbox, mainFrame, 0,
@@ -1860,10 +1860,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
if (self = [super initWithFrame:mainFrame item:p_item]) {
self.viewType = CONFIG_ITEM_KEY;
- toolTip = [_NS(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
+ toolTip = [NSTR(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
/* add the label */
- labelString = _NS(p_item->psz_text);
+ labelString = NSTR(p_item->psz_text);
ADD_LABEL(self.label, mainFrame, 0, -1, labelString, toolTip)
[self.label setAutoresizingMask:NSViewNotSizable ];
[self addSubview: self.label];
@@ -1995,7 +1995,7 @@ if (p_item->value.psz && strstr(p_item->value.psz, shortname))\
o_moduleenabled = [NSNumber numberWithBool:YES];\
else \
o_moduleenabled = [NSNumber numberWithBool:NO];\
-[o_modulearray addObject:[NSMutableArray arrayWithObjects: @shortname, _NS(longname), o_moduleenabled, nil]]
+[o_modulearray addObject:[NSMutableArray arrayWithObjects: @shortname, NSTR(longname), o_moduleenabled, nil]]
addLuaIntf("http", "Web");
addLuaIntf("telnet", "Telnet");
@@ -2076,16 +2076,16 @@ o_moduleenabled = [NSNumber numberWithBool:NO];\
mainFrame.origin.y = 0;
self.frame = mainFrame;
- toolTip = [_NS(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
+ toolTip = [NSTR(p_item->psz_longtext) stringWrappedToWidth:PREFS_WRAP];
/* add the label */
- labelString = _NS((char *)p_item->psz_text);
+ labelString = NSTR((char *)p_item->psz_text);
ADD_LABEL(self.label, mainFrame, 0, -3, labelString, toolTip)
[self.label setAutoresizingMask:NSViewNotSizable ];
[self addSubview: self.label];
/* build the textfield */
- o_textfieldString = _NS(p_item->value.psz);
+ o_textfieldString = NSTR(p_item->value.psz);
ADD_TEXTFIELD(o_textfield, mainFrame, [self.label frame].size.width + 2,
mainFrame.size.height - 22, mainFrame.size.width -
[self.label frame].size.width - 2, toolTip, o_textfieldString)
@@ -2253,7 +2253,7 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
if (self = [super initWithFrame:mainFrame item:p_item]) {
/* add the label */
- labelString = _NS(p_item->psz_text);
+ labelString = NSTR(p_item->psz_text);
NSDictionary *boldAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
[NSFont boldSystemFontOfSize:[NSFont systemFontSize]],
=====================================
modules/gui/macosx/windows/VLCHelpWindowController.m
=====================================
@@ -61,7 +61,7 @@
{
NSString *htmlWithStyle = [NSString
stringWithFormat:@"<style>body { font-family: -apple-system, Helvetica Neue; }</style>%@",
- _NS(I_LONGHELP)];
+ NSTR(I_LONGHELP)];
[[helpWebView mainFrame] loadHTMLString:htmlWithStyle
baseURL:[NSURL URLWithString:@"https://videolan.org"]];
=====================================
modules/gui/macosx/windows/VLCOpenWindowController.m
=====================================
@@ -290,7 +290,7 @@ NSString *const VLCOpenTextFieldWasClicked = @"VLCOpenTextFieldWasClicked";
if (p_item) {
for (int i = 0; i < p_item->list_count; i++) {
- [_fileSubEncodingPopup addItemWithTitle: _NS(p_item->list_text[i])];
+ [_fileSubEncodingPopup addItemWithTitle: NSTR(p_item->list_text[i])];
[[_fileSubEncodingPopup lastItem] setRepresentedObject:[NSString stringWithFormat:@"%s", p_item->list.psz[i]]];
if (p_item->value.psz && !strcmp(p_item->value.psz, p_item->list.psz[i]))
[_fileSubEncodingPopup selectItem: [_fileSubEncodingPopup lastItem]];
@@ -304,7 +304,7 @@ NSString *const VLCOpenTextFieldWasClicked = @"VLCOpenTextFieldWasClicked";
if (p_item) {
for (i_index = 0; i_index < p_item->list_count; i_index++)
- [_fileSubAlignPopup addItemWithTitle: _NS(p_item->list_text[i_index])];
+ [_fileSubAlignPopup addItemWithTitle: NSTR(p_item->list_text[i_index])];
[_fileSubAlignPopup selectItemAtIndex: p_item->value.i];
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3b46bf985e050864e9b284df23e0fd882521fa8b...e791b513636964a89728b5828466a9d4f4353cdf
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3b46bf985e050864e9b284df23e0fd882521fa8b...e791b513636964a89728b5828466a9d4f4353cdf
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list