diff options
author | ritsuka <[email protected]> | 2015-01-31 17:09:16 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2015-01-31 17:09:16 +0000 |
commit | 4e77613d95597cbaac2d7166eed9dedd1e881145 (patch) | |
tree | 9a4ebd23ef960bf875e0b241227a344e3838bf1f /macosx/HBJob.m | |
parent | f4fae8fcc8a58329717b6375c6a142675dacac9b (diff) |
MacGui: add a HBChaptersChangedNotification notification, used to notify when the chapters are enabled or disabled.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6842 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBJob.m')
-rw-r--r-- | macosx/HBJob.m | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/macosx/HBJob.m b/macosx/HBJob.m index 62000a9c2..d991d9709 100644 --- a/macosx/HBJob.m +++ b/macosx/HBJob.m @@ -14,8 +14,8 @@ #include "hb.h" -NSString *HBMixdownChangedNotification = @"HBMixdownChangedNotification"; -NSString *HBContainerChangedNotification = @"HBContainerChangedNotification"; +NSString *HBContainerChangedNotification = @"HBContainerChangedNotification"; +NSString *HBChaptersChangedNotification = @"HBChaptersChangedNotification"; @implementation HBJob @@ -98,11 +98,8 @@ NSString *HBContainerChangedNotification = @"HBContainerChangedNotificatio [self.subtitles containerChanged:container]; [self.video containerChanged]; - /* post a notification for any interested observers to indicate that our video container has changed */ - [[NSNotificationCenter defaultCenter] postNotification: - [NSNotification notificationWithName:HBContainerChangedNotification - object:self - userInfo:nil]]; + // post a notification for any interested observers to indicate that our video container has changed + [[NSNotificationCenter defaultCenter] postNotificationName:HBContainerChangedNotification object:self]; } - (void)setTitle:(HBTitle *)title @@ -112,6 +109,12 @@ NSString *HBContainerChangedNotification = @"HBContainerChangedNotificatio self.picture.title = title; } +- (void)setChaptersEnabled:(BOOL)chaptersEnabled +{ + _chaptersEnabled = chaptersEnabled; + [[NSNotificationCenter defaultCenter] postNotificationName:HBChaptersChangedNotification object:self]; +} + + (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key { NSSet *retval = nil; |