[vlc-commits] macosx: reorder and group CAS panel actions

David Fuhrmann git at videolan.org
Thu Aug 6 12:38:27 CEST 2015


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Wed Aug  5 17:04:19 2015 +0200| [d9923568893b3f56709c1fc4f5045fed291b2197] | committer: David Fuhrmann

macosx: reorder and group CAS panel actions

No functional changes.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d9923568893b3f56709c1fc4f5045fed291b2197
---

 modules/gui/macosx/ConvertAndSave.h |   17 +++---
 modules/gui/macosx/ConvertAndSave.m |  110 ++++++++++++++++++++---------------
 2 files changed, 70 insertions(+), 57 deletions(-)

diff --git a/modules/gui/macosx/ConvertAndSave.h b/modules/gui/macosx/ConvertAndSave.h
index 6488964..70bc4bc 100644
--- a/modules/gui/macosx/ConvertAndSave.h
+++ b/modules/gui/macosx/ConvertAndSave.h
@@ -143,13 +143,18 @@
 - (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;
@@ -159,10 +164,4 @@
 - (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
diff --git a/modules/gui/macosx/ConvertAndSave.m b/modules/gui/macosx/ConvertAndSave.m
index 60a72a8..a56adff 100644
--- a/modules/gui/macosx/ConvertAndSave.m
+++ b/modules/gui/macosx/ConvertAndSave.m
@@ -250,7 +250,7 @@
 }
 
 # pragma mark -
-# pragma mark User Interaction
+# pragma mark User Interaction - main window
 
 - (IBAction)finalizePanel:(id)sender
 {
@@ -322,32 +322,6 @@
         [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
 {
@@ -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
 {
     [NSApp beginSheet:_streamPanel modalForWindow:self.window modalDelegate:self didEndSelector:NULL contextInfo:nil];
@@ -521,6 +552,9 @@
     }];
 }
 
+#pragma mark -
+#pragma mark User interaction - misc
+
 - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
 {
     NSPasteboard *paste = [sender draggingPasteboard];
@@ -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 Private Functionality
+
 - (void)updateDropView
 {
     if ([_MRL length] > 0) {



More information about the vlc-commits mailing list