]> git.saurik.com Git - winterboard.git/commitdiff
Hide the non-functional Hide WinterBoard option.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 12 Jan 2014 12:10:40 +0000 (04:10 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 12 Jan 2014 12:10:40 +0000 (04:10 -0800)
Settings.mm
WinterBoardSettings.bundle/WinterBoard.plist

index 160073d22d2fc1d377698803589739254c5b9795..619df9bae7cb45a9ef17842c8534f185d9415b22 100644 (file)
@@ -572,8 +572,28 @@ void AddThemes(NSMutableArray *themesOnDisk, NSString *folder) {
 }
 
 - (id) specifiers {
-    if (!_specifiers)
-        _specifiers = [[self loadSpecifiersFromPlistName:@"WinterBoard" target:self] retain];
+    if (!_specifiers) {
+        NSMutableArray *specifiers([NSMutableArray array]);
+        for (PSSpecifier *specifier in [self loadSpecifiersFromPlistName:@"WinterBoard" target:self]) {
+            if (NSArray *version = [specifier propertyForKey:@"wb$filter"]) {
+                size_t count([version count]);
+                if (count == 0 || count > 2)
+                    continue;
+
+                double lower([[version objectAtIndex:0] doubleValue]);
+                if (kCFCoreFoundationVersionNumber < lower)
+                    continue;
+
+                if (count != 1) {
+                    double upper([[version objectAtIndex:1] doubleValue]);
+                    if (upper <= kCFCoreFoundationVersionNumber)
+                        continue;
+                }
+            }
+            [specifiers addObject:specifier];
+        }
+        _specifiers = [specifiers retain];
+    }
     return _specifiers;
 }
 
index ea409b0894de1287a52dbb83d030ebad12f4807b..33f85d718e4f1f0c017c2d488ae9be3946d0eaed 100644 (file)
                        <string>PSGroupCell</string>
                        <key>footerText</key>
                        <string>WinterBoard can also be found under the normal iOS Settings application.</string>
+                       <key>wb$filter</key>
+                       <array>
+                               <real>0.0</real>
+                               <real>800</real>
+                       </array>
+               </dict>
+               <dict>
+                       <key>cell</key>
+                       <string>PSGroupCell</string>
+                       <key>footerText</key>
+                       <string>Hiding WinterBoard is not yet possible on iOS 7. This will require libhide to be updated.</string>
+                       <key>wb$filter</key>
+                       <array>
+                               <real>800</real>
+                       </array>
+               </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>
+                       <key>wb$filter</key>
+                       <array>
+                               <real>0.0</real>
+                               <real>800</real>
+                       </array>
                </dict>
                <dict>
                        <key>cell</key>
                        <string>PSSwitchCell</string>
                        <key>default</key>
                        <false/>
+                       <key>enabled</key>
+                       <false/>
                        <key>key</key>
                        <string>IconHidden</string>
                        <key>label</key>
                        <string>Hide WinterBoard</string>
+                       <key>wb$filter</key>
+                       <array>
+                               <real>800</real>
+                       </array>
                </dict>
                <dict>
                        <key>cell</key>