@end
/* }}} */
-@interface WBSettingsController: PSListController {
+@interface WBAdvancedController: PSListController {
}
-- (id) initForContentSize:(CGSize)size;
-- (void) dealloc;
-- (void) suspend;
-- (void) navigationBarButtonClicked:(int)buttonIndex;
-- (void) viewWillRedisplay;
-- (void) pushController:(id)controller;
- (id) specifiers;
- (void) settingsChanged;
-- (NSString *) title;
-- (void) setPreferenceValue:(id)value specifier:(PSSpecifier *)spec;
-- (id) readPreferenceValue:(PSSpecifier *)spec;
@end
-@implementation WBSettingsController
+@implementation WBAdvancedController
-+ (void) load {
- void *libhide(dlopen("/usr/lib/hide.dylib", RTLD_LAZY));
- IsIconHiddenDisplayId = reinterpret_cast<BOOL (*)(NSString *)>(dlsym(libhide, "IsIconHiddenDisplayId"));
- HideIconViaDisplayId = reinterpret_cast<BOOL (*)(NSString *)>(dlsym(libhide, "HideIconViaDisplayId"));
- UnHideIconViaDisplayId = reinterpret_cast<BOOL (*)(NSString *)>(dlsym(libhide, "UnHideIconViaDisplayId"));
+- (id) specifiers {
+ if (!_specifiers)
+ _specifiers = [[self loadSpecifiersFromPlistName:@"Advanced" target:self] retain];
+ return _specifiers;
}
-- (id) initForContentSize:(CGSize)size {
- if ((self = [super initForContentSize:size]) != nil) {
- _plist = [[NSString stringWithFormat:@"%@/Library/Preferences/com.saurik.WinterBoard.plist", NSHomeDirectory()] retain];
- _settings = [([NSMutableDictionary dictionaryWithContentsOfFile:_plist] ?: [NSMutableDictionary dictionary]) retain];
+- (void) settingsChanged {
+ settingsChanged = YES;
+}
- [_settings setObject:[NSNumber numberWithBool:IsIconHiddenDisplayId(WinterBoardDisplayID)] forKey:@"IconHidden"];
- } return self;
+- (void) setPreferenceValue:(id)value specifier:(PSSpecifier *)spec {
+ NSString *key([spec propertyForKey:@"key"]);
+ if ([[spec propertyForKey:@"negate"] boolValue])
+ value = [NSNumber numberWithBool:(![value boolValue])];
+ [_settings setValue:value forKey:key];
+ [self settingsChanged];
}
-- (void) dealloc {
- [_settings release];
- [_plist release];
- [super dealloc];
+- (id) readPreferenceValue:(PSSpecifier *)spec {
+ NSString *key([spec propertyForKey:@"key"]);
+ id defaultValue([spec propertyForKey:@"default"]);
+ id plistValue([_settings objectForKey:key]);
+ if (!plistValue)
+ return defaultValue;
+ if ([[spec propertyForKey:@"negate"] boolValue])
+ plistValue = [NSNumber numberWithBool:(![plistValue boolValue])];
+ return plistValue;
}
- (void) __optimizeThemes {
}
+@end
+
+@interface WBSettingsController: PSListController {
+}
+
+- (id) initForContentSize:(CGSize)size;
+- (void) dealloc;
+- (void) suspend;
+- (void) navigationBarButtonClicked:(int)buttonIndex;
+- (void) viewWillRedisplay;
+- (void) pushController:(id)controller;
+- (id) specifiers;
+- (void) settingsChanged;
+- (NSString *) title;
+- (void) setPreferenceValue:(id)value specifier:(PSSpecifier *)spec;
+- (id) readPreferenceValue:(PSSpecifier *)spec;
+
+@end
+
+@implementation WBSettingsController
+
++ (void) load {
+ void *libhide(dlopen("/usr/lib/hide.dylib", RTLD_LAZY));
+ IsIconHiddenDisplayId = reinterpret_cast<BOOL (*)(NSString *)>(dlsym(libhide, "IsIconHiddenDisplayId"));
+ HideIconViaDisplayId = reinterpret_cast<BOOL (*)(NSString *)>(dlsym(libhide, "HideIconViaDisplayId"));
+ UnHideIconViaDisplayId = reinterpret_cast<BOOL (*)(NSString *)>(dlsym(libhide, "UnHideIconViaDisplayId"));
+}
+
+- (id) initForContentSize:(CGSize)size {
+ if ((self = [super initForContentSize:size]) != nil) {
+ _plist = [[NSString stringWithFormat:@"%@/Library/Preferences/com.saurik.WinterBoard.plist", NSHomeDirectory()] retain];
+ _settings = [([NSMutableDictionary dictionaryWithContentsOfFile:_plist] ?: [NSMutableDictionary dictionary]) retain];
+
+ [_settings setObject:[NSNumber numberWithBool:IsIconHiddenDisplayId(WinterBoardDisplayID)] forKey:@"IconHidden"];
+ } return self;
+}
+
+- (void) dealloc {
+ [_settings release];
+ [_plist release];
+ [super dealloc];
+}
+
- (void) suspend {
if (!settingsChanged)
return;
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>items</key>
+ <array>
+ <dict>
+ <key>cell</key>
+ <string>PSGroupCell</string>
+ <key>footerText</key>
+ <string>iPhone-optimize PNGs (for speed).</string>
+ </dict>
+ <dict>
+ <key>action</key>
+ <string>optimizeThemes</string>
+ <key>cell</key>
+ <string>PSButtonCell</string>
+ <key>label</key>
+ <string>Optimize Themes (v1.0)</string>
+ </dict>
+ <dict>
+ <key>cell</key>
+ <string>PSGroupCell</string>
+ <key>isStaticText</key>
+ <string>true</string>
+ <key>requiredCapabilities</key>
+ <array>
+ <dict>
+ <key>wildcat</key>
+ <false/>
+ <key>voip</key>
+ <false/>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>cell</key>
+ <string>PSTitleValueCell</string>
+ <key>label</key>
+ <string>iPhone-optimize PNGs (for speed).</string>
+ <key>requiredCapabilities</key>
+ <array>
+ <dict>
+ <key>wildcat</key>
+ <false/>
+ <key>voip</key>
+ <false/>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>cell</key>
+ <string>PSGroupCell</string>
+ <key>footerText</key>
+ <string>Dumps lots of information (including all filenames being themed) to syslog.</string>
+ </dict>
+ <dict>
+ <key>cell</key>
+ <string>PSSwitchCell</string>
+ <key>default</key>
+ <false/>
+ <key>key</key>
+ <string>Debug</string>
+ <key>label</key>
+ <string>Debug Logging</string>
+ </dict>
+ <dict>
+ <key>cell</key>
+ <string>PSGroupCell</string>
+ <key>isStaticText</key>
+ <string>true</string>
+ <key>requiredCapabilities</key>
+ <array>
+ <dict>
+ <key>wildcat</key>
+ <false/>
+ <key>voip</key>
+ <false/>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>cell</key>
+ <string>PSTitleValueCell</string>
+ <key>label</key>
+ <string>Dumps lots of information (including all filenames being themed) to syslog.</string>
+ <key>requiredCapabilities</key>
+ <array>
+ <dict>
+ <key>wildcat</key>
+ <false/>
+ <key>voip</key>
+ <false/>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>cell</key>
+ <string>PSGroupCell</string>
+ <key>footerText</key>
+ <string>All UIImages that are not themed will be saved as PNGs into /tmp/UIImages.</string>
+ </dict>
+ <dict>
+ <key>cell</key>
+ <string>PSSwitchCell</string>
+ <key>default</key>
+ <false/>
+ <key>key</key>
+ <string>RecordUI</string>
+ <key>label</key>
+ <string>Record UIImages</string>
+ </dict>
+ <dict>
+ <key>cell</key>
+ <string>PSGroupCell</string>
+ <key>isStaticText</key>
+ <string>true</string>
+ <key>requiredCapabilities</key>
+ <array>
+ <dict>
+ <key>wildcat</key>
+ <false/>
+ <key>voip</key>
+ <false/>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>cell</key>
+ <string>PSTitleValueCell</string>
+ <key>label</key>
+ <string>All UIImages that are not themed will be saved as PNGs into /tmp/UIImages.</string>
+ <key>requiredCapabilities</key>
+ <array>
+ <dict>
+ <key>wildcat</key>
+ <false/>
+ <key>voip</key>
+ <false/>
+ </dict>
+ </array>
+ </dict>
+ </array>
+ <key>title</key>
+ <string>Advanced</string>
+</dict>
+</plist>
<key>cell</key>
<string>PSGroupCell</string>
<key>footerText</key>
- <string>iPhone-optimize PNGs (for speed).</string>
- </dict>
- <dict>
- <key>action</key>
- <string>optimizeThemes</string>
- <key>cell</key>
- <string>PSButtonCell</string>
- <key>label</key>
- <string>Optimize Themes (v1.0)</string>
- </dict>
- <dict>
- <key>cell</key>
- <string>PSGroupCell</string>
- <key>isStaticText</key>
- <string>true</string>
- <key>requiredCapabilities</key>
- <array>
- <dict>
- <key>wildcat</key>
- <false/>
- <key>voip</key>
- <false/>
- </dict>
- </array>
- </dict>
- <dict>
- <key>cell</key>
- <string>PSTitleValueCell</string>
- <key>label</key>
- <string>iPhone-optimize PNGs (for speed).</string>
- <key>requiredCapabilities</key>
- <array>
- <dict>
- <key>wildcat</key>
- <false/>
- <key>voip</key>
- <false/>
- </dict>
- </array>
- </dict>
- <dict>
- <key>cell</key>
- <string>PSGroupCell</string>
- <key>footerText</key>
- <string>Dumps lots of information (including all filenames being themed) to syslog.</string>
- </dict>
- <dict>
- <key>cell</key>
- <string>PSSwitchCell</string>
- <key>default</key>
- <false/>
- <key>key</key>
- <string>Debug</string>
- <key>label</key>
- <string>Debug Logging</string>
- </dict>
- <dict>
- <key>cell</key>
- <string>PSGroupCell</string>
- <key>isStaticText</key>
- <string>true</string>
- <key>requiredCapabilities</key>
- <array>
- <dict>
- <key>wildcat</key>
- <false/>
- <key>voip</key>
- <false/>
- </dict>
- </array>
- </dict>
- <dict>
- <key>cell</key>
- <string>PSTitleValueCell</string>
- <key>label</key>
- <string>Dumps lots of information (including all filenames being themed) to syslog.</string>
- <key>requiredCapabilities</key>
- <array>
- <dict>
- <key>wildcat</key>
- <false/>
- <key>voip</key>
- <false/>
- </dict>
- </array>
- </dict>
- <dict>
- <key>cell</key>
- <string>PSGroupCell</string>
- <key>footerText</key>
- <string>All UIImages that are not themed will be saved as PNGs into /tmp/UIImages.</string>
+ <string>WinterBoard can also be found under the normal iOS Settings application.</string>
</dict>
<dict>
<key>cell</key>
<key>default</key>
<false/>
<key>key</key>
- <string>RecordUI</string>
+ <string>IconHidden</string>
<key>label</key>
- <string>Record UIImages</string>
+ <string>Hide WinterBoard</string>
</dict>
<dict>
<key>cell</key>
<key>cell</key>
<string>PSTitleValueCell</string>
<key>label</key>
- <string>All UIImages that are not themed will be saved as PNGs into /tmp/UIImages.</string>
+ <string>WinterBoard can also be found under the normal iOS Settings application.</string>
<key>requiredCapabilities</key>
<array>
<dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
- <key>footerText</key>
- <string>WinterBoard can also be found under the normal iOS Settings application.</string>
- </dict>
- <dict>
- <key>cell</key>
- <string>PSSwitchCell</string>
- <key>default</key>
- <false/>
- <key>key</key>
- <string>IconHidden</string>
- <key>label</key>
- <string>Hide WinterBoard</string>
- </dict>
- <dict>
- <key>cell</key>
- <string>PSGroupCell</string>
- <key>isStaticText</key>
- <string>true</string>
- <key>requiredCapabilities</key>
- <array>
- <dict>
- <key>wildcat</key>
- <false/>
- <key>voip</key>
- <false/>
- </dict>
- </array>
</dict>
<dict>
<key>cell</key>
- <string>PSTitleValueCell</string>
+ <string>PSLinkCell</string>
<key>label</key>
- <string>WinterBoard can also be found under the normal iOS Settings application.</string>
- <key>requiredCapabilities</key>
- <array>
- <dict>
- <key>wildcat</key>
- <false/>
- <key>voip</key>
- <false/>
- </dict>
- </array>
+ <string>Advanced (For Themers)</string>
+ <key>detail</key>
+ <string>WBAdvancedController</string>
</dict>
</array>
<key>title</key>