mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
fc63af0709
Since Git recommends to use 50 characters in the first line of a commit message, this adds a vertical line to the commit message view to show where the 50 char limit is. [PB: This preference can be changed using a user default -- for now we don't have a preference pane yet, so this is hidden.]
31 lines
857 B
Objective-C
31 lines
857 B
Objective-C
//
|
|
// PBGitDefaults.m
|
|
// GitX
|
|
//
|
|
// Created by Jeff Mesnil on 19/10/08.
|
|
// Copyright 2008 Jeff Mesnil (http://jmesnil.net/). All rights reserved.
|
|
//
|
|
|
|
#import "PBGitDefaults.h"
|
|
|
|
#define kDefaultVerticalLineLength 50
|
|
#define kCommitMessageViewVerticalLineLength @"PBCommitMessageViewVerticalLineLength"
|
|
|
|
@implementation PBGitDefaults
|
|
|
|
+ (void)initialize
|
|
{
|
|
NSMutableDictionary *defaultValues = [NSMutableDictionary dictionary];
|
|
[defaultValues setObject:[NSNumber numberWithInt:kDefaultVerticalLineLength]
|
|
forKey:kCommitMessageViewVerticalLineLength];
|
|
[[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues];
|
|
NSLog(@"registered defaults: %@", defaultValues);
|
|
}
|
|
|
|
+ (int) commitMessageViewVerticalLineLength
|
|
{
|
|
return [[NSUserDefaults standardUserDefaults] integerForKey:kCommitMessageViewVerticalLineLength];
|
|
}
|
|
|
|
@end
|