PBChangedFile: remove shouldBeDeleted boolean
[GitX.git] / PBGitDefaults.m
blob676fa72a569d62f4360015c6281ceec5beefbfbe
1 //
2 //  PBGitDefaults.m
3 //  GitX
4 //
5 //  Created by Jeff Mesnil on 19/10/08.
6 //  Copyright 2008 Jeff Mesnil (http://jmesnil.net/). All rights reserved.
7 //
9 #import "PBGitDefaults.h"
11 #define kDefaultVerticalLineLength 50
12 #define kCommitMessageViewVerticalLineLength @"PBCommitMessageViewVerticalLineLength"
13 #define kEnableGist @"PBEnableGist"
14 #define kEnableGravatar @"PBEnableGravatar"
15 #define kConfirmPublicGists @"PBConfirmPublicGists"
16 #define kPublicGist @"PBGistPublic"
18 @implementation PBGitDefaults
20 + (void)initialize
22         NSMutableDictionary *defaultValues = [NSMutableDictionary dictionary];
23         [defaultValues setObject:[NSNumber numberWithInt:kDefaultVerticalLineLength]
24                       forKey:kCommitMessageViewVerticalLineLength];
25         [defaultValues setObject:[NSNumber numberWithBool:YES]
26                           forKey:kEnableGist];
27         [defaultValues setObject:[NSNumber numberWithBool:YES]
28                           forKey:kEnableGravatar];
29         [defaultValues setObject:[NSNumber numberWithBool:YES]
30                           forKey:kConfirmPublicGists];
31         [defaultValues setObject:[NSNumber numberWithBool:NO]
32                           forKey:kPublicGist];
33         [[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues];
36 + (int) commitMessageViewVerticalLineLength
38         return [[NSUserDefaults standardUserDefaults] integerForKey:kCommitMessageViewVerticalLineLength];
41 + (BOOL) isGistEnabled
43         return [[NSUserDefaults standardUserDefaults] boolForKey:kEnableGist];
46 + (BOOL) isGravatarEnabled
48         return [[NSUserDefaults standardUserDefaults] boolForKey:kEnableGravatar];
51 + (BOOL) confirmPublicGists
53         return [[NSUserDefaults standardUserDefaults] boolForKey:kConfirmPublicGists];
56 + (BOOL) isGistPublic
58         return [[NSUserDefaults standardUserDefaults] boolForKey:kPublicGist];
60 @end