public
Description: A buildbot GUI for OS X
Homepage: http://code.google.com/p/buildwatch/
Clone URL: git://github.com/dustin/buildwatch.git
Search Repo:
buildwatch / ApplicationDelegate.m
100644 32 lines (25 sloc) 0.853 kb
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
//
// ApplicationDelegate.m
// BuildWatch
//
// Created by Dustin Sallings on 3/11/08.
// Copyright 2008 Dustin Sallings <dustin@spy.net>. All rights reserved.
//
 
#import "ApplicationDelegate.h"
 
 
@implementation ApplicationDelegate
 
-(void)initDefaults {
    NSMutableDictionary *d=[[NSMutableDictionary alloc] initWithCapacity:1];
    [d setObject:@"localhost:9988" forKey:@"location"];
    [d setObject:[NSNumber numberWithBool: YES] forKey:@"useCapsLock"];
    [[NSUserDefaults standardUserDefaults] registerDefaults:d];
}
 
-(void)awakeFromNib {
  [self initDefaults];
}
 
-(void)applicationDidFinishLaunching:(id)sender {
    NSLog(@"Application did finish launching.");
    [[NSNotificationCenter defaultCenter]
        postNotificationName: @"connect"
        object: [[NSUserDefaults standardUserDefaults] objectForKey:@"location"]];
}
 
@end