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

macosx: upgrade read-only array initializations to the modern ObjC syntax

No functional changes
parent a7440cba
...@@ -379,7 +379,7 @@ static AppleRemote* sharedInstance=nil; ...@@ -379,7 +379,7 @@ static AppleRemote* sharedInstance=nil;
eventNumber= [NSNumber numberWithUnsignedInt:event]; eventNumber= [NSNumber numberWithUnsignedInt:event];
} }
[self performSelector: @selector(executeClickCountEvent:) [self performSelector: @selector(executeClickCountEvent:)
withObject: [NSArray arrayWithObjects:eventNumber, timeNumber, nil] withObject: @[eventNumber, timeNumber]
afterDelay: _maxClickTimeDifference]; afterDelay: _maxClickTimeDifference];
} else { } else {
[delegate appleRemoteButton:event pressedDown: pressedDown clickCount:1]; [delegate appleRemoteButton:event pressedDown: pressedDown clickCount:1];
......
...@@ -84,7 +84,7 @@ static VLCAudioEffects *_o_sharedInstance = nil; ...@@ -84,7 +84,7 @@ static VLCAudioEffects *_o_sharedInstance = nil;
NSString *defaultProfile = [NSString stringWithFormat:@"ZmxhdA==;;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%i", NSString *defaultProfile = [NSString stringWithFormat:@"ZmxhdA==;;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%i",
.0,25.,100.,-11.,8.,2.5,7.,.85,1.,.4,.5,.5,2.,0]; .0,25.,100.,-11.,8.,2.5,7.,.85,1.,.4,.5,.5,2.,0];
NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:[NSArray arrayWithArray:workValues], @"EQValues", [NSArray arrayWithArray:workPreamp], @"EQPreampValues", [NSArray arrayWithArray:workTitles], @"EQTitles", [NSArray arrayWithArray:workNames], @"EQNames", [NSArray arrayWithObject:defaultProfile], @"AudioEffectProfiles", [NSArray arrayWithObject:_NS("Default")], @"AudioEffectProfileNames", nil]; NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:[NSArray arrayWithArray:workValues], @"EQValues", [NSArray arrayWithArray:workPreamp], @"EQPreampValues", [NSArray arrayWithArray:workTitles], @"EQTitles", [NSArray arrayWithArray:workNames], @"EQNames", @[defaultProfile], @"AudioEffectProfiles", @[_NS("Default")], @"AudioEffectProfileNames", nil];
[defaults registerDefaults:appDefaults]; [defaults registerDefaults:appDefaults];
[workValues release]; [workValues release];
......
...@@ -217,18 +217,12 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -217,18 +217,12 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[self setProfileNames: [defaults arrayForKey:@"CASProfileNames"]]; [self setProfileNames: [defaults arrayForKey:@"CASProfileNames"]];
[self recreateProfilePopup]; [self recreateProfilePopup];
_videoCodecs = [[NSArray alloc] initWithObjects: _videoCodecs = @[@[@"MPEG-1", @"MPEG-2", @"MPEG-4", @"DIVX 1", @"DIVX 2", @"DIVX 3", @"H.263", @"H.264", @"VP8", @"WMV1", @"WMV2", @"M-JPEG", @"Theora", @"Dirac"],
[NSArray arrayWithObjects:@"MPEG-1", @"MPEG-2", @"MPEG-4", @"DIVX 1", @"DIVX 2", @"DIVX 3", @"H.263", @"H.264", @"VP8", @"WMV1", @"WMV2", @"M-JPEG", @"Theora", @"Dirac", nil], @[@"mpgv", @"mp2v", @"mp4v", @"DIV1", @"DIV2", @"DIV3", @"H263", @"h264", @"VP80", @"WMV1", @"WMV2", @"MJPG", @"theo", @"drac"]];
[NSArray arrayWithObjects:@"mpgv", @"mp2v", @"mp4v", @"DIV1", @"DIV2", @"DIV3", @"H263", @"h264", @"VP80", @"WMV1", @"WMV2", @"MJPG", @"theo", @"drac", nil], _audioCodecs = @[@[@"MPEG Audio", @"MP3", @"MPEG 4 Audio (AAC)", @"A52/AC-3", @"Vorbis", @"Flac", @"Speex", @"WAV", @"WMA2"],
nil]; @[@"mpga", @"mp3", @"mp4a", @"a52", @"vorb", @"flac", @"spx", @"s16l", @"wma2"]];
_audioCodecs = [[NSArray alloc] initWithObjects: _subsCodecs = @[@[@"DVB subtitle", @"T.140"],
[NSArray arrayWithObjects:@"MPEG Audio", @"MP3", @"MPEG 4 Audio (AAC)", @"A52/AC-3", @"Vorbis", @"Flac", @"Speex", @"WAV", @"WMA2", nil], @[@"dvbs", @"t140"]];
[NSArray arrayWithObjects:@"mpga", @"mp3", @"mp4a", @"a52", @"vorb", @"flac", @"spx", @"s16l", @"wma2", nil],
nil];
_subsCodecs = [[NSArray alloc] initWithObjects:
[NSArray arrayWithObjects:@"DVB subtitle", @"T.140", nil],
[NSArray arrayWithObjects:@"dvbs", @"t140", nil],
nil];
[_customize_vid_codec_pop removeAllItems]; [_customize_vid_codec_pop removeAllItems];
[_customize_vid_scale_pop removeAllItems]; [_customize_vid_scale_pop removeAllItems];
...@@ -430,7 +424,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -430,7 +424,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[saveFilePanel setCanSelectHiddenExtension: YES]; [saveFilePanel setCanSelectHiddenExtension: YES];
[saveFilePanel setCanCreateDirectories: YES]; [saveFilePanel setCanCreateDirectories: YES];
if ([[_customize_encap_matrix selectedCell] tag] != RAW) // there is no clever guess for this if ([[_customize_encap_matrix selectedCell] tag] != RAW) // there is no clever guess for this
[saveFilePanel setAllowedFileTypes:[NSArray arrayWithObject:[self currentEncapsulationFormatAsFileExtension:YES]]]; [saveFilePanel setAllowedFileTypes:@[[self currentEncapsulationFormatAsFileExtension:YES]]];
[saveFilePanel beginSheetModalForWindow:_window completionHandler:^(NSInteger returnCode) { [saveFilePanel beginSheetModalForWindow:_window completionHandler:^(NSInteger returnCode) {
if (returnCode == NSOKButton) { if (returnCode == NSOKButton) {
[self setOutputDestination:[[saveFilePanel URL] path]]; [self setOutputDestination:[[saveFilePanel URL] path]];
...@@ -530,7 +524,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -530,7 +524,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
NSSavePanel * saveFilePanel = [NSSavePanel savePanel]; NSSavePanel * saveFilePanel = [NSSavePanel savePanel];
[saveFilePanel setCanSelectHiddenExtension: YES]; [saveFilePanel setCanSelectHiddenExtension: YES];
[saveFilePanel setCanCreateDirectories: YES]; [saveFilePanel setCanCreateDirectories: YES];
[saveFilePanel setAllowedFileTypes:[NSArray arrayWithObject:@"sdp"]]; [saveFilePanel setAllowedFileTypes:@[@"sdp"]];
[saveFilePanel beginSheetModalForWindow:_stream_panel completionHandler:^(NSInteger returnCode) { [saveFilePanel beginSheetModalForWindow:_stream_panel completionHandler:^(NSInteger returnCode) {
if (returnCode == NSOKButton) if (returnCode == NSOKButton)
[_stream_sdp_fld setStringValue:[[saveFilePanel URL] path]]; [_stream_sdp_fld setStringValue:[[saveFilePanel URL] path]];
...@@ -540,7 +534,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -540,7 +534,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{ {
NSPasteboard *paste = [sender draggingPasteboard]; NSPasteboard *paste = [sender draggingPasteboard];
NSArray *types = [NSArray arrayWithObjects: NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]; NSArray *types = @[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"];
NSString *desired_type = [paste availableTypeFromArray: types]; NSString *desired_type = [paste availableTypeFromArray: types];
NSData *carried_data = [paste dataForType: desired_type]; NSData *carried_data = [paste dataForType: desired_type];
...@@ -1004,7 +998,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -1004,7 +998,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
- (void)awakeFromNib - (void)awakeFromNib
{ {
[self registerForDraggedTypes:[NSArray arrayWithObjects: NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]]; [self registerForDraggedTypes:@[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"]];
} }
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
...@@ -1070,7 +1064,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -1070,7 +1064,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
- (void)awakeFromNib - (void)awakeFromNib
{ {
[self registerForDraggedTypes:[NSArray arrayWithObjects: NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]]; [self registerForDraggedTypes:@[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"]];
} }
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
...@@ -1099,7 +1093,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -1099,7 +1093,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
- (void)awakeFromNib - (void)awakeFromNib
{ {
[self registerForDraggedTypes:[NSArray arrayWithObjects: NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]]; [self registerForDraggedTypes:@[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"]];
} }
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
......
...@@ -551,7 +551,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil; ...@@ -551,7 +551,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{ {
NSPasteboard *o_paste = [sender draggingPasteboard]; NSPasteboard *o_paste = [sender draggingPasteboard];
NSArray *o_types = [NSArray arrayWithObject: NSFilenamesPboardType]; NSArray *o_types = @[NSFilenamesPboardType];
NSString *o_desired_type = [o_paste availableTypeFromArray:o_types]; NSString *o_desired_type = [o_paste availableTypeFromArray:o_types];
NSData *o_carried_data = [o_paste dataForType:o_desired_type]; NSData *o_carried_data = [o_paste dataForType:o_desired_type];
BOOL b_autoplay = config_GetInt(VLCIntf, "macosx-autoplay"); BOOL b_autoplay = config_GetInt(VLCIntf, "macosx-autoplay");
......
...@@ -77,8 +77,8 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -77,8 +77,8 @@ static VLCMainMenu *_o_sharedInstance = nil;
_NS("URI"), URI_COLUMN, _NS("URI"), URI_COLUMN,
nil]; nil];
// this array also assigns tags (index) to type of menu item // this array also assigns tags (index) to type of menu item
o_ptc_menuorder = [NSArray arrayWithObjects:TRACKNUM_COLUMN, TITLE_COLUMN, ARTIST_COLUMN, DURATION_COLUMN, o_ptc_menuorder = @[TRACKNUM_COLUMN, TITLE_COLUMN, ARTIST_COLUMN, DURATION_COLUMN,
GENRE_COLUMN, ALBUM_COLUMN, DESCRIPTION_COLUMN, DATE_COLUMN, LANGUAGE_COLUMN, URI_COLUMN, nil]; GENRE_COLUMN, ALBUM_COLUMN, DESCRIPTION_COLUMN, DATE_COLUMN, LANGUAGE_COLUMN, URI_COLUMN];
} }
return _o_sharedInstance; return _o_sharedInstance;
...@@ -925,7 +925,7 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -925,7 +925,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
[openPanel setCanChooseFiles: YES]; [openPanel setCanChooseFiles: YES];
[openPanel setCanChooseDirectories: NO]; [openPanel setCanChooseDirectories: NO];
[openPanel setAllowsMultipleSelection: YES]; [openPanel setAllowsMultipleSelection: YES];
[openPanel setAllowedFileTypes: [NSArray arrayWithObjects: @"cdg",@"@idx",@"srt",@"sub",@"utf",@"ass",@"ssa",@"aqt",@"jss",@"psb",@"rt",@"smi",@"txt",@"smil", nil]]; [openPanel setAllowedFileTypes: @[@"cdg",@"@idx",@"srt",@"sub",@"utf",@"ass",@"ssa",@"aqt",@"jss",@"psb",@"rt",@"smi",@"txt",@"smil"]];
[openPanel setDirectoryURL:[NSURL fileURLWithPath:[[NSString stringWithUTF8String:path] stringByExpandingTildeInPath]]]; [openPanel setDirectoryURL:[NSURL fileURLWithPath:[[NSString stringWithUTF8String:path] stringByExpandingTildeInPath]]];
i_returnValue = [openPanel runModal]; i_returnValue = [openPanel runModal];
free(path); free(path);
......
...@@ -296,7 +296,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -296,7 +296,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
free(ppsz_longnames); free(ppsz_longnames);
free(p_categories); free(p_categories);
[libraryItem setChildren: [NSArray arrayWithObjects: playlistItem, medialibraryItem, nil]]; [libraryItem setChildren: @[playlistItem, medialibraryItem]];
[o_sidebaritems addObject: libraryItem]; [o_sidebaritems addObject: libraryItem];
if ([mycompItem hasChildren]) if ([mycompItem hasChildren])
[o_sidebaritems addObject: mycompItem]; [o_sidebaritems addObject: mycompItem];
...@@ -310,7 +310,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -310,7 +310,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_sidebar_view reloadData]; [o_sidebar_view reloadData];
[o_sidebar_view selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO]; [o_sidebar_view selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO];
[o_sidebar_view setDropItem:playlistItem dropChildIndex:NSOutlineViewDropOnItemIndex]; [o_sidebar_view setDropItem:playlistItem dropChildIndex:NSOutlineViewDropOnItemIndex];
[o_sidebar_view registerForDraggedTypes:[NSArray arrayWithObjects: NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]]; [o_sidebar_view registerForDraggedTypes:@[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"]];
[o_sidebar_view setAutosaveName:@"mainwindow-sidebar"]; [o_sidebar_view setAutosaveName:@"mainwindow-sidebar"];
[(PXSourceList *)o_sidebar_view setDataSource:self]; [(PXSourceList *)o_sidebar_view setDataSource:self];
...@@ -836,7 +836,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -836,7 +836,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[dict setObject:self forKey:NSViewAnimationTargetKey]; [dict setObject:self forKey:NSViewAnimationTargetKey];
[dict setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey]; [dict setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey];
o_makekey_anim = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObject:dict]]; o_makekey_anim = [[NSViewAnimation alloc] initWithViewAnimations:@[dict]];
[dict release]; [dict release];
[o_makekey_anim setAnimationBlockingMode: NSAnimationNonblocking]; [o_makekey_anim setAnimationBlockingMode: NSAnimationNonblocking];
......
...@@ -131,28 +131,26 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv ...@@ -131,28 +131,26 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv
+ (NSArray*)defaultMediaKeyUserBundleIdentifiers; + (NSArray*)defaultMediaKeyUserBundleIdentifiers;
{ {
return [NSArray arrayWithObjects: return @[[[NSBundle mainBundle] bundleIdentifier], // your app
[[NSBundle mainBundle] bundleIdentifier], // your app @"com.spotify.client",
@"com.spotify.client", @"com.apple.iTunes",
@"com.apple.iTunes", @"com.apple.QuickTimePlayerX",
@"com.apple.QuickTimePlayerX", @"com.apple.quicktimeplayer",
@"com.apple.quicktimeplayer", @"com.apple.iWork.Keynote",
@"com.apple.iWork.Keynote", @"com.apple.iPhoto",
@"com.apple.iPhoto", @"org.videolan.vlc",
@"org.videolan.vlc", @"com.apple.Aperture",
@"com.apple.Aperture", @"com.plexsquared.Plex",
@"com.plexsquared.Plex", @"com.soundcloud.desktop",
@"com.soundcloud.desktop", @"org.niltsh.MPlayerX",
@"org.niltsh.MPlayerX", @"com.ilabs.PandorasHelper",
@"com.ilabs.PandorasHelper", @"com.mahasoftware.pandabar",
@"com.mahasoftware.pandabar", @"com.bitcartel.pandorajam",
@"com.bitcartel.pandorajam", @"org.clementine-player.clementine",
@"org.clementine-player.clementine", @"fm.last.Last.fm",
@"fm.last.Last.fm", @"com.beatport.BeatportPro",
@"com.beatport.BeatportPro", @"com.Timenut.SongKey",
@"com.Timenut.SongKey", @"com.macromedia.fireworks", // the tap messes up their mouse input
@"com.macromedia.fireworks", // the tap messes up their mouse input
nil
]; ];
} }
......
...@@ -54,7 +54,8 @@ static VLCVideoEffects *_o_sharedInstance = nil; ...@@ -54,7 +54,8 @@ static VLCVideoEffects *_o_sharedInstance = nil;
+ (void)initialize + (void)initialize
{ {
NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:[NSArray arrayWithObject:@";;;0;1.000000;1.000000;1.000000;1.000000;0.050000;16;2.000000;OTA=;4;4;0;16711680;20;15;120;Z3JhZGllbnQ=;1;0;16711680;6;80;VkxD;-1;;-1;255;2;3;3"], @"VideoEffectProfiles", [NSArray arrayWithObject:_NS("Default")], @"VideoEffectProfileNames", nil]; NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:@[@";;;0;1.000000;1.000000;1.000000;1.000000;0.050000;16;2.000000;OTA=;4;4;0;16711680;20;15;120;Z3JhZGllbnQ=;1;0;16711680;6;80;VkxD;-1;;-1;255;2;3;3"], @"VideoEffectProfiles",
@[_NS("Default")], @"VideoEffectProfileNames", nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults]; [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults];
} }
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
-(id)initWithFrame:(NSRect)frameRect -(id)initWithFrame:(NSRect)frameRect
{ {
if (self = [super initWithFrame:frameRect]) { if (self = [super initWithFrame:frameRect]) {
[self registerForDraggedTypes:[NSArray arrayWithObject: NSFilenamesPboardType]]; [self registerForDraggedTypes:@[NSFilenamesPboardType]];
} }
i_lastScrollWheelDirection = 0; i_lastScrollWheelDirection = 0;
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
[dict setObject:self forKey:NSViewAnimationTargetKey]; [dict setObject:self forKey:NSViewAnimationTargetKey];
[dict setObject:NSViewAnimationFadeOutEffect forKey:NSViewAnimationEffectKey]; [dict setObject:NSViewAnimationFadeOutEffect forKey:NSViewAnimationEffectKey];
anim = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObjects:dict, nil]]; anim = [[NSViewAnimation alloc] initWithViewAnimations:@[dict]];
[dict release]; [dict release];
[anim setAnimationBlockingMode:NSAnimationNonblocking]; [anim setAnimationBlockingMode:NSAnimationNonblocking];
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
[dict setObject:self forKey:NSViewAnimationTargetKey]; [dict setObject:self forKey:NSViewAnimationTargetKey];
[dict setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey]; [dict setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey];
anim = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObjects:dict, nil]]; anim = [[NSViewAnimation alloc] initWithViewAnimations:@[dict]];
[dict release]; [dict release];
[anim setAnimationBlockingMode:NSAnimationNonblocking]; [anim setAnimationBlockingMode:NSAnimationNonblocking];
...@@ -859,8 +859,8 @@ ...@@ -859,8 +859,8 @@
- Keep at most 2 animation at a time - Keep at most 2 animation at a time
- leaveFullscreen/enterFullscreen are the only responsible for releasing and alloc-ing - leaveFullscreen/enterFullscreen are the only responsible for releasing and alloc-ing
*/ */
o_fullscreen_anim1 = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObject:dict1]]; o_fullscreen_anim1 = [[NSViewAnimation alloc] initWithViewAnimations:@[dict1]];
o_fullscreen_anim2 = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObject:dict2]]; o_fullscreen_anim2 = [[NSViewAnimation alloc] initWithViewAnimations:@[dict2]];
[dict1 release]; [dict1 release];
[dict2 release]; [dict2 release];
...@@ -978,7 +978,7 @@ ...@@ -978,7 +978,7 @@
[dict2 setObject:self forKey:NSViewAnimationTargetKey]; [dict2 setObject:self forKey:NSViewAnimationTargetKey];
[dict2 setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey]; [dict2 setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey];
o_fullscreen_anim2 = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObjects:dict2, nil]]; o_fullscreen_anim2 = [[NSViewAnimation alloc] initWithViewAnimations:@[dict2]];
[dict2 release]; [dict2 release];
[o_fullscreen_anim2 setAnimationBlockingMode: NSAnimationNonblocking]; [o_fullscreen_anim2 setAnimationBlockingMode: NSAnimationNonblocking];
...@@ -993,7 +993,7 @@ ...@@ -993,7 +993,7 @@
[dict1 setObject:[NSValue valueWithRect:[o_fullscreen_window frame]] forKey:NSViewAnimationStartFrameKey]; [dict1 setObject:[NSValue valueWithRect:[o_fullscreen_window frame]] forKey:NSViewAnimationStartFrameKey];
[dict1 setObject:[NSValue valueWithRect:frame] forKey:NSViewAnimationEndFrameKey]; [dict1 setObject:[NSValue valueWithRect:frame] forKey:NSViewAnimationEndFrameKey];
o_fullscreen_anim1 = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObjects:dict1, nil]]; o_fullscreen_anim1 = [[NSViewAnimation alloc] initWithViewAnimations:@[dict1]];
[dict1 release]; [dict1 release];
[o_fullscreen_anim1 setAnimationBlockingMode: NSAnimationNonblocking]; [o_fullscreen_anim1 setAnimationBlockingMode: NSAnimationNonblocking];
...@@ -1074,11 +1074,10 @@ ...@@ -1074,11 +1074,10 @@
static NSMutableArray *attributes = nil; static NSMutableArray *attributes = nil;
if (attributes == nil) { if (attributes == nil) {
attributes = [[super accessibilityAttributeNames] mutableCopy]; attributes = [[super accessibilityAttributeNames] mutableCopy];
NSArray *appendAttributes = [NSArray arrayWithObjects: NSAccessibilitySubroleAttribute, NSArray *appendAttributes = @[NSAccessibilitySubroleAttribute,
NSAccessibilityCloseButtonAttribute, NSAccessibilityCloseButtonAttribute,
NSAccessibilityMinimizeButtonAttribute, NSAccessibilityMinimizeButtonAttribute,
NSAccessibilityZoomButtonAttribute, NSAccessibilityZoomButtonAttribute];
nil];
for(NSString *attribute in appendAttributes) { for(NSString *attribute in appendAttributes) {
if (![attributes containsObject:attribute]) if (![attributes containsObject:attribute])
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
if (o_url != nil) if (o_url != nil)
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL: o_url]; [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL: o_url];
NSMutableArray *o_result = [NSMutableArray arrayWithObject:[NSDictionary dictionaryWithObject:o_urlString forKey:@"ITEM_URL"]]; NSArray *o_result = @[[NSDictionary dictionaryWithObject:o_urlString forKey: @"ITEM_URL"]];
if (b_autoplay) if (b_autoplay)
[[[VLCMain sharedInstance] playlist] appendArray: o_result atPos: -1 enqueue: NO]; [[[VLCMain sharedInstance] playlist] appendArray: o_result atPos: -1 enqueue: NO];
......
...@@ -1868,7 +1868,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1868,7 +1868,7 @@ static VLCMain *_o_sharedMainInstance = nil;
return; return;
} }
NSArray * ourPreferences = [NSArray arrayWithObjects:@"org.videolan.vlc.plist", @"VLC", @"org.videolan.vlc", nil]; NSArray * ourPreferences = @[@"org.videolan.vlc.plist", @"VLC", @"org.videolan.vlc"];
/* Move the file to trash so that user can find them later */ /* Move the file to trash so that user can find them later */
[[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:preferences destination:nil files:ourPreferences tag:0]; [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:preferences destination:nil files:ourPreferences tag:0];
...@@ -1982,7 +1982,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1982,7 +1982,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[saveFolderPanel setCanSelectHiddenExtension: NO]; [saveFolderPanel setCanSelectHiddenExtension: NO];
[saveFolderPanel setCanCreateDirectories: YES]; [saveFolderPanel setCanCreateDirectories: YES];
[saveFolderPanel setAllowedFileTypes: [NSArray arrayWithObject:@"rtf"]]; [saveFolderPanel setAllowedFileTypes: @[@"rtf"]];
[saveFolderPanel setNameFieldStringValue:[NSString stringWithFormat: _NS("VLC Debug Log (%s).rtf"), VERSION_MESSAGE]]; [saveFolderPanel setNameFieldStringValue:[NSString stringWithFormat: _NS("VLC Debug Log (%s).rtf"), VERSION_MESSAGE]];
[saveFolderPanel beginSheetModalForWindow: o_msgs_panel completionHandler:^(NSInteger returnCode) { [saveFolderPanel beginSheetModalForWindow: o_msgs_panel completionHandler:^(NSInteger returnCode) {
if (returnCode == NSOKButton) { if (returnCode == NSOKButton) {
......
...@@ -302,7 +302,7 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -302,7 +302,7 @@ static NSMutableArray *blackoutWindows = NULL;
- (void)awakeFromNib - (void)awakeFromNib
{ {
[self registerForDraggedTypes:[NSArray arrayWithObject: NSFilenamesPboardType]]; [self registerForDraggedTypes:@[NSFilenamesPboardType]];
[self setImageScaling: NSScaleToFit]; [self setImageScaling: NSScaleToFit];
[self setImageFrameStyle: NSImageFrameNone]; [self setImageFrameStyle: NSImageFrameNone];
[self setImageAlignment: NSImageAlignCenter]; [self setImageAlignment: NSImageAlignCenter];
...@@ -756,7 +756,7 @@ void _drawFrameInRect(NSRect frameRect) ...@@ -756,7 +756,7 @@ void _drawFrameInRect(NSRect frameRect)
- (void)awakeFromNib - (void)awakeFromNib
{ {
[self registerForDraggedTypes:[NSArray arrayWithObject: NSFilenamesPboardType]]; [self registerForDraggedTypes:@[NSFilenamesPboardType]];
} }
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
......
...@@ -514,9 +514,9 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -514,9 +514,9 @@ static VLCOpen *_o_sharedMainInstance = nil;
/* apply the options to our item(s) */ /* apply the options to our item(s) */
[o_dic setObject: (NSArray *)[o_options copy] forKey: @"ITEM_OPTIONS"]; [o_dic setObject: (NSArray *)[o_options copy] forKey: @"ITEM_OPTIONS"];
if (b_autoplay) if (b_autoplay)
[[[VLCMain sharedInstance] playlist] appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue:NO]; [[[VLCMain sharedInstance] playlist] appendArray: @[o_dic] atPos: -1 enqueue:NO];
else else
[[[VLCMain sharedInstance] playlist] appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue:YES]; [[[VLCMain sharedInstance] playlist] appendArray: @[o_dic] atPos: -1 enqueue:YES];
} }
} }
...@@ -1106,7 +1106,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -1106,7 +1106,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
/* work-around for Mountain Lion, which treats folders called "BDMV" including an item named "INDEX.BDM" /* work-around for Mountain Lion, which treats folders called "BDMV" including an item named "INDEX.BDM"
* as a _FILE_. Don't ask, move on. There is nothing to see here */ * as a _FILE_. Don't ask, move on. There is nothing to see here */
[o_open_panel setCanChooseFiles: YES]; [o_open_panel setCanChooseFiles: YES];
[o_open_panel setAllowedFileTypes:[NSArray arrayWithObjects:@"public.directory", nil]]; [o_open_panel setAllowedFileTypes:@[@"public.directory"]];
if ([o_open_panel runModal] == NSOKButton) { if ([o_open_panel runModal] == NSOKButton) {
NSString *o_path = [[[o_open_panel URLs] objectAtIndex: 0] path]; NSString *o_path = [[[o_open_panel URLs] objectAtIndex: 0] path];
......
...@@ -112,17 +112,17 @@ ...@@ -112,17 +112,17 @@
- (void)initStrings - (void)initStrings
{ {
NSArray *o_muxers = [NSArray arrayWithObjects: @"MPEG TS", @"MPEG PS", @"MPEG 1", NSArray *o_muxers = @[@"MPEG TS", @"MPEG PS", @"MPEG 1",
@"Ogg", @"AVI", @"ASF", @"MPEG 4", @"Quicktime", @"Raw", nil]; @"Ogg", @"AVI", @"ASF", @"MPEG 4", @"Quicktime", @"Raw"];
NSArray *o_a_channels = [NSArray arrayWithObjects: @"1", @"2", @"4", @"6", nil]; NSArray *o_a_channels = @[@"1", @"2", @"4", @"6"];
NSArray *o_a_bitrates = [NSArray arrayWithObjects: @"16", @"32", @"64", @"96", NSArray *o_a_bitrates = @[@"16", @"32", @"64", @"96",
@"128", @"192", @"256", @"512", nil]; @"128", @"192", @"256", @"512"];
NSArray *o_v_bitrates = [NSArray arrayWithObjects: @"16", @"32", @"64", @"96", NSArray *o_v_bitrates = @[@"16", @"32", @"64", @"96",
@"128", @"192", @"256", @"384", @"512", @"768", @"1024", @"2048", @"3072", nil]; @"128", @"192", @"256", @"384", @"512", @"768", @"1024", @"2048", @"3072"];
NSArray *o_v_scales = [NSArray arrayWithObjects: @"0.25",@"0.5",@"0.75",@"1",@"1.25",@"1.5",@"1.75",@"2",nil]; NSArray *o_v_scales = @[@"0.25",@"0.5",@"0.75",@"1",@"1.25",@"1.5",@"1.75",@"2"];
NSArray *o_a_codecs = [NSArray arrayWithObjects: @"mpga", @"mp3 ", @"mp4a", @"a52 ", @"vorb", @"flac", @"spx ", nil]; NSArray *o_a_codecs = @[@"mpga", @"mp3 ", @"mp4a", @"a52 ", @"vorb", @"flac", @"spx "];
NSArray *o_v_codecs = [NSArray arrayWithObjects: @"mp1v", @"mp2v", @"mp4v", @"DIV1", NSArray *o_v_codecs = @[@"mp1v", @"mp2v", @"mp4v", @"DIV1",
@"DIV2", @"DIV3", @"h263", @"h264", @"WMV1", @"WMV2", @"MJPG", @"theo", nil]; @"DIV2", @"DIV3", @"h263", @"h264", @"WMV1", @"WMV2", @"MJPG", @"theo"];
[o_output_ckbox setTitle: _NS("Streaming/Saving:")]; [o_output_ckbox setTitle: _NS("Streaming/Saving:")];
[o_output_settings setTitle: _NS("Settings...")]; [o_output_settings setTitle: _NS("Settings...")];
...@@ -340,13 +340,10 @@ ...@@ -340,13 +340,10 @@
if ([o_mode isEqualToString: _NS("File")]) { if ([o_mode isEqualToString: _NS("File")]) {
if ([o_dump_chkbox state] == NSOnState) { if ([o_dump_chkbox state] == NSOnState) {
NSMutableArray * o_sout_options; o_sout_options = @[@":demux=dump",
o_sout_options = [NSArray arrayWithObjects: [NSString stringWithFormat:
@":demux=dump", @":demuxdump-file=%@",
[NSString stringWithFormat: [o_file_field stringValue]]];
@":demuxdump-file=%@",
[o_file_field stringValue]],
nil];
[self setSoutMRL:o_sout_options]; [self setSoutMRL:o_sout_options];
return; return;
} else } else
...@@ -420,7 +417,7 @@ ...@@ -420,7 +417,7 @@
if ([o_display state] == NSOnState) if ([o_display state] == NSOnState)
[o_mrl_string appendString: @"}"]; [o_mrl_string appendString: @"}"];
o_sout_options = [NSArray arrayWithObjects: o_mrl_string,nil]; o_sout_options = @[o_mrl_string];
[self setSoutMRL:o_sout_options]; [self setSoutMRL:o_sout_options];
} }
......
...@@ -411,10 +411,10 @@ ...@@ -411,10 +411,10 @@
+ (void)initialize{ + (void)initialize{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSMutableArray * o_columnArray = [[NSMutableArray alloc] init]; NSMutableArray * o_columnArray = [[NSMutableArray alloc] init];
[o_columnArray addObject: [NSArray arrayWithObjects: TITLE_COLUMN, [NSNumber numberWithFloat: 190.], nil]]; [o_columnArray addObject: @[TITLE_COLUMN, @190.]];
[o_columnArray addObject: [NSArray arrayWithObjects: ARTIST_COLUMN, [NSNumber numberWithFloat: 95.], nil]]; [o_columnArray addObject: @[ARTIST_COLUMN, @95.]];
[o_columnArray addObject: [NSArray arrayWithObjects: DURATION_COLUMN, [NSNumber numberWithFloat: 95.], nil]]; [o_columnArray addObject: @[DURATION_COLUMN, @95.]];
NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:[NSArray arrayWithArray:o_columnArray] forKey:@"PlaylistColumnSelection"]; NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:[NSArray arrayWithArray:o_columnArray] forKey: @"PlaylistColumnSelection"];
[defaults registerDefaults:appDefaults]; [defaults registerDefaults:appDefaults];
[o_columnArray release]; [o_columnArray release];
...@@ -446,14 +446,10 @@ ...@@ -446,14 +446,10 @@
[o_outline_view setDoubleAction: @selector(playItem:)]; [o_outline_view setDoubleAction: @selector(playItem:)];
[o_outline_view_other setDoubleAction: @selector(playItem:)]; [o_outline_view_other setDoubleAction: @selector(playItem:)];
[o_outline_view registerForDraggedTypes: [o_outline_view registerForDraggedTypes: @[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"]];
[NSArray arrayWithObjects: NSFilenamesPboardType,
@"VLCPlaylistItemPboardType", nil]];
[o_outline_view setIntercellSpacing: NSMakeSize (0.0, 1.0)]; [o_outline_view setIntercellSpacing: NSMakeSize (0.0, 1.0)];
[o_outline_view_other registerForDraggedTypes: [o_outline_view_other registerForDraggedTypes: @[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"]];
[NSArray arrayWithObjects: NSFilenamesPboardType,
@"VLCPlaylistItemPboardType", nil]];
[o_outline_view_other setIntercellSpacing: NSMakeSize (0.0, 1.0)]; [o_outline_view_other setIntercellSpacing: NSMakeSize (0.0, 1.0)];
/* This uses a private API, but works fine on all current OSX releases. /* This uses a private API, but works fine on all current OSX releases.
...@@ -1374,7 +1370,7 @@ ...@@ -1374,7 +1370,7 @@
NSTableColumn * o_currentColumn; NSTableColumn * o_currentColumn;
for (NSUInteger i = 0; i < count; i++) { for (NSUInteger i = 0; i < count; i++) {
o_currentColumn = [o_columns objectAtIndex: i]; o_currentColumn = [o_columns objectAtIndex: i];
[o_arrayToSave addObject: [NSArray arrayWithObjects: [o_currentColumn identifier], [NSNumber numberWithFloat: [o_currentColumn width]], nil]]; [o_arrayToSave addObject: @[[o_currentColumn identifier], @([o_currentColumn width])]];
} }
[[NSUserDefaults standardUserDefaults] setObject: o_arrayToSave forKey:@"PlaylistColumnSelection"]; [[NSUserDefaults standardUserDefaults] setObject: o_arrayToSave forKey:@"PlaylistColumnSelection"];
[[NSUserDefaults standardUserDefaults] synchronize]; [[NSUserDefaults standardUserDefaults] synchronize];
...@@ -1424,8 +1420,7 @@ ...@@ -1424,8 +1420,7 @@
/* We add the "VLCPlaylistItemPboardType" type to be able to recognize /* We add the "VLCPlaylistItemPboardType" type to be able to recognize
a Drop operation coming from the playlist. */ a Drop operation coming from the playlist. */
[pboard declareTypes: [NSArray arrayWithObjects: [pboard declareTypes: @[@"VLCPlaylistItemPboardType"] owner: self];
@"VLCPlaylistItemPboardType", nil] owner: self];
[pboard setData:[NSData data] forType:@"VLCPlaylistItemPboardType"]; [pboard setData:[NSData data] forType:@"VLCPlaylistItemPboardType"];
return YES; return YES;
......
...@@ -2132,8 +2132,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -2132,8 +2132,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
[o_tableColumn setDataCell: o_dataCell]; [o_tableColumn setDataCell: o_dataCell];
[o_tableColumn setWidth:s_rc.size.width - 34]; [o_tableColumn setWidth:s_rc.size.width - 34];
[o_tableview addTableColumn: o_tableColumn]; [o_tableview addTableColumn: o_tableColumn];
[o_tableview registerForDraggedTypes:[NSArray arrayWithObjects: [o_tableview registerForDraggedTypes:@[@"VLC media player module"]];
@"VLC media player module", nil]];
[o_tableview setDataSource:self]; [o_tableview setDataSource:self];
[o_tableview setTarget: self]; [o_tableview setTarget: self];
...@@ -2205,8 +2204,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -2205,8 +2204,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
return NO; return NO;
} }
[pb declareTypes:[NSArray [pb declareTypes:@[@"VLC media player module"] owner:nil];
arrayWithObject:@"VLC media player module"] owner:nil];
[pb setPropertyList:rows forType:@"VLC media player module"]; [pb setPropertyList:rows forType:@"VLC media player module"];
return YES; return YES;
} }
......
...@@ -105,7 +105,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil; ...@@ -105,7 +105,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
[o_hotkeys_listbox setDoubleAction:@selector(hotkeyTableDoubleClick:)]; [o_hotkeys_listbox setDoubleAction:@selector(hotkeyTableDoubleClick:)];
/* setup useful stuff */ /* setup useful stuff */
o_hotkeysNonUseableKeys = [[NSArray arrayWithObjects: @"Command-c", @"Command-x", @"Command-v", @"Command-a", @"Command-," , @"Command-h", @"Command-Alt-h", @"Command-Shift-o", @"Command-o", @"Command-d", @"Command-n", @"Command-s", @"Command-z", @"Command-l", @"Command-r", @"Command-3", @"Command-m", @"Command-w", @"Command-Shift-w", @"Command-Shift-c", @"Command-Shift-p", @"Command-i", @"Command-e", @"Command-Shift-e", @"Command-b", @"Command-Shift-m", @"Command-Ctrl-m", @"Command-?", @"Command-Alt-?", nil] retain]; o_hotkeysNonUseableKeys = [@[@"Command-c", @"Command-x", @"Command-v", @"Command-a", @"Command-," , @"Command-h", @"Command-Alt-h", @"Command-Shift-o", @"Command-o", @"Command-d", @"Command-n", @"Command-s", @"Command-z", @"Command-l", @"Command-r", @"Command-3", @"Command-m", @"Command-w", @"Command-Shift-w", @"Command-Shift-c", @"Command-Shift-p", @"Command-i", @"Command-e", @"Command-Shift-e", @"Command-b", @"Command-Shift-m", @"Command-Ctrl-m", @"Command-?", @"Command-Alt-?"] retain];
} }
#define CreateToolbarItem(o_name, o_desc, o_img, sel) \ #define CreateToolbarItem(o_name, o_desc, o_img, sel) \
...@@ -155,20 +155,22 @@ create_toolbar_item(NSString * o_itemIdent, NSString * o_name, NSString * o_desc ...@@ -155,20 +155,22 @@ create_toolbar_item(NSString * o_itemIdent, NSString * o_name, NSString * o_desc
- (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar - (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar
{ {
return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier, return @[VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier,
VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier, NSToolbarFlexibleSpaceItemIdentifier, nil]; VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier,
NSToolbarFlexibleSpaceItemIdentifier];
} }
- (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar - (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar
{ {
return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier, return @[VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier,
VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier, NSToolbarFlexibleSpaceItemIdentifier, nil]; VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier,
NSToolbarFlexibleSpaceItemIdentifier];
} }
- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar - (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar
{ {
return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier, return @[VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier,
VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier, nil]; VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier];
} }
- (void)initStrings - (void)initStrings
...@@ -558,9 +560,8 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam ...@@ -558,9 +560,8 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
[self setupButton: o_input_mkv_preload_dir_ckb forBoolValue: "mkv-preload-local-dir"]; [self setupButton: o_input_mkv_preload_dir_ckb forBoolValue: "mkv-preload-local-dir"];
[o_input_cachelevel_pop removeAllItems]; [o_input_cachelevel_pop removeAllItems];
[o_input_cachelevel_pop addItemsWithTitles: [o_input_cachelevel_pop addItemsWithTitles: @[_NS("Custom"), _NS("Lowest latency"),
[NSArray arrayWithObjects: _NS("Custom"), _NS("Lowest latency"), _NS("Low latency"), _NS("Normal"), _NS("Low latency"), _NS("Normal"), _NS("High latency"), _NS("Higher latency")]];
_NS("High latency"), _NS("Higher latency"), nil]];
[[o_input_cachelevel_pop itemAtIndex: 0] setTag: 0]; [[o_input_cachelevel_pop itemAtIndex: 0] setTag: 0];
[[o_input_cachelevel_pop itemAtIndex: 1] setTag: 100]; [[o_input_cachelevel_pop itemAtIndex: 1] setTag: 100];
[[o_input_cachelevel_pop itemAtIndex: 2] setTag: 200]; [[o_input_cachelevel_pop itemAtIndex: 2] setTag: 200];
......
This diff is collapsed.
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