X-Git-Url: https://git.saurik.com/winterboard.git/blobdiff_plain/f53378dc49e468626bbc1f33a8205fe40c9c7a27..f7d32b1e611609527b20f43fca9e35c31f98b9d7:/Library.mm diff --git a/Library.mm b/Library.mm index e882c25..084ab9a 100644 --- a/Library.mm +++ b/Library.mm @@ -776,6 +776,16 @@ MSHook(id, SBUIController$init, SBUIController *self, SEL sel) { UIDevice *device([UIDevice currentDevice]); IsWild_ = [device respondsToSelector:@selector(isWildcat)] && [device isWildcat]; + if ([Info_ objectForKey:@"UndockedIconLabels"] == nil) + [Info_ setObject:[NSNumber numberWithBool:( + !(Papered_ || 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(self, "_wallpaperView")); if (&_wallpaperView != NULL) { @@ -1394,6 +1404,8 @@ MSHook(void, TranscriptController$loadView, mSMSMessageTranscriptController *sel MSHook(UIImage *, _UIImageWithName, NSString *name) { if (Debug_) NSLog(@"WB:Debug: _UIImageWithName(\"%@\")", name); + if (name == nil) + return nil; int identifier; bool packed; @@ -1801,15 +1813,5 @@ extern "C" void WBInitialize() { 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]; }