macosx: Add new renderer menu item
authorMarvin Scholz <epirat07@gmail.com>
Thu, 16 Jun 2016 21:54:20 +0000 (23:54 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Fri, 17 Jun 2016 15:10:52 +0000 (17:10 +0200)
This adds a menu item to open the new renderer dialog

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
extras/package/macosx/Resources/English.lproj/MainMenu.xib
modules/gui/macosx/MainMenu.h
modules/gui/macosx/MainMenu.m

index 332c4e6..ba6fcc2 100644 (file)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10116" systemVersion="15F24b" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
         <deployment version="1070" identifier="macosx"/>
         <development version="7000" identifier="xcode"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10116"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
     </dependencies>
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="VLCMainMenu">
                 <outlet property="rate_view" destination="4596" id="MPC-hG-6bj"/>
                 <outlet property="readme" destination="1136" id="QoP-Va-kF5"/>
                 <outlet property="record" destination="5137" id="Ka3-jl-auY"/>
+                <outlet property="renderer" destination="Rf6-Uj-7Ja" id="Nzc-Qb-SnK"/>
                 <outlet property="repeat" destination="5143" id="ulG-wD-gtG"/>
                 <outlet property="revealInFinder" destination="3945" id="z7n-A2-K5o"/>
                 <outlet property="save_playlist" destination="1599" id="spC-pk-6W4"/>
                             <menuItem isSeparatorItem="YES" id="5154">
                                 <modifierMask key="keyEquivalentModifierMask" command="YES"/>
                             </menuItem>
+                            <menuItem title="Select Renderer…" id="Rf6-Uj-7Ja">
+                                <modifierMask key="keyEquivalentModifierMask"/>
+                                <connections>
+                                    <action selector="showRenderers:" target="-2" id="Y9L-YQ-3RJ"/>
+                                </connections>
+                            </menuItem>
                             <menuItem title="Program" id="5150">
                                 <menu key="submenu" title="Program" id="5157"/>
                             </menuItem>
index ce94855..271bfeb 100644 (file)
@@ -99,6 +99,7 @@
 @property (readwrite, weak) IBOutlet NSMenu *titleMenu;
 @property (readwrite, weak) IBOutlet NSMenuItem *chapter;
 @property (readwrite, weak) IBOutlet NSMenu *chapterMenu;
+@property (readwrite, weak) IBOutlet NSMenuItem *renderer;
 
 @property (readwrite, weak) IBOutlet NSMenu *audioMenu;
 @property (readwrite, weak) IBOutlet NSMenuItem *vol_up;
index e9c35dc..cfb679b 100644 (file)
@@ -46,6 +46,7 @@
 #import "DebugMessageVisualizer.h"
 #import "AddonsWindowController.h"
 #import "VLCTimeSelectionPanelController.h"
+#import "VLCRendererDialog.h"
 
 #ifdef HAVE_SPARKLE
 #import <Sparkle/Sparkle.h>
@@ -56,6 +57,7 @@
     AboutWindowController *_aboutWindowController;
     HelpWindowController  *_helpWindowController;
     AddonsWindowController *_addonsController;
+    VLCRendererDialog *_rendererDialog;
 
     NSMenu *_playlistTableColumnsContextMenu;
 
     [_titleMenu setTitle: _NS("Title")];
     [_chapter setTitle: _NS("Chapter")];
     [_chapterMenu setTitle: _NS("Chapter")];
+    [_renderer setTitle: _NS("Select Renderer…")];
 
     [_audioMenu setTitle: _NS("Audio")];
     [_vol_up setTitle: _NS("Increase Volume")];
     [_helpWindowController showHelp];
 }
 
+- (IBAction)showRenderers:(id)sender
+{
+    if (!_rendererDialog)
+        _rendererDialog = [[VLCRendererDialog alloc] init];
+
+    [_rendererDialog showWindow:self];
+}
+
 - (IBAction)openReadMe:(id)sender
 {
     NSString *path = [[NSBundle mainBundle] pathForResource: @"README.MacOSX" ofType: @"rtf"];
 
         [self setupMenus]; /* Make sure video menu is up to date */
 
+    } else if ([title isEqualToString: _NS("Select Renderer…")]) {
+        bEnabled = TRUE;
     } else if ([title isEqualToString: _NS("Add Subtitle File...")]) {
         bEnabled = [mi isEnabled];
         [self setupMenus]; /* Make sure subtitles menu is up to date */