summaryrefslogtreecommitdiffstats
path: root/macosx/HBTitle.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2015-10-09 12:34:42 +0200
committerDamiano Galassi <[email protected]>2015-10-09 12:34:42 +0200
commitf6920d0dbbc70e16cd016ab9d809532fa5db5521 (patch)
treed62071ed285145a946e20614bed73f44a9f8731b /macosx/HBTitle.m
parentf9c5593978ccc7f214dff75f01f59ebda91d8102 (diff)
MacGui: add a duration column to the chapters table
Diffstat (limited to 'macosx/HBTitle.m')
-rw-r--r--macosx/HBTitle.m12
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]];
}
}