From: Jay Freeman (saurik) Date: Sun, 23 Aug 2009 08:08:44 +0000 (+0000) Subject: Fix the C++ MobileSubstrate API adapters. X-Git-Tag: v0.9.3184~6 X-Git-Url: https://git.saurik.com/fiveicondock.git/commitdiff_plain/8021a3ca83e694e9d1fc3725ca3db5dd52c9b174 Fix the C++ MobileSubstrate API adapters. --- diff --git a/Tweak.mm b/Tweak.mm index 8581f2b..8e6a74d 100644 --- a/Tweak.mm +++ b/Tweak.mm @@ -5,6 +5,7 @@ #import #import #import +#import MSHook(float, SBButtonBar$leftMarginForIconRowArray$, SBButtonBar *self, SEL sel, NSArray *row) { return [row indexOfObject:[NSNull null]] == NSNotFound ? 4 : _SBButtonBar$leftMarginForIconRowArray$(self, sel, row); @@ -64,13 +65,21 @@ MSHook(CGPoint, SBButtonBar$originForIconAtX$Y$, SBButtonBar *self, SEL sel, int return origin; } +static int $SBIconModel$maxIconListCount(SBIconModel *self, SEL sel) { + return 16; +} + extern "C" void TweakInitialize() { Class $SBButtonBar(objc_getClass("SBButtonBar")); - _SBButtonBar$leftMarginForIconRowArray$ = MSHookMessage($SBButtonBar, @selector(leftMarginForIconRowArray:), &$SBButtonBar$leftMarginForIconRowArray$); + MSHookMessage($SBButtonBar, @selector(leftMarginForIconRowArray:), MSHake(SBButtonBar$leftMarginForIconRowArray$)); MSHookMessage($SBButtonBar, @selector(maxIconColumns), &$SBButtonBar$maxIconColumns); MSHookMessage($SBButtonBar, @selector(topIconPadding), &$SBButtonBar$topIconPadding); - _SBButtonBar$originForIconAtX$Y$ = MSHookMessage($SBButtonBar, @selector(originForIconAtX:Y:), &$SBButtonBar$originForIconAtX$Y$); + MSHookMessage($SBButtonBar, @selector(originForIconAtX:Y:), MSHake(SBButtonBar$originForIconAtX$Y$)); Class $SBIcon(objc_getClass("SBIcon")); - _SBIcon$setOrigin$ = MSHookMessage($SBIcon, @selector(setOrigin:), &$SBIcon$setOrigin$); + MSHookMessage($SBIcon, @selector(setOrigin:), MSHake(SBIcon$setOrigin$)); + + Class $SBIconModel(objc_getClass("SBIconModel")); + Class $$SBIconModel(object_getClass($SBIconModel)); + MSHookMessage($$SBIconModel, @selector(maxIconListCount), &$SBIconModel$maxIconListCount); } diff --git a/control b/control index c95c969..0d58b9f 100644 --- a/control +++ b/control @@ -3,9 +3,9 @@ Priority: optional Section: Tweaks Maintainer: Jay Freeman (saurik) Architecture: iphoneos-arm -Version: 0.9.2978-1 +Version: 0.9.3012-1 Description: fits even more stuff right down there -Name: Five Icon Dock -Depends: mobilesubstrate (>= 0.9.2555-1) +Name: Five+ Icon Dock +Depends: mobilesubstrate (>= 0.9.3005-1), firmware (>= 2.2) Author: Jay Freeman (saurik) Depiction: http://cydia.saurik.com/info/com.saurik.iphone.fid/