|
|
@@ -4,14 +4,14 @@ |
|
|
|
@implementation prpRootListController |
|
|
|
|
|
|
|
- (id)readPreferenceValue:(PSSpecifier*)specifier { |
|
|
|
NSString *path = [NSString stringWithFormat:@"/User/Library/Preferences/%@.plist", specifier.properties[@"defaults"]]; |
|
|
|
NSString *path = [NSString stringWithFormat:@"/var/mobile/Library/Preferences/%@.plist", specifier.properties[@"defaults"]]; |
|
|
|
NSMutableDictionary *settings = [NSMutableDictionary dictionary]; |
|
|
|
[settings addEntriesFromDictionary:[NSDictionary dictionaryWithContentsOfFile:path]]; |
|
|
|
return (settings[specifier.properties[@"key"]]) ?: specifier.properties[@"default"]; |
|
|
|
} |
|
|
|
|
|
|
|
- (void)setPreferenceValue:(id)value specifier:(PSSpecifier*)specifier { |
|
|
|
NSString *path = [NSString stringWithFormat:@"/User/Library/Preferences/%@.plist", specifier.properties[@"defaults"]]; |
|
|
|
NSString *path = [NSString stringWithFormat:@"/var/mobile/Library/Preferences/%@.plist", specifier.properties[@"defaults"]]; |
|
|
|
NSMutableDictionary *settings = [NSMutableDictionary dictionary]; |
|
|
|
[settings addEntriesFromDictionary:[NSDictionary dictionaryWithContentsOfFile:path]]; |
|
|
|
[settings setObject:value forKey:specifier.properties[@"key"]]; |