-
Notifications
You must be signed in to change notification settings - Fork 5
/
prefs.h
executable file
·40 lines (31 loc) · 1.26 KB
/
prefs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<<<<<<< HEAD
static NSString *domainString = @"com.broganminer.cswitcher~prefs";
static BOOL fivecon(void) {
NSNumber *fivecon = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"fivecon" inDomain:domainString];
return (fivecon)? [fivecon boolValue]:YES;
}
static BOOL snaps(void) {
NSNumber *snaps = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"snaps" inDomain:domainString];
return (snaps)? [snaps boolValue]:YES;
}
static BOOL paging(void) {
NSNumber *paging = (NSNumber *)[[NSUserDefaults standardUserDefaults] objectForKey:@"paging" inDomain:domainString];
return (paging)? [paging boolValue]:YES;
}
=======
#import "CSView.h"
static NSString *const filePath = @"/var/mobile/Library/Preferences/com.broganminer.cswitcher~prefs.plist";
static NSDictionary *prefs = [[[NSDictionary alloc] initWithContentsOfFile:filePath] autorelease];
static BOOL fivecon(void) {
bool fivecon = (prefs)? [prefs [@"fivecon"] boolValue] : NO;
return fivecon;
}
static BOOL snaps(void) {
bool snaps = (prefs)? [prefs [@"snaps"] boolValue] : NO;
return snaps;
}
static BOOL paging(void) {
bool paging = (prefs)? [prefs [@"paging"] boolValue] : YES;
return paging;
}
>>>>>>> cb7d7214b8270405dd160e74854fea27d457ef3e