macosx: reorder and group CAS panel actions
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Wed, 5 Aug 2015 15:04:19 +0000 (17:04 +0200)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Thu, 6 Aug 2015 10:38:10 +0000 (12:38 +0200)
No functional changes.

modules/gui/macosx/ConvertAndSave.h
modules/gui/macosx/ConvertAndSave.m

index 6488964..70bc4bc 100644 (file)
 - (IBAction)finalizePanel:(id)sender;
 - (IBAction)openMedia:(id)sender;
 - (IBAction)switchProfile:(id)sender;
-- (IBAction)customizeProfile:(id)sender;
-- (IBAction)closeCustomizationSheet:(id)sender;
-- (IBAction)newProfileAction:(id)sender;
 - (IBAction)iWantAFile:(id)sender;
 - (IBAction)iWantAStream:(id)sender;
 - (IBAction)cancelDestination:(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)closeStreamPanel:(id)sender;
 - (IBAction)streamTypeToggle:(id)sender;
 - (void)panel:(VLCEnterTextPanel *)panel returnValue:(NSUInteger)value text:(NSString *)text;
 - (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
index 60a72a8..a56adff 100644 (file)
 }
 
 # pragma mark -
-# pragma mark User Interaction
+# pragma mark User Interaction - main window
 
 - (IBAction)finalizePanel:(id)sender
 {
         [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
 {
     }];
 }
 
+#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
 {
     [NSApp beginSheet:_streamPanel modalForWindow:self.window modalDelegate:self didEndSelector:NULL contextInfo:nil];
     }];
 }
 
+#pragma mark -
+#pragma mark User interaction - misc
+
 - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
 {
     NSPasteboard *paste = [sender draggingPasteboard];
     }
 }
 
-- (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 Private Functionality
+
 - (void)updateDropView
 {
     if ([_MRL length] > 0) {