_NS("URI"), URI_COLUMN,
nil];
// this array also assigns tags (index) to type of menu item
- o_ptc_menuorder = [NSArray arrayWithObjects:TRACKNUM_COLUMN, TITLE_COLUMN, ARTIST_COLUMN, DURATION_COLUMN,
- GENRE_COLUMN, ALBUM_COLUMN, DESCRIPTION_COLUMN, DATE_COLUMN, LANGUAGE_COLUMN, URI_COLUMN, nil];
+ o_ptc_menuorder = @[TRACKNUM_COLUMN, TITLE_COLUMN, ARTIST_COLUMN, DURATION_COLUMN,
+ GENRE_COLUMN, ALBUM_COLUMN, DESCRIPTION_COLUMN, DATE_COLUMN, LANGUAGE_COLUMN, URI_COLUMN];
}
return _o_sharedInstance;
/* check whether the user runs OSX with a RTL language */
NSArray* languages = [NSLocale preferredLanguages];
- NSString* preferredLanguage = [languages objectAtIndex:0];
+ NSString* preferredLanguage = languages[0];
if ([NSLocale characterDirectionForLanguage:preferredLanguage] == NSLocaleLanguageDirectionRightToLeft) {
msg_Dbg(VLCIntf, "adapting interface since '%s' is a RTL language", [preferredLanguage UTF8String]);
[mi setTarget:self];
[mi setAction:selector];
[mi setTag:p_item->list.i[i]];
- [mi setRepresentedObject:[NSString stringWithUTF8String:psz_name]];
+ [mi setRepresentedObject:@(psz_name)];
[menu addItem: [mi autorelease]];
if (p_item->value.i == p_item->list.i[i])
[mi setState:NSOnState];
[o_mi_snapshot setTitle: _NS("Snapshot")];
[o_mi_videotrack setTitle: _NS("Video Track")];
[o_mu_videotrack setTitle: _NS("Video Track")];
- [o_mi_aspect_ratio setTitle: _NS("Aspect-ratio")];
- [o_mu_aspect_ratio setTitle: _NS("Aspect-ratio")];
+ [o_mi_aspect_ratio setTitle: _NS("Aspect ratio")];
+ [o_mu_aspect_ratio setTitle: _NS("Aspect ratio")];
[o_mi_crop setTitle: _NS("Crop")];
[o_mu_crop setTitle: _NS("Crop")];
[o_mi_screen setTitle: _NS("Fullscreen Video Device")];
[o_mu_ffmpeg_pp setTitle: _NS("Post processing")];
[o_mu_subtitles setTitle:_NS("Subtitles")];
+ [o_mi_openSubtitleFile setTitle: _NS("Add Subtitle File...")];
[o_mi_subtitle_track setTitle: _NS("Subtitles Track")];
[o_mu_subtitle_tracks setTitle: _NS("Subtitles Track")];
- [o_mi_openSubtitleFile setTitle: _NS("Open File...")];
+ [o_mi_subtitle_size setTitle: _NS("Text Size")];
+ [o_mi_subtitle_textcolor setTitle: _NS("Text Color")];
+ [o_mi_subtitle_outlinethickness setTitle: _NS("Outline Thickness")];
[o_mi_subtitle_bgopacity setView: o_mi_subtitle_bgopacity_view];
+ [o_mi_subtitle_bgopacity_lbl setStringValue: _NS("Background Opacity")];
+ [o_mi_subtitle_bgopacity_lbl_gray setStringValue: _NS("Background Opacity")];
+ [o_mi_subtitle_bgcolor setTitle: _NS("Background Color")];
[o_mi_teletext setTitle: _NS("Teletext")];
[o_mi_teletext_transparent setTitle: _NS("Transparent")];
[o_mi_teletext_index setTitle: _NS("Index")];
NSMenuItem *o_mi_tmp;
NSUInteger count = [o_ptc_menuorder count];
for (NSUInteger i = 0; i < count; i++) {
- NSString *o_title = [o_ptc_translation_dict objectForKey:[o_ptc_menuorder objectAtIndex:i]];
+ NSString *o_title = [o_ptc_translation_dict objectForKey:o_ptc_menuorder[i]];
o_mi_tmp = [o_mu_playlistTableColumns addItemWithTitle:o_title
action:@selector(togglePlaylistColumnTable:)
keyEquivalent:@""];
/* don't set a valid target for the title column selector, since we want it to be disabled */
- if (![[o_ptc_menuorder objectAtIndex:i] isEqualToString: TITLE_COLUMN])
+ if (![o_ptc_menuorder[i] isEqualToString: TITLE_COLUMN])
[o_mi_tmp setTarget:self];
[o_mi_tmp setTag:i];
action:@selector(togglePlaylistColumnTable:)
keyEquivalent:@""];
/* don't set a valid target for the title column selector, since we want it to be disabled */
- if (![[o_ptc_menuorder objectAtIndex:i] isEqualToString: TITLE_COLUMN])
+ if (![o_ptc_menuorder[i] isEqualToString: TITLE_COLUMN])
[o_mi_tmp setTarget:self];
[o_mi_tmp setTag:i];
}
NSArray *menuitems_array = [the_menu itemArray];
NSUInteger menuItemCount = [menuitems_array count];
for (NSUInteger i=0; i < menuItemCount; i++) {
- NSMenuItem *one_item = [menuitems_array objectAtIndex: i];
+ NSMenuItem *one_item = menuitems_array[i];
if ([one_item hasSubmenu])
[self releaseRepresentedObjects: [one_item submenu]];
[o_mitem setTarget: self];
NSRect s_rect;
for (NSUInteger i = 0; i < count; i++) {
- s_rect = [[o_screens objectAtIndex: i] frame];
+ s_rect = [o_screens[i] frame];
[o_submenu addItemWithTitle: [NSString stringWithFormat: @"%@ %li (%ix%i)", _NS("Screen"), i+1,
(int)s_rect.size.width, (int)s_rect.size.height] action:@selector(toggleFullscreenDevice:) keyEquivalent:@""];
o_mitem = [o_submenu itemAtIndex:i+1];
- [o_mitem setTag: (int)[[o_screens objectAtIndex: i] displayID]];
+ [o_mitem setTag: (int)[o_screens[i] displayID]];
[o_mitem setEnabled: YES];
[o_mitem setTarget: self];
}
- (IBAction)toggleSidebar:(id)sender
{
- BOOL b_value = !config_GetInt(VLCIntf, "macosx-show-sidebar");
- config_PutInt(VLCIntf, "macosx-show-sidebar", b_value);
[[[VLCMain sharedInstance] mainWindow] toggleLeftSubSplitView];
- [o_mi_toggleSidebar setState: b_value];
}
- (void)updateSidebarMenuItem
[[o_mu_playlistTableColumns itemWithTag: i_tag] setState: i_new_state];
[[o_mu_playlistTableColumnsContextMenu itemWithTag: i_tag] setState: i_new_state];
- NSString *o_column = [o_ptc_menuorder objectAtIndex: i_tag];
+ NSString *o_column = o_ptc_menuorder[i_tag];
[[[VLCMain sharedInstance] playlist] setColumn: o_column state: i_new_state translationDict: o_ptc_translation_dict];
}
[openPanel setCanChooseFiles: YES];
[openPanel setCanChooseDirectories: NO];
[openPanel setAllowsMultipleSelection: YES];
- [openPanel setAllowedFileTypes: [NSArray arrayWithObjects: @"cdg",@"@idx",@"srt",@"sub",@"utf",@"ass",@"ssa",@"aqt",@"jss",@"psb",@"rt",@"smi",@"txt",@"smil", nil]];
- [openPanel setDirectoryURL:[NSURL fileURLWithPath:[[NSString stringWithUTF8String:path] stringByExpandingTildeInPath]]];
+ [openPanel setAllowedFileTypes: @[@"cdg",@"@idx",@"srt",@"sub",@"utf",@"ass",@"ssa",@"aqt",@"jss",@"psb",@"rt",@"smi",@"txt",@"smil"]];
+ [openPanel setDirectoryURL:[NSURL fileURLWithPath:[@(path) stringByExpandingTildeInPath]]];
i_returnValue = [openPanel runModal];
free(path);
c = [[openPanel URLs] count];
for (int i = 0; i < c ; i++) {
- msg_Dbg(VLCIntf, "loading subs from %s", [[[[openPanel URLs] objectAtIndex: i] path] UTF8String]);
- if (input_AddSubtitle(p_input, [[[[openPanel URLs] objectAtIndex: i] path] UTF8String], TRUE))
+ msg_Dbg(VLCIntf, "loading subs from %s", [[[openPanel URLs][i] path] UTF8String]);
+ if (input_AddSubtitle(p_input, [[[openPanel URLs][i] path] UTF8String], TRUE))
msg_Warn(VLCIntf, "unable to load subtitles from '%s'",
- [[[[openPanel URLs] objectAtIndex: i] path] UTF8String]);
+ [[[openPanel URLs][i] path] UTF8String]);
}
}
vlc_object_release(p_input);
[o_parent setEnabled:NO];
/* Aspect Ratio */
- if ([[o_parent title] isEqualToString: _NS("Aspect-ratio")] == YES) {
+ if ([[o_parent title] isEqualToString: _NS("Aspect ratio")] == YES) {
NSMenuItem *o_lmi_tmp2;
o_lmi_tmp2 = [o_menu addItemWithTitle: _NS("Lock Aspect Ratio") action: @selector(lockVideosAspectRatio:) keyEquivalent: @""];
[o_lmi_tmp2 setTarget: [[VLCMain sharedInstance] controls]];