From 7ab1ed4a344fb2f27628512d76db122902149b9f Mon Sep 17 00:00:00 2001 From: michael starke Date: Wed, 31 Aug 2016 16:00:56 +0200 Subject: [PATCH] Removed unused class --- MacPass.xcodeproj/project.pbxproj | 1 - MacPass/MPEntryProxy.h | 27 ----------------- MacPass/MPEntryProxy.m | 49 ------------------------------- 3 files changed, 77 deletions(-) delete mode 100644 MacPass/MPEntryProxy.h delete mode 100644 MacPass/MPEntryProxy.m diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index 2776bc13..6d8d3a8f 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -200,7 +200,6 @@ 4CC281891C0F675B00B9174D /* HNHUi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CC281881C0F675B00B9174D /* HNHUi.framework */; }; 4CC6DB7A17D23719002C6091 /* KPKNode+IconImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6DB7917D23719002C6091 /* KPKNode+IconImage.m */; }; 4CCA8E9B18D91ED9001A6754 /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CCA8E9A18D91ED9001A6754 /* Quartz.framework */; }; - 4CCCD83E1C8DFF20002B77B6 /* MPEntryProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCCD83D1C8DFF20002B77B6 /* MPEntryProxy.m */; }; 4CCCE8011D75CA48006AA951 /* MPArrayController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCCE8001D75CA48006AA951 /* MPArrayController.m */; }; 4CCEDE2A179F203B008402BE /* MPOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCEDE29179F203B008402BE /* MPOutlineView.m */; }; 4CCEDE2E179F213B008402BE /* MPNotifications.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCEDE2D179F213B008402BE /* MPNotifications.m */; }; diff --git a/MacPass/MPEntryProxy.h b/MacPass/MPEntryProxy.h deleted file mode 100644 index e136cdbd..00000000 --- a/MacPass/MPEntryProxy.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// MPEntryProxy.h -// MacPass -// -// Created by Michael Starke on 07/03/16. -// Copyright © 2016 HicknHack Software GmbH. All rights reserved. -// - -#import - -/* - Proxies the display of an entry to enable discardable changes to the entry - */ - -NS_ASSUME_NONNULL_BEGIN - -@class KPKEntry; - -@interface MPEntryProxy : NSProxy - -@property (strong, readonly) KPKEntry *entry; - -- (instancetype)initWithEntry:(KPKEntry *)entry; - -@end - -NS_ASSUME_NONNULL_END diff --git a/MacPass/MPEntryProxy.m b/MacPass/MPEntryProxy.m deleted file mode 100644 index 344ffcae..00000000 --- a/MacPass/MPEntryProxy.m +++ /dev/null @@ -1,49 +0,0 @@ -// -// MPEntryProxy.m -// MacPass -// -// Created by Michael Starke on 07/03/16. -// Copyright © 2016 HicknHack Software GmbH. All rights reserved. -// - -#import "MPEntryProxy.h" -#import - -#pragma mark - - -@interface MPEntryProxy () - -@property (strong) KPKEntry *entry; -@property BOOL firstModification; - -@end - -@implementation MPEntryProxy -- (instancetype)initWithEntry:(KPKEntry *)entry { - if(!entry) { - @throw [NSException exceptionWithName:NSInvalidArgumentException reason:nil userInfo:nil]; - } - _entry = entry; - _firstModification = NO; - - return self; -} - -- (void)forwardInvocation:(NSInvocation *)invocation { - if(invocation.selector == @selector(touchModified)) { - if(self.firstModification) { - [self.entry pushHistory]; - self.firstModification = YES; - } - NSLog(@"Possible mutation detected. Creating backup!"); - } - invocation.target = self.entry; - [invocation invoke]; -} - -- (NSMethodSignature *)methodSignatureForSelector:(SEL)sel { - NSLog(@"methodSignatureForSelector %@", NSStringFromSelector(sel)); - return [self.entry methodSignatureForSelector:sel]; -} - -@end