Commit 41041ace authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx/CAS: replace deprecated API calls with modern blocks-based counterparts

parent b03db9b5
...@@ -298,17 +298,14 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -298,17 +298,14 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[openPanel setCanChooseDirectories:NO]; [openPanel setCanChooseDirectories:NO];
[openPanel setResolvesAliases:YES]; [openPanel setResolvesAliases:YES];
[openPanel setAllowsMultipleSelection:NO]; [openPanel setAllowsMultipleSelection:NO];
[openPanel beginSheetForDirectory:nil file:nil types:nil modalForWindow: _window modalDelegate:self didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:nil]; [openPanel beginSheetModalForWindow:_window completionHandler:^(NSInteger returnCode) {
} if (returnCode == NSOKButton)
{
- (void)openPanelDidEnd:(NSOpenPanel *)panel returnCode:(int)returnCode contextInfo:(void *)contextInfo [self setMRL: [NSString stringWithUTF8String:vlc_path2uri([[[openPanel URL] path] UTF8String], NULL)]];
{ [self updateOKButton];
if (returnCode == NSOKButton) [self updateDropView];
{ }
[self setMRL: [NSString stringWithUTF8String:vlc_path2uri([[[panel URL] path] UTF8String], NULL)]]; }];
[self updateOKButton];
[self updateDropView];
}
} }
- (IBAction)switchProfile:(id)sender - (IBAction)switchProfile:(id)sender
...@@ -418,22 +415,19 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -418,22 +415,19 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[saveFilePanel setCanCreateDirectories: YES]; [saveFilePanel setCanCreateDirectories: YES];
if ([[_customize_encap_matrix selectedCell] tag] != RAW) // there is no clever guess for this if ([[_customize_encap_matrix selectedCell] tag] != RAW) // there is no clever guess for this
[saveFilePanel setAllowedFileTypes:[NSArray arrayWithObject:[self currentEncapsulationFormatAsFileExtension:YES]]]; [saveFilePanel setAllowedFileTypes:[NSArray arrayWithObject:[self currentEncapsulationFormatAsFileExtension:YES]]];
[saveFilePanel beginSheetForDirectory:nil file:nil modalForWindow:_window modalDelegate:self didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:nil]; [saveFilePanel beginSheetModalForWindow:_window completionHandler:^(NSInteger returnCode) {
} if (returnCode == NSOKButton) {
[self setOutputDestination:[[saveFilePanel URL] path]];
- (void)savePanelDidEnd:(NSSavePanel *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo [_destination_filename_lbl setStringValue: [[NSFileManager defaultManager] displayNameAtPath:_outputDestination]];
{ [[_destination_filename_stub_lbl animator] setHidden: YES];
if (returnCode == NSOKButton) { [[_destination_filename_lbl animator] setHidden: NO];
[self setOutputDestination:[[sheet URL] path]]; } else {
[_destination_filename_lbl setStringValue: [[NSFileManager defaultManager] displayNameAtPath:_outputDestination]]; [self setOutputDestination:@""];
[[_destination_filename_stub_lbl animator] setHidden: YES]; [[_destination_filename_lbl animator] setHidden: YES];
[[_destination_filename_lbl animator] setHidden: NO]; [[_destination_filename_stub_lbl animator] setHidden: NO];
} else { }
[self setOutputDestination:@""]; [self updateOKButton];
[[_destination_filename_lbl animator] setHidden: YES]; }];
[[_destination_filename_stub_lbl animator] setHidden: NO];
}
[self updateOKButton];
} }
- (IBAction)showStreamPanel:(id)sender - (IBAction)showStreamPanel:(id)sender
......
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