diff --git a/modules/gui/macosx/UI/VLCLibraryWindow.xib b/modules/gui/macosx/UI/VLCLibraryWindow.xib index 899a2a249109c73db37badbf7a33a78c610aaad4..dabe0892dba7b9894ef7ef56022d71e5489a0762 100644 --- a/modules/gui/macosx/UI/VLCLibraryWindow.xib +++ b/modules/gui/macosx/UI/VLCLibraryWindow.xib @@ -133,6 +133,7 @@ </tableColumn> </tableColumns> <connections> + <action trigger="doubleAction" selector="playlistDoubleClickAction:" target="QvC-M9-y7g" id="aCf-fY-ndG"/> <action selector="selectNextTab:" target="QvC-M9-y7g" id="oNk-CO-d5B"/> </connections> </tableView> diff --git a/modules/gui/macosx/VLCLibraryWindow.h b/modules/gui/macosx/VLCLibraryWindow.h index 8fe7e638fa5fd9308bce95647df6ef4f616a6b00..31c4c05e4d5b27afecb037ef9733ce50f2b94e28 100644 --- a/modules/gui/macosx/VLCLibraryWindow.h +++ b/modules/gui/macosx/VLCLibraryWindow.h @@ -36,6 +36,8 @@ NS_ASSUME_NONNULL_BEGIN @property (readwrite, weak) IBOutlet NSCollectionView *libraryCollectionView; @property (readwrite, weak) IBOutlet NSTableView *playlistTableView; +- (IBAction)playlistDoubleClickAction:(id)sender; + @end @interface VLCLibraryDataSource : NSObject <NSCollectionViewDataSource, NSCollectionViewDelegate> diff --git a/modules/gui/macosx/VLCLibraryWindow.m b/modules/gui/macosx/VLCLibraryWindow.m index b4e72a5af9383bcbfb1736903f9399698bae9f1a..009823f15a1bcaa29114f1a3696bc8fc7bc3b895 100644 --- a/modules/gui/macosx/VLCLibraryWindow.m +++ b/modules/gui/macosx/VLCLibraryWindow.m @@ -75,6 +75,15 @@ static NSString *VLCLibraryCellIdentifier = @"VLCLibraryCellIdentifier"; { } +- (void)playlistDoubleClickAction:(id)sender +{ + NSInteger selectedRow = self.playlistTableView.selectedRow; + if (selectedRow == -1) + return; + + [[[VLCMain sharedInstance] playlistController] playItemAtIndex:selectedRow]; +} + @end @implementation VLCLibraryDataSource