]> git.saurik.com Git - winterboard.git/commitdiff
Because I hate users, I'm going to add Icons-72.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 21 May 2010 16:09:12 +0000 (16:09 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 21 May 2010 16:09:12 +0000 (16:09 +0000)
Library.mm
control

index b19eecd8a2cb3a33c3cadfc19f646a8837eebcad..13327def1c36481f0dab736cb12570b928b80fea 100644 (file)
@@ -256,7 +256,7 @@ static NSString *$pathForFile$inBundle$(NSString *file, NSBundle *bundle, bool u
     return nil;
 }
 
-static NSString *$pathForIcon$(SBApplication *self) {
+static NSString *$pathForIcon$(SBApplication *self, NSString *suffix = @"") {
     NSString *identifier = [self bundleIdentifier];
     NSString *path = [self path];
     NSString *folder = [path lastPathComponent];
@@ -276,7 +276,7 @@ static NSString *$pathForIcon$(SBApplication *self) {
 
     #define testForIcon(Name) \
         if (NSString *name = Name) \
-            [names addObject:[NSString stringWithFormat:@"Icons/%@.png", name]];
+            [names addObject:[NSString stringWithFormat:@"Icons%@/%@.png", suffix, name]];
 
     if (![didentifier isEqualToString:identifier])
         testForIcon(didentifier);
@@ -472,10 +472,13 @@ MSHook(UIImage *, SBApplicationIcon$icon, SBApplicationIcon *self, SEL sel) {
 
 MSHook(UIImage *, SBApplicationIcon$generateIconImage$, SBApplicationIcon *self, SEL sel, int type) {
     if (type == 2)
-        if (![Info_ wb$boolForKey:@"ComposeStoreIcons"])
-            if (NSString *path = $pathForIcon$([self application]))
+        if (![Info_ wb$boolForKey:@"ComposeStoreIcons"]) {
+            if (NSString *path72 = $pathForIcon$([self application], @"-72"))
+                return [UIImage imageWithContentsOfFile:path];
+            else if (NSString *path = $pathForIcon$([self application]))
                 if (UIImage *image = [UIImage imageWithContentsOfFile:path])
                     return [image _imageScaledToProportion:1.2 interpolationQuality:5];
+        }
     return _SBApplicationIcon$generateIconImage$(self, sel, type);
 }
 
diff --git a/control b/control
index d4f631daa1d92d810a347b207f5eecdb49648e53..14b9711444b86f8bce31801fe031eab7faad336d 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.3186-1
+Version: 0.9.3187-1
 Description: more powerful, open-source SummerBoard
 Name: WinterBoard
 Depends: mobilesubstrate (>= 0.9.2958-1), killall, preferenceloader, libhide (>= 2.0.4), findutils, net.howett.pincrush (>= 0.0.1-23) | pincrush