From 21ea1a3f5c8334916b1927e95db19a0a29f28d63 Mon Sep 17 00:00:00 2001 From: ritsuka Date: Thu, 6 Aug 2015 09:50:09 +0000 Subject: [PATCH] MacGui: switch back another property to assign, 10.7 does not support weak for NSWindowController and NSViewController classes git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7393 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../English.lproj/HBPictureViewController.xib | 245 ++++++++++-------- macosx/HBOutputFileWriter.m | 2 +- macosx/HBPicture+UIAdditions.h | 1 + macosx/HBPicture+UIAdditions.m | 14 + macosx/HBPicture.h | 1 + macosx/HBPicture.m | 5 + macosx/HBTitleSelectionController.m | 2 +- .../xcschemes/HandBrake [DEBUG].xcscheme | 13 +- .../xcschemes/HandBrake [RELEASE].xcscheme | 13 +- 9 files changed, 168 insertions(+), 128 deletions(-) diff --git a/macosx/English.lproj/HBPictureViewController.xib b/macosx/English.lproj/HBPictureViewController.xib index 3a36b3ca0..48861a0b7 100644 --- a/macosx/English.lproj/HBPictureViewController.xib +++ b/macosx/English.lproj/HBPictureViewController.xib @@ -1,5 +1,5 @@ - + @@ -19,25 +19,8 @@ - - - - - - - - - - - - - NSNegateBoolean - - - - - + @@ -47,12 +30,6 @@ - - - - NSNegateBoolean - - @@ -63,34 +40,28 @@ - - + + - - + + - - + NSNegateBoolean - - - - NSNegateBoolean - - - + + - + @@ -102,11 +73,6 @@ - - - NSNegateBoolean - - NSNegateBoolean @@ -117,41 +83,17 @@ - - - - - - - - - - - - NSNegateBoolean - - - - - - + - + - - - - NSNegateBoolean - - - - + @@ -174,7 +116,7 @@ - + @@ -200,7 +142,7 @@ - + @@ -225,30 +167,8 @@ - - - - - - - - - - - - - - - NSIsNotNil - - - - - - - - + @@ -258,17 +178,37 @@ - + + + + + + + + + + + + + + + + + + + + + - + - + @@ -294,7 +234,7 @@ - + @@ -304,17 +244,37 @@ - + + + + + + + + + + + - + + + + + + + + + + + - + @@ -340,7 +300,7 @@ - + @@ -388,7 +348,7 @@ - + @@ -414,7 +374,7 @@ - + @@ -451,7 +411,7 @@ - + @@ -484,7 +444,7 @@ - + @@ -517,7 +477,7 @@ - + @@ -543,7 +503,7 @@ - + @@ -576,7 +536,7 @@ - + @@ -602,7 +562,7 @@ - + @@ -612,7 +572,7 @@ - + @@ -1165,9 +1125,64 @@ + + + + + + + + + + + + + + + NSNegateBoolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSIsNotNil + + + + + + + - + diff --git a/macosx/HBOutputFileWriter.m b/macosx/HBOutputFileWriter.m index fffe9478b..2785cd319 100644 --- a/macosx/HBOutputFileWriter.m +++ b/macosx/HBOutputFileWriter.m @@ -37,7 +37,7 @@ return nil; } - f = freopen(NULL, "a", f); + f = freopen(url.path.fileSystemRepresentation, "a", f); if (!f) { return nil; diff --git a/macosx/HBPicture+UIAdditions.h b/macosx/HBPicture+UIAdditions.h index e19d627d2..fffe3d9b7 100644 --- a/macosx/HBPicture+UIAdditions.h +++ b/macosx/HBPicture+UIAdditions.h @@ -13,6 +13,7 @@ * UI enabled bindings */ @property (nonatomic, readonly) NSString *info; +@property (nonatomic, readonly) NSString *sourceInfo; @property (nonatomic, readonly) NSString *summary; @property (nonatomic, readonly) int maxWidth; diff --git a/macosx/HBPicture+UIAdditions.m b/macosx/HBPicture+UIAdditions.m index 06ea316ee..87759ad74 100644 --- a/macosx/HBPicture+UIAdditions.m +++ b/macosx/HBPicture+UIAdditions.m @@ -84,6 +84,20 @@ return sizeInfo; } +- (NSString *)sourceInfo +{ + NSString *sizeInfo = @""; + + sizeInfo = [NSString stringWithFormat:@"%d x %d", self.sourceWidth, self.sourceHeight]; + + if (self.sourceWidth != self.sourceDisplayWidth) + { + sizeInfo = [NSString stringWithFormat:@"%d x %d, Anamorphic: %d x %d", self.sourceWidth, self.sourceHeight, self.sourceDisplayWidth, self.sourceHeight]; + } + + return sizeInfo; +} + - (NSString *)summary { NSMutableString *summary = [NSMutableString stringWithString:@""]; diff --git a/macosx/HBPicture.h b/macosx/HBPicture.h index a717a4c69..c4773e822 100644 --- a/macosx/HBPicture.h +++ b/macosx/HBPicture.h @@ -48,6 +48,7 @@ extern NSString * const HBPictureChangedNotification; */ @property (nonatomic, readonly) int sourceWidth; @property (nonatomic, readonly) int sourceHeight; +@property (nonatomic, readonly) int sourceDisplayWidth; @end diff --git a/macosx/HBPicture.m b/macosx/HBPicture.m index 43c1d7979..099a4c77a 100644 --- a/macosx/HBPicture.m +++ b/macosx/HBPicture.m @@ -345,6 +345,11 @@ NSString * const HBPictureChangedNotification = @"HBPictureChangedNotification"; return self.sourceWidth / 2 - 2; } +- (int)sourceDisplayWidth +{ + return (int) (self.sourceWidth * self.sourceParNum / (double)self.sourceParDen); +} + + (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key { NSSet *retval = nil; diff --git a/macosx/HBTitleSelectionController.m b/macosx/HBTitleSelectionController.m index 63622a093..7575eb74a 100644 --- a/macosx/HBTitleSelectionController.m +++ b/macosx/HBTitleSelectionController.m @@ -12,7 +12,7 @@ @property (nonatomic, readonly) NSArray *titles; @property (nonatomic, readonly) NSMutableArray *selection; -@property (nonatomic, readonly, weak) id delegate; +@property (nonatomic, readonly, assign) id delegate; @end diff --git a/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [DEBUG].xcscheme b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [DEBUG].xcscheme index d5569aaf5..95b745ba7 100644 --- a/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [DEBUG].xcscheme +++ b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [DEBUG].xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -76,15 +76,18 @@ ReferencedContainer = "container:HandBrake.xcodeproj"> + + @@ -100,10 +103,10 @@ diff --git a/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [RELEASE].xcscheme b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [RELEASE].xcscheme index d5b757592..e51e41821 100644 --- a/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [RELEASE].xcscheme +++ b/macosx/HandBrake.xcodeproj/xcshareddata/xcschemes/HandBrake [RELEASE].xcscheme @@ -1,7 +1,7 @@ + LastUpgradeVersion = "0700" + version = "1.3"> @@ -51,10 +51,10 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -80,13 +80,14 @@ @@ -102,10 +103,10 @@ -- 2.40.0