From d06eec4ff0d4c606916ce7ea470ba989cd0394a0 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 9 Apr 2021 11:16:12 -0700 Subject: [PATCH] Set allowed extensions for the save picker when saving a playlist --- Application/AppController.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Application/AppController.m b/Application/AppController.m index 7ad80cc06..6c382ae57 100644 --- a/Application/AppController.m +++ b/Application/AppController.m @@ -86,6 +86,11 @@ void* kAppControllerContext = &kAppControllerContext; NSSavePanel *p; p = [NSSavePanel savePanel]; + + /* Yes, this is deprecated. Yes, this is required to give the dialog + * a default set of filename extensions to save, including adding an + * extension if the user does not supply one. */ + [p setAllowedFileTypes:[NSArray arrayWithObjects:@"m3u", @"pls", nil]]; [p beginSheetModalForWindow:mainWindow completionHandler:^(NSInteger result) { if ( result == NSModalResponseOK ) {