Permalink
Browse files

Add AppList settings pane

  • Loading branch information...
1 parent 50dd998 commit 4829460ddbaf4ddb5eebde8ff272daeac3f36907 @rpetrich committed Jun 23, 2012
View
BIN Icon-small.psd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN Icon-small@2x.psd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
21 Tweak.x
@@ -80,13 +80,20 @@
%ctor
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- %init;
NSString *bundleIdentifier = [NSBundle mainBundle].bundleIdentifier;
- if ([bundleIdentifier isEqualToString:@"com.atebits.Tweetie2"])
- %init(Twitter);
- else if ([bundleIdentifier isEqualToString:@"com.tapbots.Tweetbot"])
- %init(Tweetbot);
- else if ([bundleIdentifier isEqualToString:@"com.linkedin.LinkedIn"])
- %init(LinkedIn);
+ if (bundleIdentifier) {
+ NSString *key = [@"DBEnabled-" stringByAppendingString:bundleIdentifier];
+ NSDictionary *settings = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.rpetrich.dietbar.plist"];
+ id temp = [settings objectForKey:key];
+ if (!temp || [temp boolValue]) {
+ %init;
+ if ([bundleIdentifier isEqualToString:@"com.atebits.Tweetie2"])
+ %init(Twitter);
+ else if ([bundleIdentifier isEqualToString:@"com.tapbots.Tweetbot"])
+ %init(Tweetbot);
+ else if ([bundleIdentifier isEqualToString:@"com.linkedin.LinkedIn"])
+ %init(LinkedIn);
+ }
+ }
[pool drain];
}
View
2 control → layout/DEBIAN/control
@@ -5,7 +5,7 @@ Architecture: iphoneos-arm
Version: 1.0
Description: Puts navigation bars on a diet!
Name: DietBar
-Depends: firmware (>= 3.0), mobilesubstrate
+Depends: firmware (>= 3.0), mobilesubstrate, preferenceloader, applist (>= 1.4.3)
Author: Ryan Petrich <rpetrich+dietbar@gmail.com>
Maintainer: BigBoss <bigboss@thebigboss.org>
Homepage: http://moreinfo.thebigboss.org/moreinfo/depiction.php?file=dietbarData
View
32 layout/Library/PreferenceLoader/Preferences/DietBar.plist
@@ -0,0 +1,32 @@
+entry = {
+ bundle = AppList;
+ cell = PSLinkCell;
+ icon = "/Library/PreferenceLoader/Preferences/DietBar.png";
+ isController = 1;
+ label = DietBar;
+ ALSettingsPath = "/var/mobile/Library/Preferences/com.rpetrich.dietbar.plist";
+ ALSettingsKeyPrefix = "DBEnabled-";
+ ALChangeNotification = "com.rpetrich.dietbar.settingschanged";
+ ALSettingsDefaultValue = 1;
+ ALSectionDescriptors = (
+ {
+ items = ();
+ "footer-title" = "Kill app from multitasking switcher and relaunch for settings to take effect.";
+ },
+ {
+ title = "System Applications";
+ predicate = "isSystemApplication = TRUE AND isWebApplication = FALSE";
+ "cell-class-name" = "ALSwitchCell";
+ "icon-size" = 29;
+ "suppress-hidden-apps" = 1;
+ },
+ {
+ title = "User Applications";
+ predicate = "isSystemApplication = FALSE AND isWebApplication = FALSE";
+ "cell-class-name" = "ALSwitchCell";
+ "icon-size" = 29;
+ "suppress-hidden-apps" = 1;
+ "footer-title" = "© 2011-12 Ryan Petrich";
+ }
+ );
+};
View
BIN layout/Library/PreferenceLoader/Preferences/DietBar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN layout/Library/PreferenceLoader/Preferences/DietBar@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4829460

Please sign in to comment.