PBChangedFile: remove shouldBeDeleted boolean
[GitX.git] / PBWebDiffController.m
bloba537bd017a840aeed04560343eefacf44a61dbb6
1 //
2 //  PBWebDiffController.m
3 //  GitX
4 //
5 //  Created by Pieter de Bie on 13-10-08.
6 //  Copyright 2008 Pieter de Bie. All rights reserved.
7 //
9 #import "PBWebDiffController.h"
12 @implementation PBWebDiffController
14 - (void) awakeFromNib
16         startFile = @"diff";
17         [super awakeFromNib];
18         [diffController addObserver:self forKeyPath:@"diff" options:0 context:@"ChangedDiff"];
21 - (void) didLoad
23         [self showDiff:diffController.diff];
26 - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
28     if ([(NSString *)context isEqualToString: @"ChangedDiff"])
29                 [self showDiff:diffController.diff];
32 - (void) showDiff: (NSString *) diff
34         if (diff == nil || !finishedLoading)
35                 return;
37         id script = [view windowScriptObject];
38         [script callWebScriptMethod:@"showDiff" withArguments: [NSArray arrayWithObject:diff]];
41 @end