]> git.saurik.com Git - winterboard.git/commitdiff
Add a confirmation step to the optimization process, and obsolete transparentdock3xtheme.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 3 Apr 2010 02:54:37 +0000 (02:54 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 3 Apr 2010 02:54:37 +0000 (02:54 +0000)
Settings.mm
Transparent Dock.theme/Bundles/com.apple.springboard/SBDockBG2.png [new file with mode: 0644]
WinterBoardSettings.bundle/WinterBoard.plist
control

index 956d7e5acd7ad470e63bd234c0a6a9434d18c7bc..fade5c1e4d7d7be4097aa095e44f1234e14a680d 100644 (file)
@@ -1,5 +1,5 @@
 /* WinterBoard - Theme Manager for the iPhone
- * Copyright (C) 2009  Jay Freeman (saurik)
+ * Copyright (C) 2009-2010  Jay Freeman (saurik)
 */
 
 /*
@@ -364,11 +364,26 @@ static NSString *_plist;
     [super dealloc];
 }
 
-- (void) _optimizeThemes {
+- (void) __optimizeThemes {
     system("/usr/libexec/winterboard/Optimize");
 }
 
 - (void) optimizeThemes {
+    UIActionSheet *sheet([[[UIActionSheet alloc]
+        initWithTitle:@"Optimize Themes"
+        buttons:[NSArray arrayWithObjects:@"Optimize", @"Cancel", nil]
+        defaultButtonIndex:1
+        delegate:self
+        context:@"optimize"
+    ] autorelease]);
+
+    [sheet setBodyText:@"Please note that this setting /replaces/ the PNG files that came with the theme. PNG files that have been iPhone-optimized cannot be viewed on a normal computer unless they are first deoptimized. You can use Cydia to reinstall themes that have been optimized in order to revert to the original PNG files."];
+    [sheet setNumberOfRows:1];
+    [sheet setDestructiveButtonIndex:0];
+    [sheet popupAlertAnimated:YES];
+}
+
+- (void) _optimizeThemes {
     UIView *view([self view]);
     UIWindow *window([view window]);
 
@@ -379,7 +394,7 @@ static NSString *_plist;
 
     [window addSubview:hud];
     [hud show:YES];
-    [self wb$yieldToSelector:@selector(_optimizeThemes)];
+    [self wb$yieldToSelector:@selector(__optimizeThemes)];
     [hud removeFromSuperview];
 
     [window setUserInteractionEnabled:YES];
@@ -387,6 +402,22 @@ static NSString *_plist;
     [self settingsChanged];
 }
 
+- (void) alertSheet:(UIActionSheet *)sheet buttonClicked:(int)button {
+    NSString *context([sheet context]);
+
+    if ([context isEqualToString:@"optimize"]) {
+        switch (button) {
+            case 1:
+                [self performSelector:@selector(_optimizeThemes) withObject:nil afterDelay:0];
+            break;
+        }
+
+        [sheet dismiss];
+    } else
+        [super alertSheet:sheet buttonClicked:button];
+
+}
+
 - (void) suspend {
     if (!settingsChanged)
         return;
diff --git a/Transparent Dock.theme/Bundles/com.apple.springboard/SBDockBG2.png b/Transparent Dock.theme/Bundles/com.apple.springboard/SBDockBG2.png
new file mode 100644 (file)
index 0000000..6afc979
Binary files /dev/null and b/Transparent Dock.theme/Bundles/com.apple.springboard/SBDockBG2.png differ
index 68d409e70e8eb7278ef7d04a0f372e32130a4e65..5ab206f61adcdb472e4bda1f9d71c06adee45b2d 100644 (file)
@@ -46,7 +46,7 @@
        isStaticText = true;
     }, {
         cell = PSTitleValueCell;
-        label = "iPhone-optimize PNGs (for speed).\nPlease note that this setting /replaces/ the PNG files that came with the theme. PNG files that have been iPhone-optimized cannot be viewed on a normal computer unless they are first deoptimized. You can use Cydia to reinstall themes that have been optimized in order to revert to the originals.";
+        label = "iPhone-optimize PNGs (for speed).";
     });
 
     title = WinterBoard;
diff --git a/control b/control
index e001725c704576673d3f4a46f4784529bd539d76..3d904d01153f58da05a36b019426e11f0f68476c 100644 (file)
--- a/control
+++ b/control
@@ -3,13 +3,13 @@ Priority: optional
 Section: System
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
-Version: 0.9.3156-1
+Version: 0.9.3157-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
 Provides: theme-manager
-Conflicts: com.modmyifone.winterboardicon, winterboardsettings, themesettings
-Replaces: com.modmyifone.winterboardicon, winterboardsettings, themesettings
+Conflicts: com.modmyifone.winterboardicon, winterboardsettings, themesettings, com.iphonerepocenter.transparentdockfor3xtheme
+Replaces: com.modmyifone.winterboardicon, winterboardsettings, themesettings, com.iphonerepocenter.transparentdockfor3xtheme
 Author: Jay Freeman (saurik) <saurik@saurik.com>
 Depiction: http://cydia.saurik.com/info/winterboard/
 Homepage: http://www.saurik.com/id/9