From da295b9acd569c64b5e15ad25fdf47ff4cc1cc90 Mon Sep 17 00:00:00 2001 From: michael starke Date: Tue, 30 Aug 2016 12:08:46 +0200 Subject: [PATCH] Removed unused classes --- MacPass/MPArrayController.h | 13 ------ MacPass/MPArrayController.m | 18 -------- MacPass/MPCustomFieldView.h | 17 -------- MacPass/MPCustomFieldView.m | 14 ------ MacPass/MPEntryInspectorViewController.m | 8 ++-- MacPass/MPGroupInspectorViewController.m | 1 - MacPass/MPObjectController.h | 16 ------- MacPass/MPObjectController.m | 55 ------------------------ 8 files changed, 3 insertions(+), 139 deletions(-) delete mode 100644 MacPass/MPArrayController.h delete mode 100644 MacPass/MPArrayController.m delete mode 100644 MacPass/MPCustomFieldView.h delete mode 100644 MacPass/MPCustomFieldView.m delete mode 100644 MacPass/MPObjectController.h delete mode 100644 MacPass/MPObjectController.m diff --git a/MacPass/MPArrayController.h b/MacPass/MPArrayController.h deleted file mode 100644 index cfb419e7..00000000 --- a/MacPass/MPArrayController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// MPArrayController.h -// MacPass -// -// Created by Michael Starke on 27/08/16. -// Copyright © 2016 HicknHack Software GmbH. All rights reserved. -// - -#import - -@interface MPArrayController : NSArrayController - -@end diff --git a/MacPass/MPArrayController.m b/MacPass/MPArrayController.m deleted file mode 100644 index c54f3421..00000000 --- a/MacPass/MPArrayController.m +++ /dev/null @@ -1,18 +0,0 @@ -// -// MPArrayController.m -// MacPass -// -// Created by Michael Starke on 27/08/16. -// Copyright © 2016 HicknHack Software GmbH. All rights reserved. -// - -#import "MPArrayController.h" - -@implementation MPArrayController - -- (void)setValue:(id)value forKeyPath:(NSString *)keyPath { - NSLog(@"%@ setValue:forKeyPath:%@", NSStringFromClass([self class]), keyPath); - [super setValue:value forKeyPath:keyPath]; -} - -@end diff --git a/MacPass/MPCustomFieldView.h b/MacPass/MPCustomFieldView.h deleted file mode 100644 index 485c836b..00000000 --- a/MacPass/MPCustomFieldView.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// MPCustomFieldView.h -// MacPass -// -// Created by Michael Starke on 27.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import - -@interface MPCustomFieldView : NSView - -@property (weak) IBOutlet NSTextField *labelTextField; -@property (weak) IBOutlet NSTextField *valueTextField; -@property (weak) IBOutlet NSButton *deleteButton; - -@end diff --git a/MacPass/MPCustomFieldView.m b/MacPass/MPCustomFieldView.m deleted file mode 100644 index b1152da2..00000000 --- a/MacPass/MPCustomFieldView.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// MPCustomFieldView.m -// MacPass -// -// Created by Michael Starke on 27.06.13. -// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved. -// - -#import "MPCustomFieldView.h" - -@implementation MPCustomFieldView - - -@end diff --git a/MacPass/MPEntryInspectorViewController.m b/MacPass/MPEntryInspectorViewController.m index c38159aa..e3eb063a 100644 --- a/MacPass/MPEntryInspectorViewController.m +++ b/MacPass/MPEntryInspectorViewController.m @@ -26,8 +26,6 @@ #import "KeePassKit/KeePassKit.h" -#import "MPArrayController.h" - #import "HNHUi/HNHUi.h" typedef NS_ENUM(NSUInteger, MPEntryTab) { @@ -70,9 +68,9 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { _showPassword = NO; - _attachmentsController = [[MPArrayController alloc] init]; - _customFieldsController = [[MPArrayController alloc] init]; - _windowAssociationsController = [[MPArrayController alloc] init]; + _attachmentsController = [[NSArrayController alloc] init]; + _customFieldsController = [[NSArrayController alloc] init]; + _windowAssociationsController = [[NSArrayController alloc] init]; _attachmentTableDelegate = [[MPAttachmentTableViewDelegate alloc] init]; _customFieldTableDelegate = [[MPCustomFieldTableViewDelegate alloc] init]; _attachmentDataSource = [[MPAttachmentTableDataSource alloc] init]; diff --git a/MacPass/MPGroupInspectorViewController.m b/MacPass/MPGroupInspectorViewController.m index cb1b0909..2416b9a7 100644 --- a/MacPass/MPGroupInspectorViewController.m +++ b/MacPass/MPGroupInspectorViewController.m @@ -10,7 +10,6 @@ #import "MPDocument.h" #import "MPPasteBoardController.h" #import "MPValueTransformerHelper.h" -#import "MPObjectController.h" #import "KeePassKit/KeePassKit.h" diff --git a/MacPass/MPObjectController.h b/MacPass/MPObjectController.h deleted file mode 100644 index 5de3e80b..00000000 --- a/MacPass/MPObjectController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// MPObjectController.h -// MacPass -// -// Created by Michael Starke on 18/08/16. -// Copyright © 2016 HicknHack Software GmbH. All rights reserved. -// - -#import -#import "MPModelChangeObserving.h" - -@interface MPObjectController : NSObjectController - -@property (weak) NSDocument *document; - -@end diff --git a/MacPass/MPObjectController.m b/MacPass/MPObjectController.m deleted file mode 100644 index 23492aed..00000000 --- a/MacPass/MPObjectController.m +++ /dev/null @@ -1,55 +0,0 @@ -// -// MPObjectController.m -// MacPass -// -// Created by Michael Starke on 18/08/16. -// Copyright © 2016 HicknHack Software GmbH. All rights reserved. -// - -#import "MPObjectController.h" - -@interface MPObjectController () -@property (strong) NSMutableSet *observedModelKeyPaths; -@end - -@implementation MPObjectController - -- (void)discardEditing { - [super discardEditing]; -} - -- (BOOL)commitEditing { - return [super commitEditing]; -} - -- (void)setValue:(id)value forKeyPath:(NSString *)keyPath { - BOOL observerd = NO; - for(NSString *observedKeyPath in self.observedModelKeyPaths) { - observerd = ([keyPath hasPrefix:observedKeyPath]); - if(observerd) { - break; - } - } - if(observerd) { - - } - [super setValue:value forKeyPath:keyPath]; -} - -- (void)didChangeModel { - -} - -- (void)willChangeModel { - -} - -- (void)beginObservingModelKeyPath:(NSString *)keyPath { - [self.observedModelKeyPaths addObject:keyPath]; -} - -- (void)endObservingModelKeyPath:(NSString *)keyPath { - [self.observedModelKeyPaths removeObject:keyPath]; -} - -@end