Commit d9923568 authored by David Fuhrmann's avatar David Fuhrmann

macosx: reorder and group CAS panel actions

No functional changes.
parent 91e3caa6
...@@ -143,13 +143,18 @@ ...@@ -143,13 +143,18 @@
- (IBAction)finalizePanel:(id)sender; - (IBAction)finalizePanel:(id)sender;
- (IBAction)openMedia:(id)sender; - (IBAction)openMedia:(id)sender;
- (IBAction)switchProfile:(id)sender; - (IBAction)switchProfile:(id)sender;
- (IBAction)customizeProfile:(id)sender;
- (IBAction)closeCustomizationSheet:(id)sender;
- (IBAction)newProfileAction:(id)sender;
- (IBAction)iWantAFile:(id)sender; - (IBAction)iWantAFile:(id)sender;
- (IBAction)iWantAStream:(id)sender; - (IBAction)iWantAStream:(id)sender;
- (IBAction)cancelDestination:(id)sender; - (IBAction)cancelDestination:(id)sender;
- (IBAction)browseFileDestination:(id)sender; - (IBAction)browseFileDestination:(id)sender;
- (IBAction)customizeProfile:(id)sender;
- (IBAction)closeCustomizationSheet:(id)sender;
- (IBAction)videoSettingsChanged:(id)sender;
- (IBAction)audioSettingsChanged:(id)sender;
- (IBAction)subSettingsChanged:(id)sender;
- (IBAction)newProfileAction:(id)sender;
- (IBAction)showStreamPanel:(id)sender; - (IBAction)showStreamPanel:(id)sender;
- (IBAction)closeStreamPanel:(id)sender; - (IBAction)closeStreamPanel:(id)sender;
- (IBAction)streamTypeToggle:(id)sender; - (IBAction)streamTypeToggle:(id)sender;
...@@ -159,10 +164,4 @@ ...@@ -159,10 +164,4 @@
- (void)panel:(VLCEnterTextPanel *)panel returnValue:(NSUInteger)value text:(NSString *)text; - (void)panel:(VLCEnterTextPanel *)panel returnValue:(NSUInteger)value text:(NSString *)text;
- (void)panel:(VLCSelectItemInPopupPanel *)panel returnValue:(NSUInteger)value item:(NSUInteger)item; - (void)panel:(VLCSelectItemInPopupPanel *)panel returnValue:(NSUInteger)value item:(NSUInteger)item;
- (IBAction)videoSettingsChanged:(id)sender;
- (IBAction)audioSettingsChanged:(id)sender;
- (IBAction)subSettingsChanged:(id)sender;
- (void)updateDropView;
@end @end
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
} }
# pragma mark - # pragma mark -
# pragma mark User Interaction # pragma mark User Interaction - main window
- (IBAction)finalizePanel:(id)sender - (IBAction)finalizePanel:(id)sender
{ {
...@@ -322,32 +322,6 @@ ...@@ -322,32 +322,6 @@
[self resetCustomizationSheetBasedOnProfile:[self.profileValueList objectAtIndex:index]]; [self resetCustomizationSheetBasedOnProfile:[self.profileValueList objectAtIndex:index]];
} }
- (IBAction)customizeProfile:(id)sender
{
[NSApp beginSheet:_customizePanel modalForWindow:self.window modalDelegate:self didEndSelector:NULL contextInfo:nil];
}
- (IBAction)closeCustomizationSheet:(id)sender
{
[_customizePanel orderOut:sender];
[NSApp endSheet: _customizePanel];
if (sender == _customizeOkButton)
[self updateCurrentProfile];
}
- (IBAction)newProfileAction:(id)sender
{
/* show panel */
VLCEnterTextPanel * panel = [VLCEnterTextPanel sharedInstance];
[panel setTitle: _NS("Save as new profile")];
[panel setSubTitle: _NS("Enter a name for the new profile:")];
[panel setCancelButtonLabel: _NS("Cancel")];
[panel setOKButtonLabel: _NS("Save")];
[panel setTarget:self];
[panel runModalForWindow:_customizePanel];
}
- (IBAction)deleteProfileAction:(id)sender - (IBAction)deleteProfileAction:(id)sender
{ {
...@@ -428,6 +402,63 @@ ...@@ -428,6 +402,63 @@
}]; }];
} }
#pragma mark -
#pragma mark User interaction - customization panel
- (IBAction)customizeProfile:(id)sender
{
[NSApp beginSheet:_customizePanel modalForWindow:self.window modalDelegate:self didEndSelector:NULL contextInfo:nil];
}
- (IBAction)closeCustomizationSheet:(id)sender
{
[_customizePanel orderOut:sender];
[NSApp endSheet: _customizePanel];
if (sender == _customizeOkButton)
[self updateCurrentProfile];
}
- (IBAction)videoSettingsChanged:(id)sender
{
bool enableSettings = [_customizeVidCheckbox state] == NSOnState && [_customizeVidKeepCheckbox state] == NSOffState;
[_customizeVidSettingsBox enableSubviews:enableSettings];
[_customizeVidKeepCheckbox setEnabled:[_customizeVidCheckbox state] == NSOnState];
}
- (IBAction)audioSettingsChanged:(id)sender
{
bool enableSettings = [_customizeAudCheckbox state] == NSOnState && [_customizeAudKeepCheckbox state] == NSOffState;
[_customizeAudSettingsBox enableSubviews:enableSettings];
[_customizeAudKeepCheckbox setEnabled:[_customizeAudCheckbox state] == NSOnState];
}
- (IBAction)subSettingsChanged:(id)sender
{
bool enableSettings = [_customizeSubsCheckbox state] == NSOnState;
[_customizeSubsOverlayCheckbox setEnabled:enableSettings];
[_customizeSubsPopup setEnabled:enableSettings];
}
- (IBAction)newProfileAction:(id)sender
{
/* show panel */
VLCEnterTextPanel * panel = [VLCEnterTextPanel sharedInstance];
[panel setTitle: _NS("Save as new profile")];
[panel setSubTitle: _NS("Enter a name for the new profile:")];
[panel setCancelButtonLabel: _NS("Cancel")];
[panel setOKButtonLabel: _NS("Save")];
[panel setTarget:self];
[panel runModalForWindow:_customizePanel];
}
#pragma mark -
#pragma mark User interaction - stream panel
- (IBAction)showStreamPanel:(id)sender - (IBAction)showStreamPanel:(id)sender
{ {
[NSApp beginSheet:_streamPanel modalForWindow:self.window modalDelegate:self didEndSelector:NULL contextInfo:nil]; [NSApp beginSheet:_streamPanel modalForWindow:self.window modalDelegate:self didEndSelector:NULL contextInfo:nil];
...@@ -521,6 +552,9 @@ ...@@ -521,6 +552,9 @@
}]; }];
} }
#pragma mark -
#pragma mark User interaction - misc
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{ {
NSPasteboard *paste = [sender draggingPasteboard]; NSPasteboard *paste = [sender draggingPasteboard];
...@@ -617,29 +651,9 @@ ...@@ -617,29 +651,9 @@
} }
} }
- (IBAction)videoSettingsChanged:(id)sender
{
bool enableSettings = [_customizeVidCheckbox state] == NSOnState && [_customizeVidKeepCheckbox state] == NSOffState;
[_customizeVidSettingsBox enableSubviews:enableSettings];
[_customizeVidKeepCheckbox setEnabled:[_customizeVidCheckbox state] == NSOnState];
}
- (IBAction)audioSettingsChanged:(id)sender
{
bool enableSettings = [_customizeAudCheckbox state] == NSOnState && [_customizeAudKeepCheckbox state] == NSOffState;
[_customizeAudSettingsBox enableSubviews:enableSettings];
[_customizeAudKeepCheckbox setEnabled:[_customizeAudCheckbox state] == NSOnState];
}
- (IBAction)subSettingsChanged:(id)sender
{
bool enableSettings = [_customizeSubsCheckbox state] == NSOnState;
[_customizeSubsOverlayCheckbox setEnabled:enableSettings];
[_customizeSubsPopup setEnabled:enableSettings];
}
# pragma mark - # pragma mark -
# pragma mark Private Functionality # pragma mark Private Functionality
- (void)updateDropView - (void)updateDropView
{ {
if ([_MRL length] > 0) { if ([_MRL length] > 0) {
......
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