]> git.saurik.com Git - winterboard.git/commitdiff
Fix icon labels on iOS 4.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 24 Jul 2011 10:19:48 +0000 (10:19 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 24 Jul 2011 10:19:48 +0000 (10:19 +0000)
Library.mm

index e882c2534de9ccd765629ebb6b156628358656cf..f3534c28c8388a6debc645e369bd2aab0d11ed23 100644 (file)
@@ -776,6 +776,16 @@ MSHook(id, SBUIController$init, SBUIController *self, SEL sel) {
     UIDevice *device([UIDevice currentDevice]);
     IsWild_ = [device respondsToSelector:@selector(isWildcat)] && [device isWildcat];
 
     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<UIImageView *>(self, "_wallpaperView"));
         if (&_wallpaperView != NULL) {
     if (Papered_) {
         UIImageView *&_wallpaperView(MSHookIvar<UIImageView *>(self, "_wallpaperView"));
         if (&_wallpaperView != NULL) {
@@ -1801,15 +1811,5 @@ extern "C" void WBInitialize() {
 
     Docked_ = $getTheme$([NSArray arrayWithObjects:@"Dock.png", nil]);
 
 
     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];
 }
     [pool release];
 }