diff options
Diffstat (limited to 'macosx/HBChapterTitlesController.m')
-rw-r--r-- | macosx/HBChapterTitlesController.m | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/macosx/HBChapterTitlesController.m b/macosx/HBChapterTitlesController.m index 4c40ad58a..83e3786a6 100644 --- a/macosx/HBChapterTitlesController.m +++ b/macosx/HBChapterTitlesController.m @@ -6,8 +6,7 @@ #import "HBChapterTitlesController.h" -@import HandBrakeKit.HBChapter; -@import HandBrakeKit.HBJob; +@import HandBrakeKit; @interface NSArray (HBCSVAdditions) @@ -181,6 +180,12 @@ self.chapterTitles = job.chapterTitles; } +- (void)loadView +{ + [super loadView]; + self.table.doubleAction = @selector(doubleClickAction:); +} + /** * Method to edit the next chapter when the user presses Return. * We queue the action on the runloop to avoid interfering @@ -218,6 +223,20 @@ } } +- (IBAction)doubleClickAction:(NSTableView *)sender +{ + if (sender.clickedRow > -1) { + NSTableColumn *column = sender.tableColumns[sender.clickedColumn]; + if ([column.identifier isEqualToString:@"title"]) { + // edit the cell + [sender editColumn:sender.clickedColumn + row:sender.clickedRow + withEvent:nil + select:YES]; + } + } +} + #pragma mark - Chapter Files Import / Export - (BOOL)importChaptersFromURL:(NSURL *)URL error:(NSError **)outError |