+ plist_ = [[NSString stringWithFormat:@"%@/Library/Preferences/com.saurik.WinterBoard.plist",
+ NSHomeDirectory()
+ ] retain];
+
+ settings_ = [[NSMutableDictionary alloc] initWithContentsOfFile:plist_];
+
+ themesArray_ = [settings_ objectForKey:@"Themes"];
+ if (themesArray_ == nil) {
+ if (NSString *theme = [settings_ objectForKey:@"Theme"]) {
+ themesArray_ = [[NSArray arrayWithObject:[[NSDictionary dictionaryWithObjectsAndKeys:
+ theme, @"Name",
+ [NSNumber numberWithBool:YES], @"Active",
+ nil] mutableCopy]] mutableCopy];
+
+ [settings_ removeObjectForKey:@"Theme"];
+ }
+
+ if (themesArray_ == nil)
+ themesArray_ = [NSMutableArray arrayWithCapacity:16];
+ [settings_ setObject:themesArray_ forKey:@"Themes"];
+ }
+
+ themesArray_ = [themesArray_ retain];
+
+ NSMutableSet *themesSet = [NSMutableSet setWithCapacity:32];
+ for (NSMutableDictionary *theme in themesArray_)
+ if (NSString *name = [theme objectForKey:@"Name"])
+ [themesSet addObject:name];
+