|
|
|
|
|
|
|
|
@implementation prpRootListController |
|
|
@implementation prpRootListController |
|
|
|
|
|
|
|
|
- (id)readPreferenceValue:(PSSpecifier*)specifier { |
|
|
- (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]; |
|
|
NSMutableDictionary *settings = [NSMutableDictionary dictionary]; |
|
|
[settings addEntriesFromDictionary:[NSDictionary dictionaryWithContentsOfFile:path]]; |
|
|
[settings addEntriesFromDictionary:[NSDictionary dictionaryWithContentsOfFile:path]]; |
|
|
return (settings[specifier.properties[@"key"]]) ?: specifier.properties[@"default"]; |
|
|
return (settings[specifier.properties[@"key"]]) ?: specifier.properties[@"default"]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
- (void)setPreferenceValue:(id)value specifier:(PSSpecifier*)specifier { |
|
|
- (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]; |
|
|
NSMutableDictionary *settings = [NSMutableDictionary dictionary]; |
|
|
[settings addEntriesFromDictionary:[NSDictionary dictionaryWithContentsOfFile:path]]; |
|
|
[settings addEntriesFromDictionary:[NSDictionary dictionaryWithContentsOfFile:path]]; |
|
|
[settings setObject:value forKey:specifier.properties[@"key"]]; |
|
|
[settings setObject:value forKey:specifier.properties[@"key"]]; |