[vlc-commits] [Git][videolan/vlc][master] macosx: enable dragging playlist items to play queue

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Jul 15 05:16:56 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
82c35b2b by Serhii Bykov at 2026-07-15T04:51:20+00:00
macosx: enable dragging playlist items to play queue

- - - - -


2 changed files:

- modules/gui/macosx/library/playlist-library/VLCLibraryPlaylistDataSource.m
- modules/gui/macosx/library/playlist-library/VLCLibraryPlaylistViewController.m


Changes:

=====================================
modules/gui/macosx/library/playlist-library/VLCLibraryPlaylistDataSource.m
=====================================
@@ -22,6 +22,7 @@
 
 #import "VLCLibraryPlaylistDataSource.h"
 
+#import "extensions/NSPasteboardItem+VLCAdditions.h"
 #import "extensions/NSString+Helpers.h"
 
 #import "library/VLCLibraryCollectionViewFlowLayout.h"
@@ -256,6 +257,12 @@ typedef NS_ENUM(NSInteger, VLCLibraryDataSourceCacheAction) {
     return nil;
 }
 
+- (id<NSPasteboardWriting>)tableView:(NSTableView *)tableView pasteboardWriterForRow:(NSInteger)row
+{
+    const id<VLCMediaLibraryItemProtocol> libraryItem = [self libraryItemAtRow:row forTableView:tableView];
+    return [NSPasteboardItem pasteboardItemWithLibraryItem:libraryItem];
+}
+
 - (NSInteger)rowForLibraryItem:(id<VLCMediaLibraryItemProtocol>)libraryItem
 {
     if (libraryItem == nil) {


=====================================
modules/gui/macosx/library/playlist-library/VLCLibraryPlaylistViewController.m
=====================================
@@ -172,6 +172,10 @@
     self.masterTableView.allowsEmptySelection = NO;
     self.detailTableView.headerView = self.detailTableHeaderView;
     self.detailTableView.allowsMultipleSelection = YES;
+    [self.detailTableView registerForDraggedTypes:@[
+        VLCMediaLibraryMediaItemPasteboardType,
+        VLCMediaLibraryMediaItemUTI
+    ]];
 
     detailColumn.headerCell = [VLCLibraryHeaderCell new];
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/82c35b2ba624557f1e32f2ecfb3b41e03399d211

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/82c35b2ba624557f1e32f2ecfb3b41e03399d211
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list