mirror of
https://github.com/objective-see/KnockKnock.git
synced 2026-03-22 06:52:25 +00:00
61 lines
1.1 KiB
Objective-C
61 lines
1.1 KiB
Objective-C
//
|
|
// 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
|