Don’t show the import sheet if we are importing only subtitles. Patch by Aymeric Bard.
This commit is contained in:
1 parent
494f2f537e
commit
ff487cfd2f
3 files changed
+32
-5
No files matched your search
+10
-4
@@ -720,11 +720,17 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn
|
||||
|
||||
importWindow = [[SBFileImport alloc] initWithDelegate:self andFiles:fileURLs error:&error];
|
||||
|
||||
if (importWindow)
|
||||
[NSApp beginSheet:[importWindow window] modalForWindow:documentWindow
|
||||
modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:importWindow];
|
||||
else if (error)
|
||||
if (importWindow) {
|
||||
if ([importWindow onlyContainsSubtitleTracks]) { //execute always. Maybe we should do this only for subtitle
|
||||
[importWindow addTracks:nil];
|
||||
[self sheetDidEnd:nil returnCode:NSOKButton contextInfo:nil];
|
||||
} else { // show the dialog
|
||||
[NSApp beginSheet:[importWindow window] modalForWindow:documentWindow
|
||||
modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:importWindow];
|
||||
}
|
||||
} else if (error) {
|
||||
[self presentError:error modalForWindow:documentWindow delegate:nil didPresentSelector:NULL contextInfo:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;{
|
||||
|
||||
Reference in new issue
Block a user