#import <SpringBoard/SBStatusBarOperatorNameView.h>
#import <SpringBoard/SBStatusBarTimeView.h>
#import <SpringBoard/SBUIController.h>
+#import <SpringBoard/SBWidgetApplicationIcon.h>
#import <MobileSMS/mSMSMessageTranscriptController.h>
Class $SBStatusBarController;
Class $SBStatusBarOperatorNameView;
Class $SBStatusBarTimeView;
+Class $SBWidgetApplicationIcon;
@interface NSDictionary (WinterBoard)
- (UIColor *) colorForKey:(NSString *)key;
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]);
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];
}
$SBStatusBarController = objc_getClass("SBStatusBarController");
$SBStatusBarOperatorNameView = objc_getClass("SBStatusBarOperatorNameView");
$SBStatusBarTimeView = objc_getClass("SBStatusBarTimeView");
+ $SBWidgetApplicationIcon = objc_getClass("SBWidgetApplicationIcon");
WBRename(WebCoreFrameBridge, renderedSizeOfNode:constrainedToWidth:, renderedSizeOfNode$constrainedToWidth$);
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$);