Commit 0dea876e authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx/CAS: add a button for SDP file location selection

parent 2ad63ccb
......@@ -109,6 +109,7 @@
IBOutlet id _stream_channel_fld;
IBOutlet id _stream_sdp_matrix;
IBOutlet id _stream_sdp_fld;
IBOutlet id _stream_sdp_browsefile_btn;
NSString * _MRL;
NSString * _outputDestination;
......@@ -145,6 +146,7 @@
- (IBAction)closeStreamPanel:(id)sender;
- (IBAction)streamTypeToggle:(id)sender;
- (IBAction)streamAnnouncementToggle:(id)sender;
- (IBAction)sdpFileLocationSelector:(id)sender;
- (void)panel:(VLCEnterTextPanel *)panel returnValue:(NSUInteger)value text:(NSString *)text;
- (void)panel:(VLCSelectItemInPopupPanel *)panel returnValue:(NSUInteger)value item:(NSUInteger)item;
......
......@@ -500,6 +500,23 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
{
[_stream_channel_fld setEnabled:[_stream_sap_ckb state] && [_stream_sap_ckb isEnabled]];
[_stream_sdp_fld setEnabled:[_stream_sdp_matrix isEnabled] && ([_stream_sdp_matrix selectedCell] != [_stream_sdp_matrix cellWithTag:0])];
if ([[_stream_sdp_matrix selectedCell] tag] == 3)
[_stream_sdp_browsefile_btn setEnabled: YES];
else
[_stream_sdp_browsefile_btn setEnabled: NO];
}
- (IBAction)sdpFileLocationSelector:(id)sender
{
NSSavePanel * saveFilePanel = [NSSavePanel savePanel];
[saveFilePanel setCanSelectHiddenExtension: YES];
[saveFilePanel setCanCreateDirectories: YES];
[saveFilePanel setAllowedFileTypes:[NSArray arrayWithObject:@"sdp"]];
[saveFilePanel beginSheetModalForWindow:_stream_panel completionHandler:^(NSInteger returnCode) {
if (returnCode == NSOKButton)
[_stream_sdp_fld setStringValue:[[saveFilePanel URL] path]];
}];
}
- (BOOL)performDragOperation:(id <NSDraggingInfo>)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