diff options
author | Damiano Galassi <[email protected]> | 2015-10-09 12:34:42 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2015-10-09 12:34:42 +0200 |
commit | f6920d0dbbc70e16cd016ab9d809532fa5db5521 (patch) | |
tree | d62071ed285145a946e20614bed73f44a9f8731b /macosx/HBTitle.m | |
parent | f9c5593978ccc7f214dff75f01f59ebda91d8102 (diff) |
MacGui: add a duration column to the chapters table
Diffstat (limited to 'macosx/HBTitle.m')
-rw-r--r-- | macosx/HBTitle.m | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/macosx/HBTitle.m b/macosx/HBTitle.m index 47b4a98ae..4fca7c072 100644 --- a/macosx/HBTitle.m +++ b/macosx/HBTitle.m @@ -6,6 +6,7 @@ #import "HBTitle.h" #import "HBTitlePrivate.h" +#import "HBChapter.h" #include "lang.h" @@ -253,18 +254,17 @@ extern NSString *keySubTrackSrtCharCode; if (chapter != NULL) { + NSString *title; if (chapter->title != NULL) { - [chapters addObject:[NSString - stringWithFormat:@"%s", - chapter->title]]; + title = [NSString stringWithFormat:@"%s", chapter->title]; } else { - [chapters addObject:[NSString - stringWithFormat:@"Chapter %d", - i + 1]]; + title = [NSString stringWithFormat:@"Chapter %d", i + 1]; } + + [chapters addObject:[[HBChapter alloc] initWithTitle:title duration:chapter->duration]]; } } |