diff --git a/modules/gui/macosx/UI/VLCLibraryWindowChaptersView.xib b/modules/gui/macosx/UI/VLCLibraryWindowChaptersView.xib index db21b02db562..332f7dcff782 100644 --- a/modules/gui/macosx/UI/VLCLibraryWindowChaptersView.xib +++ b/modules/gui/macosx/UI/VLCLibraryWindowChaptersView.xib @@ -100,6 +100,7 @@ + diff --git a/modules/gui/macosx/library/VLCLibraryWindowChaptersSidebarViewController.h b/modules/gui/macosx/library/VLCLibraryWindowChaptersSidebarViewController.h index f7a939774773..c8ae69afee28 100644 --- a/modules/gui/macosx/library/VLCLibraryWindowChaptersSidebarViewController.h +++ b/modules/gui/macosx/library/VLCLibraryWindowChaptersSidebarViewController.h @@ -37,6 +37,8 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithLibraryWindow:(VLCLibraryWindow *)libraryWindow; +- (IBAction)tableViewAction:(id)sender; + @end NS_ASSUME_NONNULL_END diff --git a/modules/gui/macosx/library/VLCLibraryWindowChaptersSidebarViewController.m b/modules/gui/macosx/library/VLCLibraryWindowChaptersSidebarViewController.m index 53de0b64bdb6..f49e70152cda 100644 --- a/modules/gui/macosx/library/VLCLibraryWindowChaptersSidebarViewController.m +++ b/modules/gui/macosx/library/VLCLibraryWindowChaptersSidebarViewController.m @@ -119,6 +119,17 @@ - (void)updateChapterList self.counterLabel.stringValue = [NSString stringWithFormat:@"%lu", chapterCount]; } +- (IBAction)tableViewAction:(id)sender +{ + VLCPlayerChapter * const selectedChapter = + self.chaptersArrayController.selectedObjects.firstObject; + if (selectedChapter == nil) { + return; + } + + [VLCMain.sharedInstance.playlistController.playerController setTimeFast:selectedChapter.time]; +} + # pragma mark - NSTableView delegation - (NSView *)tableView:(NSTableView *)tableView @@ -149,15 +160,4 @@ - (NSView *)tableView:(NSTableView *)tableView return nil; } -- (void)tableViewSelectionDidChange:(NSNotification *)notification -{ - VLCPlayerChapter * const selectedChapter = - self.chaptersArrayController.selectedObjects.firstObject; - if (selectedChapter == nil) { - return; - } - - [VLCMain.sharedInstance.playlistController.playerController setTimeFast:selectedChapter.time]; -} - @end