From: ritsuka Date: Tue, 20 Jan 2015 07:59:31 +0000 (+0000) Subject: MacGui: remove the public hb_state property in HBCore, fix a bug in HBVideo and chang... X-Git-Tag: 1.0.0~1533 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f9fd9e0d521d9f74d9a76cd2de48d9d71383d35;p=handbrake MacGui: remove the public hb_state property in HBCore, fix a bug in HBVideo and change some strings in the queue job's description. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6777 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/macosx/HBCore.h b/macosx/HBCore.h index 94bdfe05a..8a417af9a 100644 --- a/macosx/HBCore.h +++ b/macosx/HBCore.h @@ -60,11 +60,6 @@ typedef void (^HBCoreCompletationHandler)(BOOL success); */ @property (nonatomic, readonly) HBState state; -/** - * Pointer to a hb_state_s struct containing the detailed state information of libhb. - */ -@property (nonatomic, readonly) hb_state_t *hb_state; - /** * Pointer to a libhb handle used by this HBCore instance. */ diff --git a/macosx/HBCore.m b/macosx/HBCore.m index e3cf37d47..4b0f0f3c3 100644 --- a/macosx/HBCore.m +++ b/macosx/HBCore.m @@ -17,6 +17,9 @@ */ @interface HBCore () +/// Pointer to a hb_state_s struct containing the detailed state information of libhb. +@property (nonatomic, readonly) hb_state_t *hb_state; + /// Current state of HBCore. @property (nonatomic, readwrite) HBState state; diff --git a/macosx/HBJob+UIAdditions.m b/macosx/HBJob+UIAdditions.m index 1f941e5df..d35565d79 100644 --- a/macosx/HBJob+UIAdditions.m +++ b/macosx/HBJob+UIAdditions.m @@ -115,8 +115,8 @@ static NSDictionary *shortHeightAttr; { // Start Stop is chapters startStopString = (self.range.chapterStart == self.range.chapterStop) ? - [NSString stringWithFormat:@"Chapter %d", self.range.chapterStart] : - [NSString stringWithFormat:@"Chapters %d through %d", self.range.chapterStart, self.range.chapterStop]; + [NSString stringWithFormat:@"Chapter %d", self.range.chapterStart + 1] : + [NSString stringWithFormat:@"Chapters %d through %d", self.range.chapterStart + 1, self.range.chapterStop + 1]; } else if (self.range.type == HBRangeTypeSeconds) { @@ -338,7 +338,7 @@ static NSDictionary *shortHeightAttr; encoderPresetInfo = [encoderPresetInfo stringByAppendingString: [NSString stringWithFormat:@" - Level: %@", self.video.level]]; } } - [finalString appendString: @"Encoder Options: " withAttributes:detailBoldAttr]; + [finalString appendString: @"Video Options: " withAttributes:detailBoldAttr]; [finalString appendString: encoderPresetInfo withAttributes:detailAttr]; [finalString appendString:@"\n" withAttributes:detailAttr]; } @@ -361,11 +361,11 @@ static NSDictionary *shortHeightAttr; // Seventh Line Audio Details - int audioDetailCount = 0; - for (NSString *anAudioDetail in audioDetails) { - audioDetailCount++; - if (anAudioDetail.length) { - [finalString appendString: [NSString stringWithFormat: @"Audio Track %d ", audioDetailCount] withAttributes: detailBoldAttr]; + for (NSString *anAudioDetail in audioDetails) + { + if (anAudioDetail.length) + { + [finalString appendString: [NSString stringWithFormat: @"Audio: "] withAttributes: detailBoldAttr]; [finalString appendString: anAudioDetail withAttributes: detailAttr]; [finalString appendString: @"\n" withAttributes: detailAttr]; } diff --git a/macosx/HBVideo.m b/macosx/HBVideo.m index b9e4b4435..b719f4e7b 100644 --- a/macosx/HBVideo.m +++ b/macosx/HBVideo.m @@ -195,7 +195,14 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification"; - (void)setVideoOptionExtra:(NSString *)videoOptionExtra { [_videoOptionExtra autorelease]; - _videoOptionExtra = [videoOptionExtra copy]; + if (videoOptionExtra != nil) + { + _videoOptionExtra = [videoOptionExtra copy]; + } + else + { + _videoOptionExtra = @""; + } [self postChangedNotification]; }