]> git.saurik.com Git - winterboard.git/commitdiff
Handed a copy to BigBoss for performance evaluation.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 3 Jan 2009 04:55:09 +0000 (04:55 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 3 Jan 2009 04:55:09 +0000 (04:55 +0000)
Library.mm
control

index d3170992996d69429f986a37e5e7da33bbc65465..6015fd80dc0bdab9ba23a4afe71aaa27d1f3bfc9 100644 (file)
@@ -61,6 +61,7 @@
 #import <SpringBoard/SBStatusBarOperatorNameView.h>
 #import <SpringBoard/SBStatusBarTimeView.h>
 #import <SpringBoard/SBUIController.h>
+#import <SpringBoard/SBWidgetApplicationIcon.h>
 
 #import <MobileSMS/mSMSMessageTranscriptController.h>
 
@@ -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<id>(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 31dc7969270fe571cc6cdccc10a1dfa35811db8e..92c207bb3296dd17cdd8184974e3fc85317802d8 100644 (file)
--- a/control
+++ b/control
@@ -3,7 +3,7 @@ Priority: optional
 Section: System
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 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)