[vlc-devel] [PATCH 4/5] macosx: Add new renderer menu item

Marvin Scholz epirat07 at gmail.com
Thu Jun 16 23:54:20 CEST 2016


This adds a menu item to open the new renderer dialog
---
 extras/package/macosx/Resources/English.lproj/MainMenu.xib | 11 +++++++++--
 modules/gui/macosx/MainMenu.h                              |  1 +
 modules/gui/macosx/MainMenu.m                              | 13 +++++++++++++
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.xib b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
index 332c4e6..ba6fcc2 100644
--- a/extras/package/macosx/Resources/English.lproj/MainMenu.xib
+++ b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
@@ -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">
@@ -106,6 +106,7 @@
                 <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"/>
@@ -483,6 +484,12 @@
                             <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>
diff --git a/modules/gui/macosx/MainMenu.h b/modules/gui/macosx/MainMenu.h
index ce94855..271bfeb 100644
--- a/modules/gui/macosx/MainMenu.h
+++ b/modules/gui/macosx/MainMenu.h
@@ -99,6 +99,7 @@
 @property (readwrite, weak) IBOutlet NSMenu *titleMenu;
 @property (readwrite, weak) IBOutlet NSMenuItem *chapter;
 @property (readwrite, weak) IBOutlet NSMenu *chapterMenu;
+ at property (readwrite, weak) IBOutlet NSMenuItem *renderer;
 
 @property (readwrite, weak) IBOutlet NSMenu *audioMenu;
 @property (readwrite, weak) IBOutlet NSMenuItem *vol_up;
diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m
index e9c35dc..cfb679b 100644
--- a/modules/gui/macosx/MainMenu.m
+++ b/modules/gui/macosx/MainMenu.m
@@ -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 @@ @interface VLCMainMenu()
     AboutWindowController *_aboutWindowController;
     HelpWindowController  *_helpWindowController;
     AddonsWindowController *_addonsController;
+    VLCRendererDialog *_rendererDialog;
 
     NSMenu *_playlistTableColumnsContextMenu;
 
@@ -369,6 +371,7 @@ - (void)initStrings
     [_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")];
@@ -1237,6 +1240,14 @@ - (IBAction)showHelp:(id)sender
     [_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"];
@@ -1603,6 +1614,8 @@ - (BOOL)validateMenuItem:(NSMenuItem *)mi
 
         [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 */
-- 
2.7.4 (Apple Git-66)



More information about the vlc-devel mailing list