From ab3ce88ddff5bee70a2c27894693494c7bb154b7 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 21 May 2010 16:09:12 +0000 Subject: [PATCH] Because I hate users, I'm going to add Icons-72. --- Library.mm | 11 +++++++---- control | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Library.mm b/Library.mm index b19eecd..13327de 100644 --- a/Library.mm +++ b/Library.mm @@ -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 d4f631d..14b9711 100644 --- a/control +++ b/control @@ -3,7 +3,7 @@ Priority: optional Section: System Maintainer: Jay Freeman (saurik) 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 -- 2.45.2