-
Notifications
You must be signed in to change notification settings - Fork 35
/
DiffWindowController.m
60 lines (47 loc) · 1.12 KB
/
DiffWindowController.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
// DiffWindowController.m
// KnockKnock
//
// Created by Patrick Wardle on 09/01/24.
// Copyright (c) 2024 Objective-See. All rights reserved.
//
#import "Consts.h"
#import "DiffWindowController.h"
@implementation DiffWindowController
-(void)awakeFromNib
{
//center
[self.window center];
return;
}
//window load
// init UI stuffz
-(void)windowDidLoad
{
//super
[super windowDidLoad];
//set path in ui
//self.path.stringValue = self.plist;
//set inset
self.contents.textContainerInset = NSMakeSize(0, 10);
//set font
self.contents.font = [NSFont fontWithName:@"Menlo" size:13];
//add plist
self.contents.string = self.differences;//[[NSDictionary dictionaryWithContentsOfFile:self.plist] description];
/*
if(0 == self.contents.string.length)
{
//display error
self.contents.string = [NSString stringWithFormat:NSLocalizedString(@"failed to load contents of %@", @"failed to load contents of %@"), self.plist];
}
*/
return;
}
//close
// end sheet
-(IBAction)close:(id)sender
{
[self.window close];
return;
}
@end