diff options
author | ritsuka <[email protected]> | 2015-01-30 08:00:02 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2015-01-30 08:00:02 +0000 |
commit | 98e54a8b93fc92e9d417375afe746049e54ed78d (patch) | |
tree | e28ad062f626706370f5e1ae7e8bf582cffb0986 /macosx/HBAudioDefaults.m | |
parent | 399c64860c4ec5d8a29f34e3b130ff7018337290 (diff) |
MacGui: let HBAudioTrackPreset know the current container.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6827 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBAudioDefaults.m')
-rw-r--r-- | macosx/HBAudioDefaults.m | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/macosx/HBAudioDefaults.m b/macosx/HBAudioDefaults.m index d6b184f33..693b29986 100644 --- a/macosx/HBAudioDefaults.m +++ b/macosx/HBAudioDefaults.m @@ -38,6 +38,13 @@ [super dealloc]; } +- (void)addTrack +{ + HBAudioTrackPreset *track = [[HBAudioTrackPreset alloc] initWithContainer:self.container]; + [self insertObject:track inTracksArrayAtIndex:[self countOfTracksArray]]; + [track release]; +} + - (NSArray *)audioEncoderFallbacks { NSMutableArray *fallbacks = [[NSMutableArray alloc] init]; @@ -311,4 +318,26 @@ return self; } +#pragma mark KVC + +- (NSUInteger)countOfTracksArray +{ + return self.tracksArray.count; +} + +- (HBAudioTrackPreset *)objectInTracksArrayAtIndex:(NSUInteger)index +{ + return self.tracksArray[index]; +} + +- (void)insertObject:(HBAudioTrackPreset *)track inTracksArrayAtIndex:(NSUInteger)index; +{ + [self.tracksArray insertObject:track atIndex:index]; +} + +- (void)removeObjectFromTracksArrayAtIndex:(NSUInteger)index +{ + [self.tracksArray removeObjectAtIndex:index]; +} + @end |