X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/57fde81fc1e2210df2489874f2e7be56a200e79a..cbc403304ea0ad7cb055b9d5ff767963be4566ed:/Cydia.mm?ds=inline diff --git a/Cydia.mm b/Cydia.mm index 07d44a75..17f0c3f2 100644 --- a/Cydia.mm +++ b/Cydia.mm @@ -1634,11 +1634,11 @@ typedef std::map< unsigned long, _H > SourceMap; } - (NSString *) depictionForPackage:(NSString *)package { - return depiction_.empty() ? nil : [depiction_ stringByReplacingOccurrencesOfString:@"*" withString:package]; + return depiction_.empty() ? nil : [static_cast(depiction_) stringByReplacingOccurrencesOfString:@"*" withString:package]; } - (NSString *) supportForPackage:(NSString *)package { - return support_.empty() ? nil : [support_ stringByReplacingOccurrencesOfString:@"*" withString:package]; + return support_.empty() ? nil : [static_cast(support_) stringByReplacingOccurrencesOfString:@"*" withString:package]; } - (NSDictionary *) record { @@ -2180,7 +2180,7 @@ struct PackageNameOrdering : _end bool changed(false); - NSString *key([id_ lowercaseString]); + NSString *key([static_cast(id_) lowercaseString]); _profile(Package$initWithVersion$Metadata) metadata_ = [Packages_ objectForKey:key]; @@ -2486,9 +2486,9 @@ struct PackageNameOrdering : UIImage *icon(nil); if (!icon_.empty()) - if ([icon_ hasPrefix:@"file:///"]) + if ([static_cast(icon_) hasPrefix:@"file:///"]) // XXX: correct escaping - icon = [UIImage imageAtPath:[icon_ substringFromIndex:7]]; + icon = [UIImage imageAtPath:[static_cast(icon_) substringFromIndex:7]]; if (icon == nil) if (section != nil) icon = [UIImage imageAtPath:[NSString stringWithFormat:@"%@/Sections/%@.png", App_, section]]; if (icon == nil) if (source_ != nil) if (NSString *dicon = [source_ defaultIcon]) @@ -7766,13 +7766,21 @@ freeing the view controllers on tab change */ updatedelegate_ = delegate; } +- (CGFloat) statusBarHeight { + if (UIInterfaceOrientationIsPortrait([self interfaceOrientation])) { + return [[UIApplication sharedApplication] statusBarFrame].size.height; + } else { + return [[UIApplication sharedApplication] statusBarFrame].size.width; + } +} + - (void) dropBar:(BOOL)animated { if (dropped_) return; dropped_ = true; [[self view] addSubview:refreshbar_]; - CGFloat sboffset = [[UIApplication sharedApplication] statusBarFrame].size.height; + CGFloat sboffset = [self statusBarHeight]; CGRect barframe = [refreshbar_ frame]; barframe.origin.y = sboffset; @@ -7799,7 +7807,7 @@ freeing the view controllers on tab change */ [refreshbar_ removeFromSuperview]; - CGFloat sboffset = [[UIApplication sharedApplication] statusBarFrame].size.height; + CGFloat sboffset = [self statusBarHeight]; if (animated) [UIView beginAnimations:nil context:NULL]; CGRect barframe = [refreshbar_ frame];