[vlc-commits] macosx: remove sort by xxx from playlist context menu

David Fuhrmann git at videolan.org
Sun Feb 12 12:21:07 CET 2017


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Feb  4 16:22:17 2017 +0100| [2caaa60be86506d9fe0d10d886f9c09bd30c53ae] | committer: David Fuhrmann

macosx: remove sort by xxx from playlist context menu

Those are not working anymore and they are redundant with the
header cells where you can trigger sorting as well.

refs #17726

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

 modules/gui/macosx/UI/PlaylistMenu.xib | 18 +++-------------
 modules/gui/macosx/VLCPlaylist.h       |  5 -----
 modules/gui/macosx/VLCPlaylist.m       | 38 ----------------------------------
 3 files changed, 3 insertions(+), 58 deletions(-)

diff --git a/modules/gui/macosx/UI/PlaylistMenu.xib b/modules/gui/macosx/UI/PlaylistMenu.xib
index 2940b31..22744f1 100644
--- a/modules/gui/macosx/UI/PlaylistMenu.xib
+++ b/modules/gui/macosx/UI/PlaylistMenu.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="10117" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11542" systemVersion="15G1217" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
     <dependencies>
-        <deployment version="1070" identifier="macosx"/>
+        <deployment identifier="macosx"/>
         <development version="7000" identifier="xcode"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11542"/>
     </dependencies>
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="VLCPlaylist">
@@ -18,8 +18,6 @@
                 <outlet property="recursiveExpandPlaylistMenuItem" destination="5" id="vFK-br-qmx"/>
                 <outlet property="revealInFinderPlaylistMenuItem" destination="3" id="IrJ-gR-Zqp"/>
                 <outlet property="selectAllPlaylistMenuItem" destination="14" id="drx-ij-QhT"/>
-                <outlet property="sortAuthorPlaylistMenuItem" destination="6" id="eGn-tO-OZO"/>
-                <outlet property="sortNamePlaylistMenuItem" destination="7" id="JwP-cR-9ZW"/>
             </connections>
         </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
@@ -52,16 +50,6 @@
                         <action selector="recursiveExpandNode:" target="-2" id="29"/>
                     </connections>
                 </menuItem>
-                <menuItem title="Sort Node by Name" id="7">
-                    <connections>
-                        <action selector="sortNodeByName:" target="-2" id="31"/>
-                    </connections>
-                </menuItem>
-                <menuItem title="Sort Node by Author" id="6">
-                    <connections>
-                        <action selector="sortNodeByAuthor:" target="-2" id="32"/>
-                    </connections>
-                </menuItem>
                 <menuItem isSeparatorItem="YES" id="10">
                     <modifierMask key="keyEquivalentModifierMask" command="YES"/>
                 </menuItem>
diff --git a/modules/gui/macosx/VLCPlaylist.h b/modules/gui/macosx/VLCPlaylist.h
index 8f7b902..d37fa6e 100644
--- a/modules/gui/macosx/VLCPlaylist.h
+++ b/modules/gui/macosx/VLCPlaylist.h
@@ -37,8 +37,6 @@
 @property (readwrite, weak) IBOutlet NSMenuItem *revealInFinderPlaylistMenuItem;
 @property (readwrite, weak) IBOutlet NSMenuItem *downloadCoverArtPlaylistMenuItem;
 @property (readwrite, weak) IBOutlet NSMenuItem *selectAllPlaylistMenuItem;
- at property (readwrite, weak) IBOutlet NSMenuItem *sortNamePlaylistMenuItem;
- at property (readwrite, weak) IBOutlet NSMenuItem *sortAuthorPlaylistMenuItem;
 @property (readwrite, weak) IBOutlet NSMenuItem *recursiveExpandPlaylistMenuItem;
 @property (readwrite, weak) IBOutlet NSMenuItem *addFilesToPlaylistMenuItem;
 
@@ -53,7 +51,6 @@
 
 - (void)playlistUpdated;
 - (void)playbackModeUpdated;
-- (void)sortNode:(int)i_mode;
 
 - (void)currentlyPlayingItemChanged;
 
@@ -65,8 +62,6 @@
 - (IBAction)downloadCoverArt:(id)sender;
 - (IBAction)deleteItem:(id)sender;
 - (IBAction)selectAll:(id)sender;
-- (IBAction)sortNodeByName:(id)sender;
-- (IBAction)sortNodeByAuthor:(id)sender;
 - (IBAction)recursiveExpandNode:(id)sender;
 - (IBAction)showInfoPanel:(id)sender;
 - (IBAction)addFilesToPlaylist:(id)sender;
diff --git a/modules/gui/macosx/VLCPlaylist.m b/modules/gui/macosx/VLCPlaylist.m
index 667e146..fcc777d 100644
--- a/modules/gui/macosx/VLCPlaylist.m
+++ b/modules/gui/macosx/VLCPlaylist.m
@@ -235,8 +235,6 @@
     [_downloadCoverArtPlaylistMenuItem setTitle: _NS("Download Cover Art")];
     [_preparsePlaylistMenuItem setTitle: _NS("Fetch Meta Data")];
     [_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...")];
 }
 
@@ -406,40 +404,6 @@
     [_model deleteSelectedItem];
 }
 
-- (IBAction)sortNodeByName:(id)sender
-{
-    [self sortNode: SORT_TITLE];
-}
-
-- (IBAction)sortNodeByAuthor:(id)sender
-{
-    [self sortNode: SORT_ARTIST];
-}
-
-- (void)sortNode:(int)i_mode
-{
-    playlist_t * p_playlist = pl_Get(getIntf());
-    playlist_item_t * p_item;
-
-    // TODO why do we need this kind of sort? It looks crap and confusing...
-
-//    if ([_outlineView selectedRow] > -1) {
-//        p_item = [[_outlineView itemAtRow: [_outlineView selectedRow]] pointerValue];
-//        if (!p_item)
-//            return;
-//    } else
-//        p_item = [self currentPlaylistRoot]; // If no item is selected, sort the whole playlist
-//
-//    PL_LOCK;
-//    if (p_item->i_children > -1) // the item is a node
-//        playlist_RecursiveNodeSort(p_playlist, p_item, i_mode, ORDER_NORMAL);
-//    else
-//        playlist_RecursiveNodeSort(p_playlist, p_item->p_parent, i_mode, ORDER_NORMAL);
-//
-//    PL_UNLOCK;
-//    [self playlistUpdated];
-}
-
 // Actions for playlist column selections
 
 
@@ -774,8 +738,6 @@
     [_infoPlaylistMenuItem setEnabled: b_item_sel];
     [_preparsePlaylistMenuItem setEnabled: b_item_sel];
     [_recursiveExpandPlaylistMenuItem setEnabled: b_item_sel];
-    [_sortNamePlaylistMenuItem setEnabled: b_item_sel];
-    [_sortAuthorPlaylistMenuItem setEnabled: b_item_sel];
     [_downloadCoverArtPlaylistMenuItem setEnabled: b_item_sel];
 
     return _playlistMenu;



More information about the vlc-commits mailing list