]> git.saurik.com Git - winterboard.git/commitdiff
Change the default SummerBoard setting to NO.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 11 Mar 2012 20:49:08 +0000 (20:49 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 11 Mar 2012 20:49:08 +0000 (20:49 +0000)
Library.mm
Settings.mm
WinterBoardSettings.bundle/WinterBoard.plist

index c0b72841a176daa1f0d7fff7696d6d98f773db4d..814de11c865a5b671c02fbb82b7288b56b3ece73 100644 (file)
@@ -200,7 +200,7 @@ static BOOL (*_GSFontGetUseLegacyFontMetrics)();
 static bool Debug_ = false;
 static bool UIDebug_ = false;
 static bool Engineer_ = false;
-static bool SummerBoard_ = true;
+static bool SummerBoard_ = false;
 static bool SpringBoard_;
 
 static UIImage *(*_UIApplicationImageWithName)(NSString *name);
@@ -1972,6 +1972,9 @@ MSInitialize {
     if (NSDictionary *settings = [NSDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:@"/User/Library/Preferences/com.saurik.WinterBoard.plist"]]) {
         if (NSNumber *value = [settings objectForKey:@"SummerBoard"])
             SummerBoard_ = [value boolValue];
+        else
+            SummerBoard_ = true;
+
         if (NSNumber *value = [settings objectForKey:@"Debug"])
             Debug_ = [value boolValue];
         if (NSNumber *value = [settings objectForKey:@"RecordUI"])
index 442e97cbc2464c4401839155a88958a3b09b622c..3a506d71478a4df3275a16d946757efa87a1acc1 100644 (file)
@@ -448,7 +448,20 @@ static NSString *_plist;
 - (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 = [NSMutableDictionary dictionaryWithContentsOfFile:_plist];
+
+        bool set;
+        if (_settings != nil)
+            set = true;
+        else {
+            set = false;
+            _settings = [NSMutableDictionary dictionary];
+        }
+
+        _settings = [_settings retain];
+
+        if (set && [_settings objectForKey:@"SummerBoard"] == nil)
+            [_settings setObject:[NSNumber numberWithBool:YES] forKey:@"SummerBoard"];
 
         [_settings setObject:[NSNumber numberWithBool:IsIconHiddenDisplayId(WinterBoardDisplayID)] forKey:@"IconHidden"];
     } return self;
index ae12724f5452da820df50fe43ee1ea4da9a926ac..6dad33a6d996645c60b5ad65932f03d205cfa2c7 100644 (file)
@@ -60,7 +60,7 @@
                        <key>cell</key>
                        <string>PSSwitchCell</string>
                        <key>default</key>
-                       <true/>
+                       <false/>
                        <key>key</key>
                        <string>SummerBoard</string>
                        <key>label</key>