continue;
}
else if (p_item->list.psz[i])
- mi = [[NSMenuItem alloc] initWithTitle: [NSString stringWithUTF8String: p_item->list.psz[i]] action:NULL keyEquivalent: @""];
+ mi = [[NSMenuItem alloc] initWithTitle: @(p_item->list.psz[i]) action:NULL keyEquivalent: @""];
else
msg_Err(p_intf, "item %d of pref %s failed to be created", i, name);
- [mi setRepresentedObject:[NSString stringWithUTF8String: p_item->list.psz[i]]];
+ [mi setRepresentedObject:@(p_item->list.psz[i])];
[[object menu] addItem: [mi autorelease]];
if (p_item->value.psz && !strcmp(p_item->value.psz, p_item->list.psz[i]))
[object selectItem:[object lastItem]];
mi = [[NSMenuItem alloc] initWithTitle: [NSString stringWithFormat: @"%d", p_item->list.i[i]] action:NULL keyEquivalent: @""];
else
msg_Err(p_intf, "item %d of pref %s failed to be created", i, name);
- [mi setRepresentedObject:[NSNumber numberWithInt: p_item->list.i[i]]];
+ [mi setRepresentedObject:@(p_item->list.i[i])];
[[object menu] addItem: [mi autorelease]];
if (p_item->value.i == p_item->list.i[i])
[object selectItem:[object lastItem]];
for (size_t i_index = 0; i_index < count; i_index++) {
p_parser = p_list[i_index];
if (module_provides(p_parser, p_item->psz_type)) {
- [object addItemWithTitle: [NSString stringWithUTF8String: _(module_GetLongName(p_parser)) ?: ""]];
+ [object addItemWithTitle: @(_(module_GetLongName(p_parser)) ?: "")];
if (p_item->value.psz && !strcmp(p_item->value.psz, module_get_name(p_parser, false)))
[object selectItem: [object lastItem]];
}
- (void)setupField:(NSTextField *)o_object forOption:(const char *)psz_option
{
char *psz_tmp = config_GetPsz(p_intf, psz_option);
- [o_object setStringValue: [NSString stringWithUTF8String: psz_tmp ?: ""]];
+ [o_object setStringValue: @(psz_tmp ?: "")];
[o_object setToolTip: _NS(config_GetLabel(p_intf, psz_option))];
free(psz_tmp);
}
[o_video_device_pop addItemWithTitle: _NS("Default")];
[[o_video_device_pop lastItem] setTag: 0];
while (i < y) {
- NSRect s_rect = [[[NSScreen screens] objectAtIndex: i] frame];
+ NSRect s_rect = [[[NSScreen screens] objectAtIndex:i] frame];
[o_video_device_pop addItemWithTitle:
[NSString stringWithFormat: @"%@ %i (%ix%i)", _NS("Screen"), i+1,
(int)s_rect.size.width, (int)s_rect.size.height]];
- [[o_video_device_pop lastItem] setTag: (int)[[[NSScreen screens] objectAtIndex: i] displayID]];
+ [[o_video_device_pop lastItem] setTag: (int)[[[NSScreen screens] objectAtIndex:i] displayID]];
i++;
}
[o_video_device_pop selectItemAtIndex: 0];
&& !strncmp(p_item->psz_name , "key-", 4)
&& !EMPTY_STR(p_item->psz_text)) {
[o_tempArray_desc addObject: _NS(p_item->psz_text)];
- [o_tempArray_names addObject: [NSString stringWithUTF8String:p_item->psz_name]];
+ [o_tempArray_names addObject: @(p_item->psz_name)];
if (p_item->value.psz)
- [o_hotkeySettings addObject: [NSString stringWithUTF8String:p_item->value.psz]];
+ [o_hotkeySettings addObject: @(p_item->value.psz)];
else
[o_hotkeySettings addObject: [NSString string]];
}
- (IBAction)showFontPicker:(id)sender
{
char * font = config_GetPsz(p_intf, "freetype-font");
- NSString * fontName = font ? [NSString stringWithUTF8String: font] : nil;
+ NSString * fontName = font ? @(font) : nil;
free(font);
if (fontName) {
NSFont * font = [NSFont fontWithName:fontName size:0.0];
{
if (sender == o_hotkeys_change_btn || sender == o_hotkeys_listbox) {
[o_hotkeys_change_lbl setStringValue: [NSString stringWithFormat: _NS("Press new keys for\n\"%@\""),
- [o_hotkeyDescriptions objectAtIndex: [o_hotkeys_listbox selectedRow]]]];
- [o_hotkeys_change_keys_lbl setStringValue: [[VLCStringUtility sharedInstance] OSXStringKeyToString:[o_hotkeySettings objectAtIndex: [o_hotkeys_listbox selectedRow]]]];
+ [o_hotkeyDescriptions objectAtIndex:[o_hotkeys_listbox selectedRow]]]];
+ [o_hotkeys_change_keys_lbl setStringValue: [[VLCStringUtility sharedInstance] OSXStringKeyToString:[o_hotkeySettings objectAtIndex:[o_hotkeys_listbox selectedRow]]]];
[o_hotkeys_change_taken_lbl setStringValue: @""];
[o_hotkeys_change_win setInitialFirstResponder: [o_hotkeys_change_win contentView]];
[o_hotkeys_change_win makeFirstResponder: [o_hotkeys_change_win contentView]];
NSString * identifier = [aTableColumn identifier];
if ([identifier isEqualToString: @"action"])
- return [o_hotkeyDescriptions objectAtIndex: rowIndex];
+ return [o_hotkeyDescriptions objectAtIndex:rowIndex];
else if ([identifier isEqualToString: @"shortcut"])
- return [[VLCStringUtility sharedInstance] OSXStringKeyToString:[o_hotkeySettings objectAtIndex: rowIndex]];
+ return [[VLCStringUtility sharedInstance] OSXStringKeyToString:[o_hotkeySettings objectAtIndex:rowIndex]];
else {
msg_Err(p_intf, "unknown TableColumn identifier (%s)!", [identifier UTF8String]);
return NULL;
if (i_returnValue != NSNotFound)
[o_hotkeys_change_taken_lbl setStringValue: [NSString stringWithFormat:
_NS("This combination is already taken by \"%@\"."),
- [o_hotkeyDescriptions objectAtIndex: i_returnValue]]];
+ [o_hotkeyDescriptions objectAtIndex:i_returnValue]]];
else if (i_returnValue2 != NSNotFound)
[o_hotkeys_change_taken_lbl setStringValue: [NSString stringWithFormat:
_NS("This combination is already taken by \"%@\"."),
- [o_hotkeyDescriptions objectAtIndex: i_returnValue2]]];
+ [o_hotkeyDescriptions objectAtIndex:i_returnValue2]]];
else
[o_hotkeys_change_taken_lbl setStringValue: @""];