-
Notifications
You must be signed in to change notification settings - Fork 0
/
Controller.m
46 lines (38 loc) · 1.06 KB
/
Controller.m
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
41
42
43
44
45
46
#import "Controller.h"
#import <Cocoa/Cocoa.h>
#import "TrayMenu.h"
#include <math.h>
#include <unistd.h>
#include <CoreFoundation/CoreFoundation.h>
#import <Foundation/Foundation.h>
#import "PreferenceController.h";
@implementation Controller
- (void) start
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[NSApplication sharedApplication];
//add traymenu
TrayMenu *menu = [[TrayMenu alloc] initWithController:self];
[NSApp setDelegate:menu];
[NSApp run];
[pool release];
}
+ (void)initialize
{
// NSMutableDictionary *defaultValues = [NSMutableDictionary dictionary];
// [defaultValues setObject:@"" forKey:@"server"];
// [defaultValues setObject:@"" forKey:@"username"];
// [defaultValues setObject:@"" forKey:@"password"];
// [defaultValues setObject:[NSNumber numberWithInt:993] forKey:@"port"];
//
// [[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues];
}
- (void) showPrefs
{
if(!preferenceController)
{
preferenceController = [[PreferenceController alloc] init];
}
[preferenceController showWindow:self];
}
@end