macosx: add convinience menu item to add files to playlist (closes #13759)
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 5 Jun 2016 14:49:46 +0000 (16:49 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 5 Jun 2016 15:02:19 +0000 (17:02 +0200)
extras/package/macosx/Resources/English.lproj/PlaylistMenu.xib
extras/package/macosx/Resources/English.lproj/SimplePreferences.xib
modules/gui/macosx/VLCPlaylist.h
modules/gui/macosx/VLCPlaylist.m

index 8a6a5d2..2940b31 100644 (file)
@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10102" systemVersion="15D21" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
     <dependencies>
         <deployment version="1070" identifier="macosx"/>
         <development version="7000" identifier="xcode"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10102"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
     </dependencies>
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="VLCPlaylist">
             <connections>
+                <outlet property="addFilesToPlaylistMenuItem" destination="lGc-nc-8Yq" id="joN-zx-w8u"/>
                 <outlet property="deletePlaylistMenuItem" destination="13" id="Qwn-a7-On0"/>
                 <outlet property="downloadCoverArtPlaylistMenuItem" destination="2" id="z0y-0U-uRz"/>
                 <outlet property="infoPlaylistMenuItem" destination="9" id="uIr-Np-fpB"/>
                         <action selector="revealItemInFinder:" target="-2" id="4WU-rm-69M"/>
                     </connections>
                 </menuItem>
+                <menuItem isSeparatorItem="YES" id="sUF-9g-Rxq"/>
+                <menuItem title="Add Files" id="lGc-nc-8Yq">
+                    <modifierMask key="keyEquivalentModifierMask"/>
+                    <connections>
+                        <action selector="addFilesToPlaylist:" target="-2" id="r6Z-KP-ovf"/>
+                    </connections>
+                </menuItem>
             </items>
         </menu>
     </objects>
index ea76b22..8bade6c 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="9531" systemVersion="15D21" 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="9531"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
         <capability name="box content view" minToolsVersion="7.0"/>
     </dependencies>
     <objects>
index 55b2ed6..cb49eb0 100644 (file)
@@ -40,6 +40,7 @@
 @property (readwrite, weak) IBOutlet NSMenuItem *sortNamePlaylistMenuItem;
 @property (readwrite, weak) IBOutlet NSMenuItem *sortAuthorPlaylistMenuItem;
 @property (readwrite, weak) IBOutlet NSMenuItem *recursiveExpandPlaylistMenuItem;
+@property (readwrite, weak) IBOutlet NSMenuItem *addFilesToPlaylistMenuItem;
 
 @property (nonatomic, readwrite, weak) VLCPlaylistView *outlineView;
 @property (nonatomic, readwrite, weak) NSTableHeaderView *playlistHeaderView;
@@ -68,6 +69,7 @@
 - (IBAction)sortNodeByAuthor:(id)sender;
 - (IBAction)recursiveExpandNode:(id)sender;
 - (IBAction)showInfoPanel:(id)sender;
+- (IBAction)addFilesToPlaylist:(id)sender;
 
 - (NSArray *)draggedItems;
 
index 1269fe6..bdf8819 100644 (file)
@@ -46,6 +46,7 @@
 #import "MainMenu.h"
 #import "VLCPlaylistInfo.h"
 #import "ResumeDialogController.h"
+#import "open.h"
 
 #include <vlc_keys.h>
 #import <vlc_interface.h>
     [_revealInFinderPlaylistMenuItem setTitle: _NS("Reveal in Finder")];
     [_sortNamePlaylistMenuItem setTitle: _NS("Sort Node by Name")];
     [_sortAuthorPlaylistMenuItem setTitle: _NS("Sort Node by Author")];
+    [_addFilesToPlaylistMenuItem setTitle: _NS("Add File...")];
 }
 
 - (void)playlistUpdated
     [[[VLCMain sharedInstance] currentMediaInfoPanel] toggleWindow:sender];
 }
 
+- (IBAction)addFilesToPlaylist:(id)sender
+{
+    [[[VLCMain sharedInstance] open] openFile];
+}
+
 - (IBAction)deleteItem:(id)sender
 {
     [_model deleteSelectedItem];