summaryrefslogtreecommitdiffstats
path: root/macosx/HBJob+UIAdditions.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2017-11-24 11:27:06 +0100
committerDamiano Galassi <[email protected]>2017-11-24 11:27:06 +0100
commit13c8582eff580913d290b98bc0a58970121ee088 (patch)
treeeb4fa7ab1263664d65ed3ca53f5e807d88180cd7 /macosx/HBJob+UIAdditions.m
parent47d7b716b2c1f99c9d6a0ba6d2e834012d0a4d68 (diff)
MacGui: use KVO to get a good part of the change notification in the summary view.
Diffstat (limited to 'macosx/HBJob+UIAdditions.m')
-rw-r--r--macosx/HBJob+UIAdditions.m19
1 files changed, 19 insertions, 0 deletions
diff --git a/macosx/HBJob+UIAdditions.m b/macosx/HBJob+UIAdditions.m
index d78f2b377..24ff6c219 100644
--- a/macosx/HBJob+UIAdditions.m
+++ b/macosx/HBJob+UIAdditions.m
@@ -722,6 +722,7 @@ static NSDictionary *shortHeightAttr;
{
NSMutableString *info = [NSMutableString string];
+ NSUInteger index = 0;
for (HBSubtitlesTrack *track in self.subtitles.tracks)
{
// Ignore the none track.
@@ -737,6 +738,24 @@ static NSDictionary *shortHeightAttr;
[info appendString:@"\n"];
}
+
+ if (index == 1) {
+ break;
+ }
+ index += 1;
+ }
+
+ if (self.subtitles.tracks.count > 3)
+ {
+ NSUInteger count = self.subtitles.tracks.count - 3;
+ if (count == 1)
+ {
+ [info appendString:NSLocalizedString(@"+ 1 additional subtitles track", nil)];
+ }
+ else
+ {
+ [info appendFormat:NSLocalizedString(@"+ %lu additional subtitles tracks", nil), (unsigned long)count];
+ }
}
if ([info hasSuffix:@"\n"])