mirror of
https://code.videolan.org/videolan/vlc
synced 2024-08-18 23:45:06 +02:00
macosx: add playlist sorting menu to main menu and playlist context menu
This commit is contained in:
parent
ef6cb8f4ae
commit
414e4b1a28
@ -118,6 +118,7 @@
|
||||
<outlet property="services" destination="1996" id="X3H-XI-xFK"/>
|
||||
<outlet property="show_all" destination="150" id="XQ2-CW-0PI"/>
|
||||
<outlet property="snapshot" destination="2249" id="6bO-HY-I3I"/>
|
||||
<outlet property="sortPlaylist" destination="lkj-Wj-TYr" id="T45-2w-c0O"/>
|
||||
<outlet property="stop" destination="5156" id="irh-Cr-vBT"/>
|
||||
<outlet property="subtitle_bgcolor" destination="5581" id="moz-G5-DBl"/>
|
||||
<outlet property="subtitle_bgcolorMenu" destination="5582" id="gPd-5S-3xK"/>
|
||||
@ -448,6 +449,9 @@
|
||||
<action selector="toggleAtoBloop:" target="-2" id="Wrv-He-P33"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Sort Playlist" id="lkj-Wj-TYr">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="5141"/>
|
||||
<menuItem title="Quit after Playback" id="5140">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
|
@ -88,6 +88,7 @@
|
||||
@property (readwrite, weak) IBOutlet NSMenuItem *repeat;
|
||||
@property (readwrite, weak) IBOutlet NSMenuItem *loop;
|
||||
@property (readwrite, weak) IBOutlet NSMenuItem *AtoBloop;
|
||||
@property (readwrite, weak) IBOutlet NSMenuItem *sortPlaylist;
|
||||
@property (readwrite, weak) IBOutlet NSMenuItem *quitAfterPB;
|
||||
@property (readwrite, weak) IBOutlet NSMenuItem *fwd;
|
||||
@property (readwrite, weak) IBOutlet NSMenuItem *bwd;
|
||||
|
@ -42,6 +42,7 @@
|
||||
|
||||
#import "playlist/VLCPlaylistController.h"
|
||||
#import "playlist/VLCPlayerController.h"
|
||||
#import "playlist/VLCPlaylistSortingMenuController.h"
|
||||
#import "preferences/VLCSimplePrefsController.h"
|
||||
|
||||
#import "windows/VLCAboutWindowController.h"
|
||||
@ -95,6 +96,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
|
||||
VLCPlaylistController *_playlistController;
|
||||
VLCPlayerController *_playerController;
|
||||
NSTimer *_cancelRendererDiscoveryTimer;
|
||||
VLCPlaylistSortingMenuController *_playlistSortingController;
|
||||
|
||||
NSMenu *_playlistTableColumnsContextMenu;
|
||||
|
||||
@ -147,6 +149,8 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
|
||||
_rendererMenuController = [[VLCRendererMenuController alloc] init];
|
||||
_rendererMenuController.rendererNoneItem = _rendererNoneItem;
|
||||
_rendererMenuController.rendererMenu = _rendererMenu;
|
||||
_playlistSortingController = [[VLCPlaylistSortingMenuController alloc] init];
|
||||
_sortPlaylist.submenu = _playlistSortingController.playlistSortingMenu;
|
||||
|
||||
[self mediaItemChanged:nil];
|
||||
[self updateTitleAndChapterMenus:nil];
|
||||
@ -382,6 +386,7 @@ typedef NS_ENUM(NSInteger, VLCObjectType) {
|
||||
[_repeat setTitle: _NS("Repeat One")];
|
||||
[_loop setTitle: _NS("Repeat All")];
|
||||
[_AtoBloop setTitle: _NS("A→B Loop")];
|
||||
[_sortPlaylist setTitle: _NS("Sort Playlist")];
|
||||
[_quitAfterPB setTitle: _NS("Quit after Playback")];
|
||||
[_fwd setTitle: _NS("Step Forward")];
|
||||
[_bwd setTitle: _NS("Step Backward")];
|
||||
|
@ -29,17 +29,20 @@
|
||||
#import "playlist/VLCPlaylistController.h"
|
||||
#import "playlist/VLCPlaylistModel.h"
|
||||
#import "playlist/VLCPlaylistItem.h"
|
||||
#import "playlist/VLCPlaylistSortingMenuController.h"
|
||||
#import "windows/VLCOpenWindowController.h"
|
||||
|
||||
@interface VLCPlaylistMenuController ()
|
||||
{
|
||||
VLCPlaylistController *_playlistController;
|
||||
VLCPlaylistSortingMenuController *_playlistSortingMenuController;
|
||||
|
||||
NSMenuItem *_playMenuItem;
|
||||
NSMenuItem *_revealInFinderMenuItem;
|
||||
NSMenuItem *_addFilesToPlaylistMenuItem;
|
||||
NSMenuItem *_removeMenuItem;
|
||||
NSMenuItem *_clearPlaylistMenuItem;
|
||||
NSMenuItem *_sortMenuItem;
|
||||
}
|
||||
@end
|
||||
|
||||
@ -80,6 +83,11 @@
|
||||
_clearPlaylistMenuItem = [[NSMenuItem alloc] initWithTitle:_NS("Clear the playlist") action:@selector(clearPlaylist:) keyEquivalent:@""];
|
||||
_clearPlaylistMenuItem.target = self;
|
||||
[_playlistMenu addItem:_clearPlaylistMenuItem];
|
||||
|
||||
_playlistSortingMenuController = [[VLCPlaylistSortingMenuController alloc] init];
|
||||
_sortMenuItem = [[NSMenuItem alloc] initWithTitle:_NS("Sort") action:nil keyEquivalent:@""];
|
||||
[_sortMenuItem setSubmenu:_playlistSortingMenuController.playlistSortingMenu];
|
||||
[_playlistMenu addItem:_sortMenuItem];
|
||||
}
|
||||
|
||||
- (void)play:(id)sender
|
||||
|
Loading…
Reference in New Issue
Block a user