]> git.saurik.com Git - winterboard.git/commitdiff
Checkpointing before integration experiment.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 12 Aug 2009 07:32:38 +0000 (07:32 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 12 Aug 2009 07:32:38 +0000 (07:32 +0000)
Library.mm
control

index e1bc3786bcb5805bf4a56868f051fca1d8f6dc72..9eeef2f913c0859d85b2368526ad83a76aec08d7 100644 (file)
@@ -114,6 +114,8 @@ Class $UIImage;
 Class $UINavigationBar;
 Class $UIToolbar;
 
 Class $UINavigationBar;
 Class $UIToolbar;
 
+Class $CKTranscriptController;
+
 Class $SBApplication;
 Class $SBApplicationIcon;
 Class $SBAwayView;
 Class $SBApplication;
 Class $SBApplicationIcon;
 Class $SBAwayView;
@@ -976,15 +978,15 @@ void SBStatusBarController$setStatusBarMode(int &mode) {
 }*/
 
 MSHook(void, SBStatusBarController$setStatusBarMode$orientation$duration$fenceID$animation$, SBStatusBarController *self, SEL sel, int mode, int orientation, float duration, int fenceID, int animation) {
 }*/
 
 MSHook(void, SBStatusBarController$setStatusBarMode$orientation$duration$fenceID$animation$, SBStatusBarController *self, SEL sel, int mode, int orientation, float duration, int fenceID, int animation) {
-    NSLog(@"mode:%d orientation:%d duration:%f fenceID:%d animation:%d", mode, orientation, duration, fenceID, animation);
+    //NSLog(@"mode:%d orientation:%d duration:%f fenceID:%d animation:%d", mode, orientation, duration, fenceID, animation);
     SBStatusBarController$setStatusBarMode(mode);
     return _SBStatusBarController$setStatusBarMode$orientation$duration$fenceID$animation$(self, sel, mode, orientation, duration, fenceID, animation);
 }
 
 MSHook(void, SBStatusBarController$setStatusBarMode$orientation$duration$fenceID$animation$startTime$, SBStatusBarController *self, SEL sel, int mode, int orientation, double duration, int fenceID, int animation, double startTime) {
     SBStatusBarController$setStatusBarMode(mode);
     return _SBStatusBarController$setStatusBarMode$orientation$duration$fenceID$animation$(self, sel, mode, orientation, duration, fenceID, animation);
 }
 
 MSHook(void, SBStatusBarController$setStatusBarMode$orientation$duration$fenceID$animation$startTime$, SBStatusBarController *self, SEL sel, int mode, int orientation, double duration, int fenceID, int animation, double startTime) {
-    NSLog(@"mode:%d orientation:%d duration:%f fenceID:%d animation:%d startTime:%f", mode, orientation, duration, fenceID, animation, startTime);
+    //NSLog(@"mode:%d orientation:%d duration:%f fenceID:%d animation:%d startTime:%f", mode, orientation, duration, fenceID, animation, startTime);
     SBStatusBarController$setStatusBarMode(mode);
     SBStatusBarController$setStatusBarMode(mode);
-    NSLog(@"mode=%u", mode);
+    //NSLog(@"mode=%u", mode);
     return _SBStatusBarController$setStatusBarMode$orientation$duration$fenceID$animation$startTime$(self, sel, mode, orientation, duration, fenceID, animation, startTime);
 }
 
     return _SBStatusBarController$setStatusBarMode$orientation$duration$fenceID$animation$startTime$(self, sel, mode, orientation, duration, fenceID, animation, startTime);
 }
 
@@ -1194,17 +1196,34 @@ MSHook(void, SBIconLabel$drawRect$, SBIconLabel *self, SEL sel, CGRect rect) {
     [label drawAtPoint:CGPointMake((bounds.size.width - size.width) / 2, 0) withStyle:style];
 }
 
     [label drawAtPoint:CGPointMake((bounds.size.width - size.width) / 2, 0) withStyle:style];
 }
 
-MSHook(void, mSMSMessageTranscriptController$loadView, mSMSMessageTranscriptController *self, SEL sel) {
-    _mSMSMessageTranscriptController$loadView(self, sel);
+MSHook(void, TranscriptController$loadView, mSMSMessageTranscriptController *self, SEL sel) {
+    _TranscriptController$loadView(self, sel);
 
     if (NSString *path = $getTheme$([NSArray arrayWithObjects:@"SMSBackground.png", @"SMSBackground.jpg", nil]))
         if (UIImage *image = [[UIImage alloc] initWithContentsOfFile:path]) {
             [image autorelease];
 
     if (NSString *path = $getTheme$([NSArray arrayWithObjects:@"SMSBackground.png", @"SMSBackground.jpg", nil]))
         if (UIImage *image = [[UIImage alloc] initWithContentsOfFile:path]) {
             [image autorelease];
+
+            UIView *&_transcriptTable(MSHookIvar<UIView *>(self, "_transcriptTable"));
             UIView *&_transcriptLayer(MSHookIvar<UIView *>(self, "_transcriptLayer"));
             UIView *&_transcriptLayer(MSHookIvar<UIView *>(self, "_transcriptLayer"));
-            UIView *parent([_transcriptLayer superview]);
+            UIView *table;
+            if (&_transcriptTable != NULL)
+                table = _transcriptTable;
+            else if (&_transcriptLayer != NULL)
+                table = _transcriptLayer;
+            else
+                table = nil;
+
+            UIView *placard(table != nil ? [table superview] : MSHookIvar<UIView *>(self, "_backPlacard"));
             UIImageView *background([[[UIImageView alloc] initWithImage:image] autorelease]);
             UIImageView *background([[[UIImageView alloc] initWithImage:image] autorelease]);
-            [parent insertSubview:background belowSubview:_transcriptLayer];
-            [_transcriptLayer setBackgroundColor:[UIColor clearColor]];
+
+            if (table == nil)
+                [placard insertSubview:background atIndex:0];
+            else {
+                [table setBackgroundColor:[UIColor clearColor]];
+                [placard insertSubview:background belowSubview:table];
+            }
+
+            WBLogHierarchy(placard);
         }
 }
 
         }
 }
 
@@ -1324,7 +1343,7 @@ static void nlset(Type_ &function, struct nlist *nl, size_t index) {
 
 template <typename Type_>
 static void dlset(Type_ &function, const char *name) {
 
 template <typename Type_>
 static void dlset(Type_ &function, const char *name) {
-    _GSFontGetUseLegacyFontMetrics = reinterpret_cast<Type_>(dlsym(RTLD_DEFAULT, name));
+    function = reinterpret_cast<Type_>(dlsym(RTLD_DEFAULT, name));
 }
 
 extern "C" void WBInitialize() {
 }
 
 extern "C" void WBInitialize() {
@@ -1448,9 +1467,14 @@ extern "C" void WBInitialize() {
                     [Info_ setObject:[info objectForKey:key] forKey:key];
         }
 
                     [Info_ setObject:[info objectForKey:key] forKey:key];
         }
 
+    $CKTranscriptController = objc_getClass("CKTranscriptController");
+    _TranscriptController$loadView = MSHookMessage($CKTranscriptController, @selector(loadView), &$TranscriptController$loadView);
+
     if ([identifier isEqualToString:@"com.apple.MobileSMS"]) {
     if ([identifier isEqualToString:@"com.apple.MobileSMS"]) {
-        Class mSMSMessageTranscriptController = objc_getClass("mSMSMessageTranscriptController");
-        _mSMSMessageTranscriptController$loadView = MSHookMessage(mSMSMessageTranscriptController, @selector(loadView), &$mSMSMessageTranscriptController$loadView);
+        if (_TranscriptController$loadView == NULL) {
+            Class mSMSMessageTranscriptController = objc_getClass("mSMSMessageTranscriptController");
+            _TranscriptController$loadView = MSHookMessage(mSMSMessageTranscriptController, @selector(loadView), &$TranscriptController$loadView);
+        }
     } else if ([identifier isEqualToString:@"com.apple.springboard"]) {
         CFNotificationCenterAddObserver(
             CFNotificationCenterGetDarwinNotifyCenter(),
     } else if ([identifier isEqualToString:@"com.apple.springboard"]) {
         CFNotificationCenterAddObserver(
             CFNotificationCenterGetDarwinNotifyCenter(),
diff --git a/control b/control
index 55288c12b1363ece674ca9747cc4d201d6e85c8f..ba131f9b79bf1756ce31c44d33804bbab7b83064 100644 (file)
--- a/control
+++ b/control
@@ -3,10 +3,10 @@ Priority: optional
 Section: System
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
 Section: System
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
-Version: 0.9.2958-1
+Version: 0.9.2983-2
 Description: more powerful, open-source SummerBoard
 Name: WinterBoard
 Description: more powerful, open-source SummerBoard
 Name: WinterBoard
-Depends: mobilesubstrate (>= 0.9.2660-1), killall
+Depends: mobilesubstrate (>= 0.9.2958-1), killall
 Provides: theme-manager
 Conflicts: com.modmyifone.winterboardicon
 Replaces: com.modmyifone.winterboardicon
 Provides: theme-manager
 Conflicts: com.modmyifone.winterboardicon
 Replaces: com.modmyifone.winterboardicon