From: Jay Freeman (saurik) Date: Sat, 3 Jan 2009 04:55:09 +0000 (+0000) Subject: Handed a copy to BigBoss for performance evaluation. X-Git-Tag: v0.9.3900~57 X-Git-Url: https://git.saurik.com/winterboard.git/commitdiff_plain/4f1b7acddf97d20c6667ccf8058c2c8217c36878 Handed a copy to BigBoss for performance evaluation. --- diff --git a/Library.mm b/Library.mm index d317099..6015fd8 100644 --- a/Library.mm +++ b/Library.mm @@ -61,6 +61,7 @@ #import #import #import +#import #import @@ -99,6 +100,7 @@ Class $SBStatusBarContentsView; Class $SBStatusBarController; Class $SBStatusBarOperatorNameView; Class $SBStatusBarTimeView; +Class $SBWidgetApplicationIcon; @interface NSDictionary (WinterBoard) - (UIColor *) colorForKey:(NSString *)key; @@ -332,6 +334,12 @@ MSHook(UIImage *, SBApplicationIcon$icon, SBApplicationIcon *self, SEL sel) { return _SBApplicationIcon$icon(self, sel); } +MSHook(UIImage *, SBWidgetApplicationIcon$icon, SBWidgetApplicationIcon *self, SEL sel) { + if (NSString *path = $pathForIcon$([self application])) + return [UIImage imageWithContentsOfFile:path]; + return _SBApplicationIcon$icon(self, sel); +} + MSHook(UIImage *, SBBookmarkIcon$icon, SBBookmarkIcon *self, SEL sel) { if (Debug_) NSLog(@"WB:Debug:Bookmark(%@:%@)", [self displayIdentifier], [self displayName]); @@ -926,7 +934,7 @@ MSHook(UIImage *, _UIImageWithName, NSString *name) { if (image != nil) return reinterpret_cast(image) == [NSNull null] ? nil : image; if (NSString *path = $pathForFile$inBundle$(name, _UIKitBundle(), true)) { - image = [[UIImage alloc] initWithContentsOfFile:path]; + image = [[UIImage alloc] initWithContentsOfFile:path cache:true]; if (image != nil) [image autorelease]; } @@ -1160,6 +1168,7 @@ extern "C" void WBInitialize() { $SBStatusBarController = objc_getClass("SBStatusBarController"); $SBStatusBarOperatorNameView = objc_getClass("SBStatusBarOperatorNameView"); $SBStatusBarTimeView = objc_getClass("SBStatusBarTimeView"); + $SBWidgetApplicationIcon = objc_getClass("SBWidgetApplicationIcon"); WBRename(WebCoreFrameBridge, renderedSizeOfNode:constrainedToWidth:, renderedSizeOfNode$constrainedToWidth$); @@ -1171,6 +1180,7 @@ extern "C" void WBInitialize() { WBRename(SBContentLayer, initWithSize:, initWithSize$); WBRename(SBIconBadge, initWithBadge:, initWithBadge$); WBRename(SBIconController, appendIconList:, appendIconList$); + WBRename(SBWidgetApplicationIcon, icon, icon); WBRename(SBIconLabel, drawRect:, drawRect$); WBRename(SBIconLabel, initWithSize:label:, initWithSize$label$); diff --git a/control b/control index 31dc796..92c207b 100644 --- a/control +++ b/control @@ -3,7 +3,7 @@ Priority: optional Section: System Maintainer: Jay Freeman (saurik) Architecture: iphoneos-arm -Version: 0.9.2652-1 +Version: 0.9.2691-1 Description: more powerful, open-source SummerBoard Name: WinterBoard Depends: mobilesubstrate (>= 0.9.2660-1)