From 43fd3a0b09fc408656c2cacf836850d68f1a0cfe Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 3 Apr 2010 02:54:37 +0000 Subject: [PATCH] Add a confirmation step to the optimization process, and obsolete transparentdock3xtheme. --- Settings.mm | 37 ++++++++++++++++-- .../com.apple.springboard/SBDockBG2.png | Bin 0 -> 529 bytes WinterBoardSettings.bundle/WinterBoard.plist | 2 +- control | 6 +-- 4 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 Transparent Dock.theme/Bundles/com.apple.springboard/SBDockBG2.png diff --git a/Settings.mm b/Settings.mm index 956d7e5..fade5c1 100644 --- a/Settings.mm +++ b/Settings.mm @@ -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 index 0000000000000000000000000000000000000000..6afc97958c02b2b29455bbe8a6fcb94f66eaaca7 GIT binary patch literal 529 zcmeAS@N?(olHy`uVBq!ia0y~yU~~YoqdC}sB-6JTHz37W9OUlAu%r? zxBAvxyymrY{rf5ZmW91uyOu$ugsmlN<$eZ{vh4S7UVW}-T$FoWykWQM7gpE(I~i~C zl^SZC7s{)T?U?c{-k*WXMthg3pM?1DjICB@|F&{}4t~ICYp<_k`rwwRlippfJ6?aB z7$c7N+V0)|cT+~1)-;i#c-B~ZHMhwZtC$OH_|`5~{gv`;bmtE--DM(_|WU z%OA>L-`Swc`e4En-ye+8yIABVznQ#e*BsWolUpwCI{jSj^&Law^;Z=cvbpw&A7sC? z;_+{T-wrk`QKgR8_vd@;ySeFVdQ&MBb@ E00!s31^@s6 literal 0 HcmV?d00001 diff --git a/WinterBoardSettings.bundle/WinterBoard.plist b/WinterBoardSettings.bundle/WinterBoard.plist index 68d409e..5ab206f 100644 --- a/WinterBoardSettings.bundle/WinterBoard.plist +++ b/WinterBoardSettings.bundle/WinterBoard.plist @@ -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 e001725..3d904d0 100644 --- a/control +++ b/control @@ -3,13 +3,13 @@ Priority: optional Section: System Maintainer: Jay Freeman (saurik) 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) Depiction: http://cydia.saurik.com/info/winterboard/ Homepage: http://www.saurik.com/id/9 -- 2.45.2