[vlc-commits] macosx/open: reimplement output panel appearance

Felix Paul Kühne git at videolan.org
Mon Jul 20 18:55:43 CEST 2015


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Jul 20 18:54:50 2015 +0200| [4477fc9139f5eed68c58c9c275778f8cfa572d42] | committer: Felix Paul Kühne

macosx/open: reimplement output panel appearance

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

 .../macosx/Resources/English.lproj/Open.xib        |    7 +++++++
 modules/gui/macosx/open.h                          |    2 ++
 modules/gui/macosx/open.m                          |   20 ++++++++++++++++++++
 3 files changed, 29 insertions(+)

diff --git a/extras/package/macosx/Resources/English.lproj/Open.xib b/extras/package/macosx/Resources/English.lproj/Open.xib
index bc19f5e..3aa853d 100644
--- a/extras/package/macosx/Resources/English.lproj/Open.xib
+++ b/extras/package/macosx/Resources/English.lproj/Open.xib
@@ -125,6 +125,7 @@
                 <outlet property="netUDPProtocolMatrix" destination="2860" id="BXg-n9-cH5"/>
                 <outlet property="okButton" destination="640" id="S9F-WP-A7y"/>
                 <outlet property="outputCheckbox" destination="929" id="Gz1-rY-w0Q"/>
+                <outlet property="outputSettingsButton" destination="1256" id="ruY-7h-HIS"/>
                 <outlet property="panel" destination="636" id="POG-Xe-8j5"/>
                 <outlet property="qtkAudioCheckbox" destination="3492" id="5d3-k7-1dB"/>
                 <outlet property="qtkAudioDevicePopup" destination="3438" id="Jt3-3n-AjR"/>
@@ -180,6 +181,9 @@
                             <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
                             <font key="font" metaFont="system"/>
                         </buttonCell>
+                        <connections>
+                            <action selector="outputSettings:" target="-2" id="EUk-e1-Lcu"/>
+                        </connections>
                     </button>
                     <button verticalHuggingPriority="750" id="640">
                         <rect key="frame" x="437" y="12" width="123" height="32"/>
@@ -506,6 +510,9 @@ Gw
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                             <font key="font" metaFont="system"/>
                         </buttonCell>
+                        <connections>
+                            <action selector="outputSettings:" target="-2" id="hbB-87-Udf"/>
+                        </connections>
                     </button>
                     <textField verticalHuggingPriority="750" id="2835" customClass="VLCOpenTextField">
                         <rect key="frame" x="38" y="82" width="246" height="17"/>
diff --git a/modules/gui/macosx/open.h b/modules/gui/macosx/open.h
index 997fe67..beabc02 100644
--- a/modules/gui/macosx/open.h
+++ b/modules/gui/macosx/open.h
@@ -39,6 +39,7 @@
 
 /* bottom-line items */
 @property (readwrite, weak) IBOutlet NSButton *outputCheckbox;
+ at property (readwrite, weak) IBOutlet NSButton *outputSettingsButton;
 
 /* open file */
 @property (readwrite, weak) IBOutlet NSTextField *fileNameLabel;
@@ -211,6 +212,7 @@
 @property (nonatomic) float fileSubDelay;
 @property (nonatomic) float fileSubFps;
 
+- (IBAction)outputSettings:(id)sender;
 - (void)setSubPanel;
 - (void)tabView:(NSTabView *)o_tv didSelectTabViewItem:(NSTabViewItem *)o_tvi;
 - (void)textFieldWasClicked:(NSNotification *)o_notification;
diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m
index 1514e0b..b9ae604 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -53,6 +53,7 @@ struct display_info_t
 @interface VLCOpen()
 {
     VLCOutput *_output;
+    BOOL b_outputNibLoaded;
     NSArray *_qtkvideoDevices;
     NSArray *_qtkaudioDevices;
     NSString *_qtkCurrentDeviceUID;
@@ -92,6 +93,8 @@ struct display_info_t
 
 - (void)awakeFromNib
 {
+    _output = [VLCOutput new];
+
     [_panel setCollectionBehavior: NSWindowCollectionBehaviorFullScreenAuxiliary];
 
     [_panel setTitle: _NS("Open Source")];
@@ -652,6 +655,23 @@ struct display_info_t
     }
 }
 
+- (IBAction)outputSettings:(id)sender
+{
+    if (sender == self.outputCheckbox) {
+        self.outputSettingsButton.enabled = self.outputCheckbox.state;
+        return;
+    }
+
+    if (!b_outputNibLoaded)
+        b_outputNibLoaded = [NSBundle loadNibNamed:@"StreamOutput" owner:_output];
+
+    [NSApp beginSheet:_output.outputSheet
+       modalForWindow:self.panel
+        modalDelegate:self
+       didEndSelector:NULL
+          contextInfo:nil];
+}
+
 #pragma mark -
 #pragma mark File Panel
 



More information about the vlc-commits mailing list