From 6e9f4e0265b29345db2bc13f86bc55c0bc9de0d7 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 12 Jan 2014 04:10:40 -0800 Subject: [PATCH] Hide the non-functional Hide WinterBoard option. --- Settings.mm | 24 +++++++++++-- WinterBoardSettings.bundle/WinterBoard.plist | 36 ++++++++++++++++++++ 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/Settings.mm b/Settings.mm index 160073d..619df9b 100644 --- a/Settings.mm +++ b/Settings.mm @@ -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; } diff --git a/WinterBoardSettings.bundle/WinterBoard.plist b/WinterBoardSettings.bundle/WinterBoard.plist index ea409b0..33f85d7 100644 --- a/WinterBoardSettings.bundle/WinterBoard.plist +++ b/WinterBoardSettings.bundle/WinterBoard.plist @@ -101,16 +101,52 @@ PSGroupCell footerText WinterBoard can also be found under the normal iOS Settings application. + wb$filter + + 0.0 + 800 + + + + cell + PSGroupCell + footerText + Hiding WinterBoard is not yet possible on iOS 7. This will require libhide to be updated. + wb$filter + + 800 + + + + cell + PSSwitchCell + default + + key + IconHidden + label + Hide WinterBoard + wb$filter + + 0.0 + 800 + cell PSSwitchCell default + enabled + key IconHidden label Hide WinterBoard + wb$filter + + 800 + cell -- 2.45.2