Changed add files to observe playlist settings

Reverted 7f3da31b45, and reverted a past
commit of some sort. Now adding URLs and opening files from the Open...
option will obey the preferences for playlist adding, including modifier
keys, if used.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
CQTexperiment
Christopher Snowhill 2022-03-08 00:04:14 -08:00
parent 8cdbc28455
commit efadd1d012
1 changed files with 4 additions and 4 deletions

View File

@ -73,8 +73,8 @@ void *kAppControllerContext = &kAppControllerContext;
[p beginSheetModalForWindow:mainWindow
completionHandler:^(NSInteger result) {
if(result == NSModalResponseOK) {
[self->playlistLoader willInsertURLs:[p URLs] origin:URLOriginInternal];
[self->playlistLoader didInsertURLs:[self->playlistLoader addURLs:[p URLs] sort:YES] origin:URLOriginInternal];
[self->playlistLoader willInsertURLs:[p URLs] origin:URLOriginExternal];
[self->playlistLoader didInsertURLs:[self->playlistLoader addURLs:[p URLs] sort:YES] origin:URLOriginExternal];
} else {
[p close];
}
@ -111,8 +111,8 @@ void *kAppControllerContext = &kAppControllerContext;
- (void)openURLPanelDidEnd:(OpenURLPanel *)panel returnCode:(int)returnCode contextInfo:(void *)contextInfo {
if(returnCode == NSModalResponseOK) {
[playlistLoader willInsertURLs:@[[panel url]] origin:URLOriginInternal];
[playlistLoader didInsertURLs:[playlistLoader addURLs:@[[panel url]] sort:NO] origin:URLOriginInternal];
[playlistLoader willInsertURLs:@[[panel url]] origin:URLOriginExternal];
[playlistLoader didInsertURLs:[playlistLoader addURLs:@[[panel url]] sort:NO] origin:URLOriginExternal];
}
}