diff options
author | Damiano Galassi <[email protected]> | 2018-06-08 16:59:25 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2018-06-08 16:59:25 +0200 |
commit | c762b2c0ec5b6fb58d1fd453e2b5aed526c6d693 (patch) | |
tree | e0ab43c5ddd28ed876158b689be0c93c2380d970 /macosx/HBAudioController.m | |
parent | de7355d5ad5257c4cce5e0a99fffb3ee58264ba0 (diff) |
MacGui: set the minimum deployment target to 10.10. Remove Growl and use macOS standard notifications. Remove deprecated API usage and code that doesn't compile anymore (QTKit).
Diffstat (limited to 'macosx/HBAudioController.m')
-rw-r--r-- | macosx/HBAudioController.m | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/macosx/HBAudioController.m b/macosx/HBAudioController.m index 9432e943e..66a8d2a8a 100644 --- a/macosx/HBAudioController.m +++ b/macosx/HBAudioController.m @@ -7,8 +7,7 @@ #import "HBAudioController.h" #import "HBAudioDefaultsController.h" -@import HandBrakeKit.HBAudio; -@import HandBrakeKit.HBAudioDefaults; +@import HandBrakeKit; @interface HBAudioController () @@ -46,22 +45,13 @@ HBAudioDefaults *defaults = [self.audio.defaults copy]; self.defaultsController = [[HBAudioDefaultsController alloc] initWithSettings:defaults]; - [NSApp beginSheet:self.defaultsController.window - modalForWindow:self.view.window - modalDelegate:self - didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) - contextInfo:(void *)CFBridgingRetain(defaults)]; -} - -- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo -{ - HBAudioDefaults *defaults = (HBAudioDefaults *)CFBridgingRelease(contextInfo); - - if (returnCode == NSModalResponseOK) - { - self.audio.defaults = defaults; - } - self.defaultsController = nil; + [self.view.window beginSheet:self.defaultsController.window completionHandler:^(NSModalResponse returnCode) { + if (returnCode == NSModalResponseOK) + { + self.audio.defaults = defaults; + } + self.defaultsController = nil; + }]; } - (IBAction)reloadDefaults:(id)sender |