Commit 467c69f5 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: added start and stop time options to the advanced open file dialog

parent b6c82f0a
......@@ -65,6 +65,11 @@
IBOutlet id o_file_slave_icon_well;
IBOutlet id o_file_subtitles_filename_lbl;
IBOutlet id o_file_subtitles_icon_well;
IBOutlet id o_file_custom_timing_ckb;
IBOutlet id o_file_starttime_fld;
IBOutlet id o_file_starttime_lbl;
IBOutlet id o_file_stoptime_fld;
IBOutlet id o_file_stoptime_lbl;
/* open disc */
IBOutlet id o_disc_selector_pop;
......@@ -258,6 +263,7 @@
- (void)textFieldWasClicked:(NSNotification *)o_notification;
- (IBAction)expandMRLfieldAction:(id)sender;
- (IBAction)inputSlaveAction:(id)sender;
- (IBAction)fileTimeCustomization:(id)sender;
- (void)openFileGeneric;
- (void)openFilePathChanged:(NSNotification *)o_notification;
......
......@@ -143,6 +143,11 @@ static VLCOpen *_o_sharedMainInstance = nil;
[o_file_slave_icon_well setImage: NULL];
[o_file_subtitles_filename_lbl setStringValue: @""];
[o_file_subtitles_icon_well setImage: NULL];
[o_file_custom_timing_ckb setTitle: _NS("Custom playback")];
[o_file_starttime_lbl setStringValue: _NS("Start time")];
[o_file_starttime_fld setStringValue: @""];
[o_file_stoptime_lbl setStringValue: _NS("Stop time")];
[o_file_stoptime_fld setStringValue: @""];
[o_disc_selector_pop removeAllItems];
[o_disc_selector_pop setHidden: NO];
......@@ -450,6 +455,10 @@ static VLCOpen *_o_sharedMainInstance = nil;
p_item->pi_list[[o_file_sub_size_pop indexOfSelectedItem]]]];
}
}
if ([o_file_starttime_fld intValue] > 0)
[o_options addObject: [NSString stringWithFormat:@"start-time=%@", [o_file_starttime_fld stringValue]]];
if ([o_file_stoptime_fld intValue] > 0)
[o_options addObject: [NSString stringWithFormat:@"stop-time=%@", [o_file_stoptime_fld stringValue]]];
if( [o_output_ckbox state] == NSOnState )
{
NSUInteger count = [[o_sout_options mrl] count];
......@@ -769,6 +778,15 @@ static VLCOpen *_o_sharedMainInstance = nil;
}
}
- (IBAction)fileTimeCustomization:(id)sender
{
BOOL b_value = [o_file_custom_timing_ckb state];
[o_file_starttime_fld setEnabled: b_value];
[o_file_starttime_lbl setEnabled: b_value];
[o_file_stoptime_fld setEnabled: b_value];
[o_file_stoptime_lbl setEnabled: b_value];
}
#pragma mark -
#pragma mark Optical Media Panel
......
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