MSHook(UIImage *, SBApplicationIcon$generateIconImage$, SBApplicationIcon *self, SEL sel, int type) {
if (type == 2)
if (![Info_ wb$boolForKey:@"ComposeStoreIcons"]) {
- if (IsWild_)
+ if (IsWild_ && false) // XXX: delete this code, it should not be supported
if (NSString *path72 = $pathForIcon$([self application], @"-72"))
return [UIImage imageWithContentsOfFile:path72];
if (NSString *path = $pathForIcon$([self application]))
UIDevice *device([UIDevice currentDevice]);
IsWild_ = [device respondsToSelector:@selector(isWildcat)] && [device isWildcat];
+ BOOL (*GSSystemHasCapability)(CFStringRef) = reinterpret_cast<BOOL (*)(CFStringRef)>(dlsym(RTLD_DEFAULT, "GSSystemHasCapability"));
+
+ if ([Info_ objectForKey:@"UndockedIconLabels"] == nil)
+ [Info_ setObject:[NSNumber numberWithBool:(
+ !(Papered_ || GSSystemHasCapability != NULL && GSSystemHasCapability(CFSTR("homescreen-wallpaper"))) ||
+ [Info_ objectForKey:@"DockedIconLabelStyle"] != nil ||
+ [Info_ objectForKey:@"UndockedIconLabelStyle"] != nil
+ )] forKey:@"UndockedIconLabels"];
+
+ if (Debug_)
+ NSLog(@"WB:Debug:Info = %@", [Info_ description]);
+
if (Papered_) {
UIImageView *&_wallpaperView(MSHookIvar<UIImageView *>(self, "_wallpaperView"));
if (&_wallpaperView != NULL) {
MSHook(UIImage *, _UIImageWithName, NSString *name) {
if (Debug_)
NSLog(@"WB:Debug: _UIImageWithName(\"%@\")", name);
+ if (name == nil)
+ return nil;
int identifier;
bool packed;
$WebCoreFrameBridge = objc_getClass("WebCoreFrameBridge");
+ bool olden(dlsym(RTLD_DEFAULT, "GSLibraryCopyGenerationInfoValueForKey") == NULL);
+
+ if (olden)
+ $SBCalendarIconContentsView = objc_getClass("SBCalendarIconContentsView");
+
$SBApplication = objc_getClass("SBApplication");
$SBApplicationIcon = objc_getClass("SBApplicationIcon");
$SBAwayView = objc_getClass("SBAwayView");
$SBBookmarkIcon = objc_getClass("SBBookmarkIcon");
$SBButtonBar = objc_getClass("SBButtonBar");
- $SBCalendarIconContentsView = objc_getClass("SBCalendarIconContentsView");
$SBDockIconListView = objc_getClass("SBDockIconListView");
$SBIcon = objc_getClass("SBIcon");
$SBIconBadge = objc_getClass("SBIconBadge");
WBRename(SBDockIconListView, setFrame:, setFrame$);
MSHookMessage(object_getClass($SBDockIconListView), @selector(shouldShowNewDock), &$SBDockIconListView$shouldShowNewDock, &_SBDockIconListView$shouldShowNewDock);
- WBRename(SBIconLabel, drawRect:, drawRect$);
+ if (olden)
+ WBRename(SBIconLabel, drawRect:, drawRect$);
+
WBRename(SBIconLabel, initWithSize:label:, initWithSize$label$);
WBRename(SBIconLabel, setInDock:, setInDock$);
Docked_ = $getTheme$([NSArray arrayWithObjects:@"Dock.png", nil]);
- if ([Info_ objectForKey:@"UndockedIconLabels"] == nil)
- [Info_ setObject:[NSNumber numberWithBool:(
- !Papered_ ||
- [Info_ objectForKey:@"DockedIconLabelStyle"] != nil ||
- [Info_ objectForKey:@"UndockedIconLabelStyle"] != nil
- )] forKey:@"UndockedIconLabels"];
-
- if (Debug_)
- NSLog(@"WB:Debug:Info = %@", [Info_ description]);
-
[pool release];
}