[vlc-commits] macosx: add convinience menu item to add files to playlist (closes #13759)
Felix Paul Kühne
git at videolan.org
Sun Jun 5 17:02:45 CEST 2016
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Jun 5 16:49:46 2016 +0200| [8da9a84810e574f7e43f93d7db40142c6d4bda16] | committer: Jean-Baptiste Kempf
macosx: add convinience menu item to add files to playlist (closes #13759)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8da9a84810e574f7e43f93d7db40142c6d4bda16
---
.../macosx/Resources/English.lproj/PlaylistMenu.xib | 12 ++++++++++--
.../macosx/Resources/English.lproj/SimplePreferences.xib | 4 ++--
modules/gui/macosx/VLCPlaylist.h | 2 ++
modules/gui/macosx/VLCPlaylist.m | 7 +++++++
4 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/extras/package/macosx/Resources/English.lproj/PlaylistMenu.xib b/extras/package/macosx/Resources/English.lproj/PlaylistMenu.xib
index 8a6a5d2..2940b31 100644
--- a/extras/package/macosx/Resources/English.lproj/PlaylistMenu.xib
+++ b/extras/package/macosx/Resources/English.lproj/PlaylistMenu.xib
@@ -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"/>
@@ -84,6 +85,13 @@
<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>
diff --git a/extras/package/macosx/Resources/English.lproj/SimplePreferences.xib b/extras/package/macosx/Resources/English.lproj/SimplePreferences.xib
index ea76b22..8bade6c 100644
--- a/extras/package/macosx/Resources/English.lproj/SimplePreferences.xib
+++ b/extras/package/macosx/Resources/English.lproj/SimplePreferences.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="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>
diff --git a/modules/gui/macosx/VLCPlaylist.h b/modules/gui/macosx/VLCPlaylist.h
index 55b2ed6..cb49eb0 100644
--- a/modules/gui/macosx/VLCPlaylist.h
+++ b/modules/gui/macosx/VLCPlaylist.h
@@ -40,6 +40,7 @@
@property (readwrite, weak) IBOutlet NSMenuItem *sortNamePlaylistMenuItem;
@property (readwrite, weak) IBOutlet NSMenuItem *sortAuthorPlaylistMenuItem;
@property (readwrite, weak) IBOutlet NSMenuItem *recursiveExpandPlaylistMenuItem;
+ at 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;
diff --git a/modules/gui/macosx/VLCPlaylist.m b/modules/gui/macosx/VLCPlaylist.m
index 1269fe6..bdf8819 100644
--- a/modules/gui/macosx/VLCPlaylist.m
+++ b/modules/gui/macosx/VLCPlaylist.m
@@ -46,6 +46,7 @@
#import "MainMenu.h"
#import "VLCPlaylistInfo.h"
#import "ResumeDialogController.h"
+#import "open.h"
#include <vlc_keys.h>
#import <vlc_interface.h>
@@ -236,6 +237,7 @@
[_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
@@ -394,6 +396,11 @@
[[[VLCMain sharedInstance] currentMediaInfoPanel] toggleWindow:sender];
}
+- (IBAction)addFilesToPlaylist:(id)sender
+{
+ [[[VLCMain sharedInstance] open] openFile];
+}
+
- (IBAction)deleteItem:(id)sender
{
[_model deleteSelectedItem];
More information about the vlc-commits
mailing list