Commit 0d2f7170 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx/main menu: use global list of supported subtitle extensions instead of...

macosx/main menu: use global list of supported subtitle extensions instead of hardcoding another one
parent 7d109ecf
......@@ -53,6 +53,8 @@
#import "windows/logging/VLCLogWindowController.h"
#import "windows/addons/VLCAddonsWindowController.h"
#import <vlc_interface.h>
#ifdef HAVE_SPARKLE
#import <Sparkle/Sparkle.h>
#endif
......@@ -1201,7 +1203,9 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
[openPanel setCanChooseDirectories: NO];
[openPanel setAllowsMultipleSelection: YES];
[openPanel setAllowedFileTypes: [NSArray arrayWithObjects:@"cdg",@"idx",@"srt",@"sub",@"utf",@"ass",@"ssa",@"aqt",@"jss",@"psb",@"rt",@"smi",@"txt",@"smil",@"stl",@"usf",@"dks",@"pjs",@"mpl2",@"mks",@"vtt",@"ttml",@"dfxp",nil]];
NSMutableString *subtitleExtensionsString = [toNSStr(EXTENSIONS_SUBTITLE) mutableCopy];
[subtitleExtensionsString replaceOccurrencesOfString:@"*." withString:@"" options:NSLiteralSearch range:NSMakeRange(0, subtitleExtensionsString.length)];
[openPanel setAllowedFileTypes:[subtitleExtensionsString componentsSeparatedByString:@";"]];
NSURL *url = _playerController.URLOfCurrentMediaItem;
url = [url URLByDeletingLastPathComponent];
......
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