]> git.saurik.com Git - winterboard.git/commitdiff
Web Clips, Lock Backgrounds, and glowing StatusBars.
authorJay Freeman (saurik) <saurik@saurik.com>
Thu, 28 Aug 2008 09:21:45 +0000 (09:21 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 28 Aug 2008 09:21:45 +0000 (09:21 +0000)
Black Navigation Bars.theme/Info.plist
Library.mm
Saurik.theme/Info.plist
Server Lock Example.theme/LockBackground.html [new file with mode: 0644]
Solid Status Bar.theme/Info.plist [new file with mode: 0644]
User Wallpaper.theme/LockBackground.jpg [new symlink]
control
makefile

index 69b69dcc1c81ad387c722b3f7c88b23d3298e2d7..ab601e0ba89f4c9db80aed4167a76801653767bb 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0"><dict>
 
-<key>NavigationBarStyle</key>
+<key>NavigationBarStyle-0</key>
 <string>1</string>
 
 </dict></plist>
index 0741dc833898de025632cc5605e23225429528c9..95566f1924e32c297766e8985ebda71712a0f524 100644 (file)
@@ -76,10 +76,12 @@ extern "C" {
 #import <SpringBoard/SBApplication.h>
 #import <SpringBoard/SBApplicationIcon.h>
 #import <SpringBoard/SBAppWindow.h>
+#import <SpringBoard/SBBookmarkIcon.h>
 #import <SpringBoard/SBButtonBar.h>
 #import <SpringBoard/SBContentLayer.h>
 #import <SpringBoard/SBIconController.h>
 #import <SpringBoard/SBIconLabel.h>
+#import <SpringBoard/SBSlidingAlertDisplay.h>
 #import <SpringBoard/SBStatusBarContentsView.h>
 #import <SpringBoard/SBStatusBarController.h>
 #import <SpringBoard/SBStatusBarTimeView.h>
@@ -123,7 +125,7 @@ Class $UIWebDocumentView;
 @end
 
 bool Debug_ = false;
-bool Engineer_ = false;
+bool Engineer_ = true;
 
 /* WinterBoard Backend {{{ */
 #define WBPrefix "wb_"
@@ -176,6 +178,9 @@ void WBRename(bool instance, const char *classname, const char *oldname, IMP new
 /* }}} */
 
 @protocol WinterBoard
+- (void) wb_updateDesktopImage:(UIImage *)image;
+- (UIImage *) wb_defaultDesktopImage;
+- (NSString *) wb_bundlePath;
 - (NSString *) wb_pathForIcon;
 - (NSString *) wb_pathForResource:(NSString *)resource ofType:(NSString *)type;
 - (id) wb_init;
@@ -200,19 +205,33 @@ void WBRename(bool instance, const char *classname, const char *oldname, IMP new
 - (void) wb_appendIconList:(SBIconList *)list;
 - (id) wb_initWithStatusBar:(id)bar mode:(int)mode;
 - (id) wb_initWithMode:(int)mode orientation:(int)orientation;
+- (id) wb_imageAtPath:(NSString *)path;
+- (id) wb_initWithContentsOfFile:(NSString *)file;
+- (id) wb_initWithContentsOfFile:(NSString *)file cache:(BOOL)cache;
 - (void) wb_setStatusBarMode:(int)mode orientation:(int)orientation duration:(float)duration fenceID:(int)id animation:(int)animation;
 @end
 
-NSMutableDictionary **__mappedImages;
-NSMutableDictionary *UIImages_;
-NSMutableDictionary *PathImages_;
+static NSMutableDictionary **__mappedImages;
+static NSMutableDictionary *UIImages_;
+static NSMutableDictionary *PathImages_;
 
-NSFileManager *Manager_;
-NSDictionary *English_;
-NSMutableDictionary *Info_;
-NSMutableArray *themes_;
+static NSFileManager *Manager_;
+static NSDictionary *English_;
+static NSMutableDictionary *Info_;
+static NSMutableArray *themes_;
 
-NSString *$pathForIcon$(SBApplication<WinterBoard> *self) {
+static NSString *$getTheme$(NSArray *files) {
+    for (NSString *theme in themes_)
+        for (NSString *file in files) {
+            NSString *path([NSString stringWithFormat:@"%@/%@", theme, file]);
+            if ([Manager_ fileExistsAtPath:path])
+                return path;
+        }
+
+    return nil;
+}
+
+static NSString *$pathForIcon$(SBApplication<WinterBoard> *self) {
     for (NSString *theme in themes_) {
         NSString *identifier = [self bundleIdentifier];
         NSString *folder = [[self path] lastPathComponent];
@@ -264,13 +283,21 @@ static UIImage *SBApplicationIcon$icon(SBApplicationIcon<WinterBoard> *self, SEL
     return [self wb_icon];
 }
 
+static UIImage *SBBookmarkIcon$icon(SBBookmarkIcon<WinterBoard> *self, SEL sel) {
+    if (Debug_)
+        NSLog(@"WB:Debug:Bookmark(%@:%@)", [self displayIdentifier], [self displayName]);
+    if (NSString *path = $getTheme$([NSArray arrayWithObject:[NSString stringWithFormat:@"Icons/%@.png", [self displayName]]]))
+        return [$UIImage imageWithContentsOfFile:path];
+    return [self wb_icon];
+}
+
 static NSString *SBApplication$pathForIcon(SBApplication<WinterBoard> *self, SEL sel) {
     if (NSString *path = $pathForIcon$(self))
         return path;
     return [self wb_pathForIcon];
 }
 
-static NSString *$pathForFile$inBundle$(NSString *file, NSBundle *bundle, bool ui) {
+static NSString *$pathForFile$inBundle$(NSString *file, NSBundle<WinterBoard> *bundle, bool ui) {
     for (NSString *theme in themes_) {
         NSString *identifier = [bundle bundleIdentifier];
 
@@ -280,7 +307,7 @@ static NSString *$pathForFile$inBundle$(NSString *file, NSBundle *bundle, bool u
                 return path;
         }
 
-        if (NSString *folder = [[bundle bundlePath] lastPathComponent]) {
+        if (NSString *folder = [[bundle wb_bundlePath] lastPathComponent]) {
             NSString *path = [NSString stringWithFormat:@"%@/Folders/%@/%@", theme, folder, file];
             if ([Manager_ fileExistsAtPath:path])
                 return path;
@@ -312,7 +339,7 @@ static UIImage *CachedImageAtPath(NSString *path) {
     UIImage *image = [PathImages_ objectForKey:path];
     if (image != nil)
         return reinterpret_cast<id>(image) == [NSNull null] ? nil : image;
-    image = [[$UIImage alloc] initWithContentsOfFile:path cache:true];
+    image = [[$UIImage alloc] wb_initWithContentsOfFile:path cache:true];
     if (image != nil)
         image = [image autorelease];
     [PathImages_ setObject:(image == nil ? [NSNull null] : reinterpret_cast<id>(image)) forKey:path];
@@ -347,6 +374,115 @@ static UIImage *UIImage$applicationImageNamed$(Class<WinterBoard> self, SEL sel,
     return [self wb_applicationImageNamed:name];
 }
 
+@interface NSString (WinterBoard)
+- (NSString *) wb_themedPath;
+@end
+
+@implementation NSString (WinterBoard)
+
+- (NSString *) wb_themedPath {
+    NSLog(@"WB:Debug:Bypass(\"%@\")", self);
+    return self;
+}
+
+@end
+
+static NSMutableDictionary *Files_;
+
+#define WBDelegate(delegate) \
+    - (NSMethodSignature*) methodSignatureForSelector:(SEL)sel { \
+        if (Engineer_) \
+            NSLog(@"WB:MS:%s:(%s)", class_getName([self class]), sel_getName(sel)); \
+        if (NSMethodSignature *sig = [delegate methodSignatureForSelector:sel]) \
+            return sig; \
+        NSLog(@"WB:Error: [%s methodSignatureForSelector:(%s)]", class_getName([self class]), sel_getName(sel)); \
+        return nil; \
+    } \
+\
+    - (void) forwardInvocation:(NSInvocation*)inv { \
+        SEL sel = [inv selector]; \
+        if ([delegate respondsToSelector:sel]) \
+            [inv invokeWithTarget:delegate]; \
+        else \
+            NSLog(@"WB:Error: [%s forwardInvocation:(%s)]", class_getName([self class]), sel_getName(sel)); \
+    }
+
+/*@interface WBBundlePath : NSProxy {
+    NSBundle<WinterBoard> *bundle_;
+    NSString *path_;
+}
+
+- (id) initWithBundle:(NSBundle *)bundle path:(NSString *)path;
+
+- (NSString *) wb_themedPath;
+
+@end
+
+@implementation WBBundlePath
+
+- (void) dealloc {
+    [bundle_ release];
+    [path_ release];
+    [super dealloc];
+}
+
+- (id) initWithBundle:(NSBundle *)bundle path:(NSString *)path {
+    bundle_ = [bundle retain];
+    path_ = [path retain];
+    return self;
+}
+
+WBDelegate(path_)
+
+- (NSString *) stringByAppendingPathComponent:(NSString *)component {
+    NSLog(@"WB:Debug:app:%@:%@", path_, component);
+    return [[[WBBundlePath alloc] initWithBundle:bundle_ path:[path_ stringByAppendingPathComponent:component]] autorelease];
+}
+
+- (NSString *) stringByAppendingPathExtension:(NSString *)extension {
+    return [[[WBBundlePath alloc] initWithBundle:bundle_ path:[path_ stringByAppendingPathExtension:extension]] autorelease];
+}
+
+- (const char *) UTF8String {
+    const char *string = [path_ UTF8String];
+    NSLog(@"WB:Debug:UTF=%s", string);
+    return string;
+}
+
+- (NSString *) description {
+    return [path_ description];
+}
+
+- (NSString *) wb_themedPath {
+    return path_;
+    NSString *path = [Files_ objectForKey:path_];
+    if (path == nil) {
+        NSString *path = [bundle_ wb_bundlePath];
+        if (![path_ hasPrefix:path]) {
+            NSLog(@"WB:Error:![@\"%@\" hasPrefix:@\"%@\"]", path_, path);
+            return path_;
+        }
+        path = [path_ substringFromIndex:([path length] + 1)];
+        path = $pathForFile$inBundle$(path, bundle_, false);
+        if (path == nil)
+            path = reinterpret_cast<NSString *>([NSNull null]);
+        [Files_ setObject:path forKey:path_];
+        if (Debug_)
+            NSLog(@"WB:Debug:ThemePath(\"%@\")->\"%@\"", path_, path);
+    }
+    if (reinterpret_cast<id>(path) == [NSNull null])
+        path = path_;
+    NSLog(@"WB:Debug:ThemePath=%@", path);
+    return path;
+}
+
+@end*/
+
+static NSString *NSBundle$bundlePath$(NSBundle<WinterBoard> *self, SEL sel) {
+    //return [[WBBundlePath alloc] initWithBundle:self path:[self wb_bundlePath]];
+    return [self wb_bundlePath];
+}
+
 static NSString *NSBundle$pathForResource$ofType$(NSBundle<WinterBoard> *self, SEL sel, NSString *resource, NSString *type) {
     NSString *file = type == nil ? resource : [NSString stringWithFormat:@"%@.%@", resource, type];
     if (Debug_)
@@ -356,7 +492,7 @@ static NSString *NSBundle$pathForResource$ofType$(NSBundle<WinterBoard> *self, S
     return [self wb_pathForResource:resource ofType:type];
 }
 
-bool $setBarStyle$_(NSString *name, UIView<WinterBoard> *self, int style) {
+static bool $setBarStyle$_(NSString *name, UIView<WinterBoard> *self, int style) {
     if (Debug_)
         NSLog(@"WB:Debug:%@Style:%d", name, style);
     NSNumber *number = nil;
@@ -375,7 +511,7 @@ bool $setBarStyle$_(NSString *name, UIView<WinterBoard> *self, int style) {
     }
 }
 
-/*id UINavigationBarBackground$initWithFrame$withBarStyle$withTintColor$(UINavigationBarBackground<WinterBoard> *self, SEL sel, CGRect frame, int style, UIColor *tint) {
+/*static id UINavigationBarBackground$initWithFrame$withBarStyle$withTintColor$(UINavigationBarBackground<WinterBoard> *self, SEL sel, CGRect frame, int style, UIColor *tint) {
     _trace();
 
     if (NSNumber *number = [Info_ objectForKey:@"NavigationBarStyle"])
@@ -387,7 +523,7 @@ bool $setBarStyle$_(NSString *name, UIView<WinterBoard> *self, int style) {
     return [self wb_initWithFrame:frame withBarStyle:style withTintColor:tint];
 }*/
 
-/*id UINavigationBar$initWithCoder$(SBAppWindow<WinterBoard> *self, SEL sel, CGRect frame, NSCoder *coder) {
+/*static id UINavigationBar$initWithCoder$(SBAppWindow<WinterBoard> *self, SEL sel, CGRect frame, NSCoder *coder) {
     self = [self wb_initWithCoder:coder];
     if (self == nil)
         return nil;
@@ -395,7 +531,7 @@ bool $setBarStyle$_(NSString *name, UIView<WinterBoard> *self, int style) {
     return self;
 }
 
-id UINavigationBar$initWithFrame$(SBAppWindow<WinterBoard> *self, SEL sel, CGRect frame) {
+static id UINavigationBar$initWithFrame$(SBAppWindow<WinterBoard> *self, SEL sel, CGRect frame) {
     self = [self wb_initWithFrame:frame];
     if (self == nil)
         return nil;
@@ -420,18 +556,29 @@ static void $didMoveToSuperview(SBButtonBar<WinterBoard> *self, SEL sel) {
     [self wb_didMoveToSuperview];
 }
 
-static NSString *$getTheme$(NSArray *files) {
-    for (NSString *theme in themes_)
-        for (NSString *file in files) {
-            NSString *path([NSString stringWithFormat:@"%@/%@", theme, file]);
-            if ([Manager_ fileExistsAtPath:path])
-                return path;
-        }
+static id UIImage$imageAtPath$(NSObject<WinterBoard> *self, SEL sel, NSString *path) {
+    return [self wb_imageAtPath:[path wb_themedPath]];
+}
 
-    return nil;
+static id $initWithContentsOfFile$(NSObject<WinterBoard> *self, SEL sel, NSString *file) {
+    return [self wb_initWithContentsOfFile:[file wb_themedPath]];
 }
 
-static UIImageView *Wallpaper_;
+static id UIImage$initWithContentsOfFile$cache$(UIImage<WinterBoard> *self, SEL sel, NSString *file, BOOL cache) {
+    return [self wb_initWithContentsOfFile:[file wb_themedPath] cache:cache];
+}
+
+static UIImage *UIImage$defaultDesktopImage$(UIImage<WinterBoard> *self, SEL sel) {
+    if (Debug_)
+        NSLog(@"WB:Debug:DefaultDesktopImage");
+    if (NSString *path = $getTheme$([NSArray arrayWithObjects:@"LockBackground.png", @"LockBackground.jpg", nil]))
+        return [$UIImage imageWithContentsOfFile:path];
+    return [self wb_defaultDesktopImage];
+}
+
+static UIImageView *WallpaperImage_;
+static UIWebDocumentView *WallpaperPage_;
+static NSURL *WallpaperURL_;
 
 static id SBContentLayer$initWithSize$(SBContentLayer<WinterBoard> *self, SEL sel, CGSize size) {
     self = [self wb_initWithSize:size];
@@ -449,15 +596,15 @@ static id SBContentLayer$initWithSize$(SBContentLayer<WinterBoard> *self, SEL se
 
     UIImage *image;
     if (NSString *path = $getTheme$([NSArray arrayWithObjects:@"Wallpaper.png", @"Wallpaper.jpg", nil])) {
-        image = [[$UIImage alloc] initWithContentsOfFile:path];
+        image = [[$UIImage alloc] wb_initWithContentsOfFile:path];
         if (image != nil)
             image = [image autorelease];
     } else image = nil;
 
-    if (Wallpaper_ != nil)
-        [Wallpaper_ release];
-    Wallpaper_ = [[$UIImageView alloc] initWithImage:image];
-    [self addSubview:Wallpaper_];
+    if (WallpaperImage_ != nil)
+        [WallpaperImage_ release];
+    WallpaperImage_ = [[$UIImageView alloc] initWithImage:image];
+    [self addSubview:WallpaperImage_];
 
     if (NSString *path = $getTheme$([NSArray arrayWithObject:@"Wallpaper.html"])) {
         CGRect bounds = [self bounds];
@@ -465,7 +612,15 @@ static id SBContentLayer$initWithSize$(SBContentLayer<WinterBoard> *self, SEL se
         UIWebDocumentView *view([[[$UIWebDocumentView alloc] initWithFrame:bounds] autorelease]);
         [view setAutoresizes:true];
 
-        [view loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:path]]];
+        if (WallpaperPage_ != nil)
+            [WallpaperPage_ release];
+        WallpaperPage_ = [view retain];
+
+        if (WallpaperURL_ != nil)
+            [WallpaperURL_ release];
+        WallpaperURL_ = [[NSURL fileURLWithPath:path] retain];
+
+        [WallpaperPage_ loadRequest:[NSURLRequest requestWithURL:WallpaperURL_]];
 
         [[view webView] setDrawsBackground:false];
         [view setBackgroundColor:[$UIColor clearColor]];
@@ -476,23 +631,44 @@ static id SBContentLayer$initWithSize$(SBContentLayer<WinterBoard> *self, SEL se
     return self;
 }
 
-#define WBDelegate(delegate) \
-    - (NSMethodSignature*) methodSignatureForSelector:(SEL)sel { \
-        if (Engineer_) \
-            NSLog(@"WB:MS:%s:(%s)", class_getName([self class]), sel_getName(sel)); \
-        if (NSMethodSignature *sig = [delegate methodSignatureForSelector:sel]) \
-            return sig; \
-        NSLog(@"WB:Error: [%s methodSignatureForSelector:(%s)]", class_getName([self class]), sel_getName(sel)); \
-        return nil; \
-    } \
-\
-    - (void) forwardInvocation:(NSInvocation*)inv { \
-        SEL sel = [inv selector]; \
-        if ([delegate respondsToSelector:sel]) \
-            [inv invokeWithTarget:delegate]; \
-        else \
-            NSLog(@"WB:Error: [%s forwardInvocation:(%s)]", class_getName([self class]), sel_getName(sel)); \
+static void SBSlidingAlertDisplay$updateDesktopImage$(SBSlidingAlertDisplay<WinterBoard> *self, SEL sel, UIImage *image) {
+    NSString *path = $getTheme$([NSArray arrayWithObject:@"LockBackground.html"]);
+
+    if (path) {
+        UIView *background;
+        object_getInstanceVariable(self, "_backgroundView", reinterpret_cast<void **>(&background));
+        if (background != nil)
+            path = nil;
+    }
+
+    [self wb_updateDesktopImage:image];
+
+    if (path != nil) {
+        CGRect bounds = [self bounds];
+
+        UIWebDocumentView *view([[[$UIWebDocumentView alloc] initWithFrame:bounds] autorelease]);
+        [view setAutoresizes:true];
+
+        if (WallpaperPage_ != nil)
+            [WallpaperPage_ release];
+        WallpaperPage_ = [view retain];
+
+        if (WallpaperURL_ != nil)
+            [WallpaperURL_ release];
+        WallpaperURL_ = [[NSURL fileURLWithPath:path] retain];
+
+        [WallpaperPage_ loadRequest:[NSURLRequest requestWithURL:WallpaperURL_]];
+
+        [[view webView] setDrawsBackground:false];
+        [view setBackgroundColor:[$UIColor clearColor]];
+
+        UIView *background;
+        object_getInstanceVariable(self, "_backgroundView", reinterpret_cast<void **>(&background));
+        NSLog(@"back:%@", background);
+
+        [self insertSubview:view aboveSubview:background];
     }
+}
 
 static unsigned *__currentContextCount;
 static void ***__currentContextStack;
@@ -619,7 +795,7 @@ WBDelegate(string_)
 static void SBStatusBarController$setStatusBarMode$orientation$duration$fenceID$animation$(SBStatusBarController<WinterBoard> *self, SEL sel, int mode, int orientation, float duration, int id, int animation) {
     if (Debug_)
         NSLog(@"WB:Debug:setStatusBarMode:%d", mode);
-    if (mode != 104)
+    if (mode < 100) // 104:hidden 105:glowing
         if (NSNumber *number = [Info_ objectForKey:@"StatusBarMode"])
             mode = [number intValue];
     return [self wb_setStatusBarMode:mode orientation:orientation duration:duration fenceID:id animation:animation];
@@ -689,7 +865,7 @@ static UIImage *$_UIImageWithName(NSString *name) {
         if (image != nil)
             return reinterpret_cast<id>(image) == [NSNull null] ? nil : image;
         if (NSString *path = $pathForFile$inBundle$(name, _UIKitBundle(), true)) {
-            image = [[$UIImage alloc] initWithContentsOfFile:path];
+            image = [[$UIImage alloc] wb_initWithContentsOfFile:path];
             if (image != nil)
                 [image autorelease];
         }
@@ -802,13 +978,19 @@ static void ChangeWallpaper(
 ) {
     if (Debug_)
         NSLog(@"WB:Debug:ChangeWallpaper!");
+
     UIImage *image;
     if (NSString *path = $getTheme$([NSArray arrayWithObjects:@"Wallpaper.png", @"Wallpaper.jpg", nil])) {
-        image = [[$UIImage alloc] initWithContentsOfFile:path];
+        image = [[$UIImage alloc] wb_initWithContentsOfFile:path];
         if (image != nil)
             image = [image autorelease];
     } else image = nil;
-    [Wallpaper_ setImage:image];
+
+    if (WallpaperImage_ != nil)
+        [WallpaperImage_ setImage:image];
+    if (WallpaperPage_ != nil)
+        [WallpaperPage_ loadRequest:[NSURLRequest requestWithURL:WallpaperURL_]];
+
 }
 
 extern "C" void WBInitialize() {
@@ -867,17 +1049,9 @@ extern "C" void WBInitialize() {
         WBReplace(_Z24GetFileNameForThisActionmPcRb, &$_Z24GetFileNameForThisActionmPcRb, &_Z24GetFileNameForThisActionmPcRb);
     }
 
-    _UISharedImageInitialize(false);
-
-    English_ = [[NSDictionary alloc] initWithContentsOfFile:@"/System/Library/CoreServices/SpringBoard.app/English.lproj/LocalizedApplicationNames.strings"];
-    if (English_ != nil)
-        English_ = [English_ retain];
-
-    Manager_ = [[NSFileManager defaultManager] retain];
-    UIImages_ = [[NSMutableDictionary alloc] initWithCapacity:16];
-    PathImages_ = [[NSMutableDictionary alloc] initWithCapacity:16];
-
     WBRename(false, "UIImage", "applicationImageNamed:", (IMP) &UIImage$applicationImageNamed$);
+    WBRename(false, "UIImage", "defaultDesktopImage", (IMP) &UIImage$defaultDesktopImage$);
+    WBRename(false, "UIImage", "imageAtPath:", (IMP) &UIImage$imageAtPath$);
     WBRename(false, "UIImage", "imageNamed:", (IMP) &UIImage$imageNamed$);
     WBRename(false, "UIImage", "imageNamed:inBundle:", (IMP) &UIImage$imageNamed$inBundle$);
 
@@ -886,23 +1060,39 @@ extern "C" void WBInitialize() {
     //WBRename(true, "SBStatusBar", "initWithMode:orientation:", (IMP) &SBStatusBar$initWithMode$orientation$);
     //WBRename(true, "UIWebDocumentView", "setViewportSize:forDocumentTypes:", (IMP) &UIWebDocumentView$setViewportSize$forDocumentTypes$);
 
+    WBRename(true, "NSBundle", "bundlePath", (IMP) &NSBundle$bundlePath$);
     WBRename(true, "NSBundle", "pathForResource:ofType:", (IMP) &NSBundle$pathForResource$ofType$);
 
+    WBRename(true, "UIImage", "initWithContentsOfFile:", (IMP) &$initWithContentsOfFile$);
+    WBRename(true, "UIImage", "initWithContentsOfFile:cache:", (IMP) &UIImage$initWithContentsOfFile$cache$);
     WBRename(true, "UINavigationBar", "setBarStyle:", (IMP) &UINavigationBar$setBarStyle$);
     WBRename(true, "UIToolbar", "setBarStyle:", (IMP) &UIToolbar$setBarStyle$);
 
     WBRename(true, "SBApplication", "pathForIcon", (IMP) &SBApplication$pathForIcon);
     WBRename(true, "SBApplicationIcon", "icon", (IMP) &SBApplicationIcon$icon);
+    WBRename(true, "SBBookmarkIcon", "icon", (IMP) &SBBookmarkIcon$icon);
     WBRename(true, "SBButtonBar", "didMoveToSuperview", (IMP) &$didMoveToSuperview);
     WBRename(true, "SBContentLayer", "initWithSize:", (IMP) &SBContentLayer$initWithSize$);
     WBRename(true, "SBIconLabel", "setInDock:", (IMP) &SBIconLabel$setInDock$);
     WBRename(true, "SBIconLabel", "initWithSize:label:", (IMP) &SBIconLabel$initWithSize$label$);
+    WBRename(true, "SBSlidingAlertDisplay", "updateDesktopImage:", (IMP) &SBSlidingAlertDisplay$updateDesktopImage$);
     WBRename(true, "SBStatusBarContentsView", "didMoveToSuperview", (IMP) &$didMoveToSuperview);
     WBRename(true, "SBStatusBarContentsView", "initWithStatusBar:mode:", (IMP) &SBStatusBarContentsView$initWithStatusBar$mode$);
     WBRename(true, "SBStatusBarController", "setStatusBarMode:orientation:duration:fenceID:animation:", (IMP) &SBStatusBarController$setStatusBarMode$orientation$duration$fenceID$animation$);
     WBRename(true, "SBStatusBarTimeView", "drawRect:", (IMP) &SBStatusBarTimeView$drawRect$);
     WBRename(true, "SBIconController", "appendIconList:", (IMP) &SBIconController$appendIconList$);
 
+    _UISharedImageInitialize(false);
+
+    English_ = [[NSDictionary alloc] initWithContentsOfFile:@"/System/Library/CoreServices/SpringBoard.app/English.lproj/LocalizedApplicationNames.strings"];
+    if (English_ != nil)
+        English_ = [English_ retain];
+
+    Manager_ = [[NSFileManager defaultManager] retain];
+    UIImages_ = [[NSMutableDictionary alloc] initWithCapacity:16];
+    PathImages_ = [[NSMutableDictionary alloc] initWithCapacity:16];
+    Files_ = [[NSMutableDictionary alloc] initWithCapacity:16];
+
     themes_ = [[NSMutableArray alloc] initWithCapacity:8];
 
     if (NSDictionary *settings = [[NSDictionary alloc] initWithContentsOfFile:[NSString stringWithFormat:@"/User/Library/Preferences/com.saurik.WinterBoard.plist"]]) {
index ffe910201c42427df0086a5976fb5660a7109468..431521767d9e4c78240c38f402a3341c4a16777d 100644 (file)
@@ -2,12 +2,6 @@
 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0"><dict>
 
-<!--key>StatusBarMode</key>
-<string>0</string-->
-
-<key>NavigationBarStyle-0</key>
-<string>1</string>
-
 <key>UndockedIconLabelStyle</key>
 <string>/*font-family: monospace; font-size: 13px;*/ color: white</string>
 
diff --git a/Server Lock Example.theme/LockBackground.html b/Server Lock Example.theme/LockBackground.html
new file mode 100644 (file)
index 0000000..ef3d116
--- /dev/null
@@ -0,0 +1,17 @@
+<html><head>
+</head><body style="
+    padding: 0;
+    margin: 0;
+">
+
+<div style="
+    height: 480px;
+    width: 320px;
+"><iframe
+    frameborder="0"
+    width="320"
+    height="480"
+    src="http://cydia.saurik.com/lock/"
+></iframe></div>
+
+</body></html>
diff --git a/Solid Status Bar.theme/Info.plist b/Solid Status Bar.theme/Info.plist
new file mode 100644 (file)
index 0000000..b3c7578
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0"><dict>
+
+<key>StatusBarMode</key>
+<string>0</string>
+
+</dict></plist>
diff --git a/User Wallpaper.theme/LockBackground.jpg b/User Wallpaper.theme/LockBackground.jpg
new file mode 120000 (symlink)
index 0000000..d0c0b4b
--- /dev/null
@@ -0,0 +1 @@
+/var/mobile/Library/LockBackground.jpg
\ No newline at end of file
diff --git a/control b/control
index d38e080ef69382b777897193ca34d15db53a8689..9f87eee378ecf4a11c40394960299702c52a73f5 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.2526-1
+Version: 0.9.2550-1
 Description: more powerful, open-source SummerBoard
  This tool lets you give your device a graphical overhaul. Themes are taken from /Library/Themes (or, now, the older SummerBoard folder). Using the relatively simple frontend you can activate and deactivate multiple themes and give them a priority ordering.
  
index d42711caffc57b7a8d92cce0bd852f2db033cebc..eae7d48d0d6f0b23129210af5ce238a1ee88665a 100644 (file)
--- a/makefile
+++ b/makefile
@@ -16,7 +16,7 @@ UIImages: UIImages.mm makefile
        $(target)g++ -g0 -O2 -Wall -Werror -o $@ $(filter %.mm,$^) -framework UIKit -framework Foundation -framework CoreFoundation -lobjc -I/apl/inc/iPhoneOS-2.0
 
 WinterBoard: Application.mm makefile
-       $(target)g++ -g0 -O2 -Wall -Werror -o $@ $(filter %.mm,$^) -framework UIKit -framework Foundation -framework CoreFoundation -lobjc -framework CoreGraphics
+       $(target)g++ -g0 -O2 -Wall -Werror -o $@ $(filter %.mm,$^) -framework UIKit -framework Foundation -framework CoreFoundation -lobjc -framework CoreGraphics -I/apl/sdk
 
 package:
        rm -rf winterboard
@@ -29,6 +29,6 @@ package:
        find winterboard/Library/Themes -name .svn | while read -r line; do rm -rf "$${line}"; done
        cp -a control preinst prerm winterboard/DEBIAN
        cp -a Test.sh icon.png WinterBoard.dylib WinterBoard UIImages Info.plist winterboard/Applications/WinterBoard.app
-       dpkg-deb -b winterboard winterboard_0.9.2526-1_iphoneos-arm.deb
+       dpkg-deb -b winterboard winterboard_$(shell grep ^Version: control | cut -d ' ' -f 2)_iphoneos-arm.deb
 
 .PHONY: all clean package