[[NSNotificationCenter defaultCenter] removeObserver:_job.filters];
[[NSNotificationCenter defaultCenter] removeObserver:_job.video];
[[NSNotificationCenter defaultCenter] removeObserver:_job.audio];
+ [[NSNotificationCenter defaultCenter] removeObserver:_job.range];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pictureSettingsDidChange) name:HBPictureChangedNotification object:job.picture];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pictureSettingsDidChange) name:HBFiltersChangedNotification object:job.filters];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(customSettingUsed) name:HBVideoChangedNotification object:job.video];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateFileExtension:) name:HBMixdownChangedNotification object:job.audio];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateFileExtension:) name:HBChaptersChangedNotification object:job];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(chapterPopUpChanged:) name:HBRangeChangedNotification object:job.range];
}
// Retain the new job
{
[self updateFileExtension:notification];
}
- else
- {
- // If Auto Naming is on it might need to be update if it includes the chapters range
- [self updateFileName];
- }
+
+ // If Auto Naming is on it might need to be update if it includes the chapters range
+ [self updateFileName];
}
- (void)formatChanged:(NSNotification *)notification
#import "HBTitle.h"
#import "NSCodingMacro.h"
+NSString *HBRangeChangedNotification = @"HBRangeChangedNotification";
+
@implementation HBRange
#pragma mark - NSCoding
return self;
}
+- (void)postChangedNotification
+{
+ [[NSNotificationCenter defaultCenter] postNotificationName:HBRangeChangedNotification object:self];
+}
+
- (void)setChapterStart:(int)chapterStart
{
if (chapterStart > self.chapterStop)
}
_chapterStart = chapterStart;
+
+ [self postChangedNotification];
}
- (void)setChapterStop:(int)chapterStop
}
_chapterStop = chapterStop;
+
+ [self postChangedNotification];
}
- (NSString *)duration