]> git.saurik.com Git - winterboard.git/commitdiff
Various fixes for 2.x and BigBoss.
authorJay Freeman (saurik) <saurik@saurik.com>
Thu, 4 Jun 2009 06:18:11 +0000 (06:18 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 4 Jun 2009 06:18:11 +0000 (06:18 +0000)
Library.mm
control

index 9242b679c3af6b314ed8113bdaace4c4a8606afa..35500a90058d9fc6c1b5e95555bb4ee90171b0aa 100644 (file)
@@ -280,7 +280,6 @@ static NSString *$pathForIcon$(SBApplication *self) {
     path = [path stringByDeletingLastPathComponent];
     if (path == nil || [path length] == 0 || [path isEqualToString:@"/"])
         return nil;
     path = [path stringByDeletingLastPathComponent];
     if (path == nil || [path length] == 0 || [path isEqualToString:@"/"])
         return nil;
-    return [NSBundle mainBundle];
 
     NSBundle *bundle([Bundles_ objectForKey:path]);
     if (reinterpret_cast<id>(bundle) == [NSNull null])
 
     NSBundle *bundle([Bundles_ objectForKey:path]);
     if (reinterpret_cast<id>(bundle) == [NSNull null])
@@ -292,7 +291,7 @@ static NSString *$pathForIcon$(SBApplication *self) {
             bundle = [NSBundle wb$bundleWithFile:path];
         if (Debug_)
             NSLog(@"WB:Debug:PathBundle(%@, %@)", path, bundle);
             bundle = [NSBundle wb$bundleWithFile:path];
         if (Debug_)
             NSLog(@"WB:Debug:PathBundle(%@, %@)", path, bundle);
-        //[Bundles_ setObject:(bundle == nil ? [NSNull null] : reinterpret_cast<id>(bundle)) forKey:path];
+        [Bundles_ setObject:(bundle == nil ? [NSNull null] : reinterpret_cast<id>(bundle)) forKey:path];
     }
 
     return bundle;
     }
 
     return bundle;
@@ -311,7 +310,6 @@ static NSString *$pathForIcon$(SBApplication *self) {
         NSLog(@"WB:Debug:Bypass(\"%@\")", self);
 
     if (NSBundle *bundle = [NSBundle wb$bundleWithFile:self]) {
         NSLog(@"WB:Debug:Bypass(\"%@\")", self);
 
     if (NSBundle *bundle = [NSBundle wb$bundleWithFile:self]) {
-        return self;
         NSString *file([self stringByResolvingSymlinksInPath]);
         NSString *prefix([[bundle bundlePath] stringByResolvingSymlinksInPath]);
         if ([file hasPrefix:prefix]) {
         NSString *file([self stringByResolvingSymlinksInPath]);
         NSString *prefix([[bundle bundlePath] stringByResolvingSymlinksInPath]);
         if ([file hasPrefix:prefix]) {
@@ -417,7 +415,7 @@ static UIImage *CachedImageAtPath(NSString *path) {
 MSHook(CGImageRef, _UIImageRefAtPath, NSString *name, bool cache, UIImageOrientation *orientation) {
     if (Debug_)
         NSLog(@"WB:Debug: _UIImageRefAtPath(\"%@\", %s)", name, cache ? "true" : "false");
 MSHook(CGImageRef, _UIImageRefAtPath, NSString *name, bool cache, UIImageOrientation *orientation) {
     if (Debug_)
         NSLog(@"WB:Debug: _UIImageRefAtPath(\"%@\", %s)", name, cache ? "true" : "false");
-    return __UIImageRefAtPath(([name wb$themedPath], name), cache, orientation);
+    return __UIImageRefAtPath([name wb$themedPath], cache, orientation);
 }
 
 /*MSHook(UIImage *, _UIImageAtPath, NSString *name, NSBundle *bundle) {
 }
 
 /*MSHook(UIImage *, _UIImageAtPath, NSString *name, NSBundle *bundle) {
@@ -501,7 +499,7 @@ MSHook(void, SBCalendarIconContentsView$drawRect$, SBCalendarIconContentsView *s
 
     CFDateFormatterSetFormat(formatter, (CFStringRef) [bundle localizedStringForKey:@"CALENDAR_ICON_DAY_NUMBER_FORMAT" value:@"" table:@"SpringBoard"]);
     CFStringRef date(CFDateFormatterCreateStringWithDate(NULL, formatter, now));
 
     CFDateFormatterSetFormat(formatter, (CFStringRef) [bundle localizedStringForKey:@"CALENDAR_ICON_DAY_NUMBER_FORMAT" value:@"" table:@"SpringBoard"]);
     CFStringRef date(CFDateFormatterCreateStringWithDate(NULL, formatter, now));
-    CFDateFormatterSetFormat(formatter, (CFStringRef) [bundle localizedStringForKey:@"CALENDAR_ICON_DAY_NAME_FORMAT" value:@"" table:@"SpringBoard"]);
+    CFDateFormatterSetFormat(formatter, (CFStringRef) [bundle localizedStringForKey:@"CALENDAR_ICON_DAY_NAME_FORMAT" value:@"cccc" table:@"SpringBoard"]);
     CFStringRef day(CFDateFormatterCreateStringWithDate(NULL, formatter, now));
 
     CFRelease(now);
     CFStringRef day(CFDateFormatterCreateStringWithDate(NULL, formatter, now));
 
     CFRelease(now);
@@ -627,12 +625,21 @@ MSHook(id, SBUIController$init, SBUIController *self, SEL sel) {
         return nil;
 
     UIWindow *&_window(MSHookIvar<UIWindow *>(self, "_window"));
         return nil;
 
     UIWindow *&_window(MSHookIvar<UIWindow *>(self, "_window"));
+    UIView *&_contentLayer(MSHookIvar<UIView *>(self, "_contentLayer"));
     UIView *&_contentView(MSHookIvar<UIView *>(self, "_contentView"));
 
     UIView *&_contentView(MSHookIvar<UIView *>(self, "_contentView"));
 
-    UIView *content([[[UIView alloc] initWithFrame:[_contentView frame]] autorelease]);
-    [content setBackgroundColor:[_contentView backgroundColor]];
-    [_contentView setBackgroundColor:[UIColor clearColor]];
-    [_contentView setFrame:[content bounds]];
+    UIView *layer;
+    if (&_contentLayer != NULL)
+        layer = _contentLayer;
+    else if (&_contentView != NULL)
+        layer = _contentView;
+    else
+        layer = nil;
+
+    UIView *content([[[UIView alloc] initWithFrame:[layer frame]] autorelease]);
+    [content setBackgroundColor:[layer backgroundColor]];
+    [layer setBackgroundColor:[UIColor clearColor]];
+    [layer setFrame:[content bounds]];
     [_window setContentView:content];
 
     _release(WallpaperFile_);
     [_window setContentView:content];
 
     _release(WallpaperFile_);
@@ -654,7 +661,7 @@ MSHook(id, SBUIController$init, SBUIController *self, SEL sel) {
 
             AVQueue *queue([controller_ queue]);
 
 
             AVQueue *queue([controller_ queue]);
 
-            UIView *video([[[UIView alloc] initWithFrame:[_contentView bounds]] autorelease]);
+            UIView *video([[[UIView alloc] initWithFrame:[content bounds]] autorelease]);
             [controller_ setLayer:[video _layer]];
 
             AVItem *item([[[AVItem alloc] initWithPath:mp4 error:&error] autorelease]);
             [controller_ setLayer:[video _layer]];
 
             AVItem *item([[[AVItem alloc] initWithPath:mp4 error:&error] autorelease]);
@@ -667,7 +674,7 @@ MSHook(id, SBUIController$init, SBUIController *self, SEL sel) {
            controller.movieControlMode = MPMovieControlModeHidden;
            [controller play];
 #else
            controller.movieControlMode = MPMovieControlModeHidden;
            [controller play];
 #else
-            MPVideoView *video = [[[$MPVideoView alloc] initWithFrame:[_contentView bounds]] autorelease];
+            MPVideoView *video = [[[$MPVideoView alloc] initWithFrame:[content bounds]] autorelease];
             [video setMovieWithPath:mp4];
             [video setRepeatMode:1];
             [video setRepeatGap:-1];
             [video setMovieWithPath:mp4];
             [video setRepeatMode:1];
             [video setRepeatGap:-1];
@@ -738,7 +745,7 @@ MSHook(id, SBUIController$init, SBUIController *self, SEL sel) {
         }
     }
 
         }
     }
 
-    [content addSubview:_contentView];
+    [content addSubview:layer];
     DumpHierarchy(_window);
 
     return self;
     DumpHierarchy(_window);
 
     return self;
@@ -804,6 +811,10 @@ extern "C" NSString *UIStyleStringFromColor(CGColorRef);*/
     return self;
 }
 
     return self;
 }
 
+- (NSString *) description {
+    return time_;
+}
+
 WBDelegate(time_)
 
 - (CGSize) drawAtPoint:(CGPoint)point forWidth:(float)width withFont:(UIFont *)font lineBreakMode:(int)mode {
 WBDelegate(time_)
 
 - (CGSize) drawAtPoint:(CGPoint)point forWidth:(float)width withFont:(UIFont *)font lineBreakMode:(int)mode {
diff --git a/control b/control
index 0e2f5c9a7d785b828e1bcfc9d83e40d84118daaa..326fcbcba3433b532b5bfcbeaca6600c449e5a35 100644 (file)
--- a/control
+++ b/control
@@ -3,7 +3,7 @@ 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.2920-1
+Version: 0.9.2922-1
 Description: more powerful, open-source SummerBoard
 Name: WinterBoard
 Depends: mobilesubstrate (>= 0.9.2660-1), killall
 Description: more powerful, open-source SummerBoard
 Name: WinterBoard
 Depends: mobilesubstrate (>= 0.9.2660-1), killall