mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 08:12:28 +00:00
removed unused code
This commit is contained in:
@@ -52,7 +52,6 @@
|
|||||||
|
|
||||||
@property (weak) IBOutlet NSTextField *associationSequenceTextField;
|
@property (weak) IBOutlet NSTextField *associationSequenceTextField;
|
||||||
|
|
||||||
- (void)setupBindings:(MPDocument *)document;
|
|
||||||
- (void)registerNotificationsForDocument:(MPDocument *)document;
|
- (void)registerNotificationsForDocument:(MPDocument *)document;
|
||||||
|
|
||||||
- (IBAction)saveAttachment:(id)sender;
|
- (IBAction)saveAttachment:(id)sender;
|
||||||
|
|||||||
@@ -125,10 +125,6 @@ static NSString *kMPContentBindingString3 = @"content.%@.%@.%@";
|
|||||||
[self _setupViewBindings];
|
[self _setupViewBindings];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setupBindings:(MPDocument *)document {
|
|
||||||
//[self.entryController bind:NSContentObjectBinding toObject:self withKeyPath:NSStringFromSelector(@selector(representedObject)) options:nil];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)registerNotificationsForDocument:(MPDocument *)document {
|
- (void)registerNotificationsForDocument:(MPDocument *)document {
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
selector:@selector(_didAddEntry:)
|
selector:@selector(_didAddEntry:)
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
@property (weak) IBOutlet NSPopUpButton *autotypePopupButton;
|
@property (weak) IBOutlet NSPopUpButton *autotypePopupButton;
|
||||||
@property (weak) IBOutlet HNHUIRoundedTextField *autotypeSequenceTextField;
|
@property (weak) IBOutlet HNHUIRoundedTextField *autotypeSequenceTextField;
|
||||||
|
|
||||||
- (void)setupBindings:(MPDocument *)document;
|
|
||||||
- (void)beginEditing;
|
- (void)beginEditing;
|
||||||
- (void)endEditing;
|
- (void)endEditing;
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,7 @@
|
|||||||
#import "HNHUi/HNHUi.h"
|
#import "HNHUi/HNHUi.h"
|
||||||
|
|
||||||
@interface MPGroupInspectorViewController ()
|
@interface MPGroupInspectorViewController ()
|
||||||
|
|
||||||
//@property (nonatomic, weak) KPKGroup *group;
|
|
||||||
@property (strong) NSPopover *popover;
|
@property (strong) NSPopover *popover;
|
||||||
@property (strong) MPObjectController *groupController;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@@ -30,14 +27,6 @@
|
|||||||
return @"GroupInspectorView";
|
return @"GroupInspectorView";
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
|
|
||||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
|
||||||
if (self) {
|
|
||||||
_groupController = [[MPObjectController alloc] init];
|
|
||||||
}
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)awakeFromNib {
|
- (void)awakeFromNib {
|
||||||
HNHUIScrollView *scrollView = (HNHUIScrollView *)self.view;
|
HNHUIScrollView *scrollView = (HNHUIScrollView *)self.view;
|
||||||
|
|
||||||
@@ -84,34 +73,30 @@
|
|||||||
[self _establishBindings];
|
[self _establishBindings];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setupBindings:(MPDocument *)document {
|
|
||||||
[self.groupController bind:NSContentObjectBinding toObject:self withKeyPath:NSStringFromSelector(@selector(representedObject)) options:nil];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)_establishBindings {
|
- (void)_establishBindings {
|
||||||
[self.titleTextField bind:NSValueBinding
|
[self.titleTextField bind:NSValueBinding
|
||||||
toObject:self.groupController
|
toObject:self
|
||||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSContentBinding, NSStringFromSelector(@selector(title))]
|
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(title))]
|
||||||
options:@{NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", @"")}];
|
options:@{NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", @"")}];
|
||||||
[self.expiresCheckButton bind:NSValueBinding
|
[self.expiresCheckButton bind:NSValueBinding
|
||||||
toObject:self.groupController
|
toObject:self
|
||||||
withKeyPath:[NSString stringWithFormat:@"%@.%@.%@", NSContentBinding, NSStringFromSelector(@selector(timeInfo)), NSStringFromSelector(@selector(expires))]
|
withKeyPath:[NSString stringWithFormat:@"%@.%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(timeInfo)), NSStringFromSelector(@selector(expires))]
|
||||||
options:nil];
|
options:nil];
|
||||||
[self.expiresCheckButton bind:NSTitleBinding
|
[self.expiresCheckButton bind:NSTitleBinding
|
||||||
toObject:self.groupController
|
toObject:self
|
||||||
withKeyPath:[NSString stringWithFormat:@"%@.%@.%@", NSContentBinding, NSStringFromSelector(@selector(timeInfo)), NSStringFromSelector(@selector(expirationDate))]
|
withKeyPath:[NSString stringWithFormat:@"%@.%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(timeInfo)), NSStringFromSelector(@selector(expirationDate))]
|
||||||
options:@{ NSValueTransformerNameBindingOption:MPExpiryDateValueTransformer }];
|
options:@{ NSValueTransformerNameBindingOption:MPExpiryDateValueTransformer }];
|
||||||
[self.autotypePopupButton bind:NSSelectedTagBinding
|
[self.autotypePopupButton bind:NSSelectedTagBinding
|
||||||
toObject:self.groupController
|
toObject:self
|
||||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSContentBinding, NSStringFromSelector(@selector(isAutoTypeEnabled))]
|
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(isAutoTypeEnabled))]
|
||||||
options:nil];
|
options:nil];
|
||||||
[self.autotypeSequenceTextField bind:NSValueBinding
|
[self.autotypeSequenceTextField bind:NSValueBinding
|
||||||
toObject:self.groupController
|
toObject:self
|
||||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSContentBinding, NSStringFromSelector(@selector(defaultAutoTypeSequence))]
|
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(defaultAutoTypeSequence))]
|
||||||
options:@{NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", @"")}];
|
options:@{NSNullPlaceholderBindingOption: NSLocalizedString(@"NONE", @"")}];
|
||||||
[self.searchPopupButton bind:NSSelectedTagBinding
|
[self.searchPopupButton bind:NSSelectedTagBinding
|
||||||
toObject:self.groupController
|
toObject:self
|
||||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSContentBinding, NSStringFromSelector(@selector(isSearchEnabled))]
|
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(isSearchEnabled))]
|
||||||
options:nil];
|
options:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -110,9 +110,6 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
|
|||||||
name:MPDocumentCurrentItemChangedNotification
|
name:MPDocumentCurrentItemChangedNotification
|
||||||
object:document];
|
object:document];
|
||||||
[self.entryViewController registerNotificationsForDocument:document];
|
[self.entryViewController registerNotificationsForDocument:document];
|
||||||
|
|
||||||
[self.entryViewController setupBindings:document];
|
|
||||||
[self.groupViewController setupBindings:document];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)updateResponderChain {
|
- (void)updateResponderChain {
|
||||||
|
|||||||
@@ -10,15 +10,6 @@
|
|||||||
|
|
||||||
@implementation MPObjectController
|
@implementation MPObjectController
|
||||||
|
|
||||||
//- (void)objectDidBeginEditing:(id)editor {
|
|
||||||
// NSLog(@"objectDidBeginEditing:%@", editor);
|
|
||||||
// [super objectDidBeginEditing:editor];
|
|
||||||
//}
|
|
||||||
//- (void)objectDidEndEditing:(id)editor {
|
|
||||||
// NSLog(@"objectDidEndEditing:%@", editor);
|
|
||||||
// [super objectDidEndEditing:editor];
|
|
||||||
//}
|
|
||||||
|
|
||||||
- (void)discardEditing {
|
- (void)discardEditing {
|
||||||
[super discardEditing];
|
[super discardEditing];
|
||||||
}
|
}
|
||||||
@@ -27,17 +18,9 @@
|
|||||||
return [super commitEditing];
|
return [super commitEditing];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)setValue:(id)value forKeyPath:(NSString *)keyPath {
|
||||||
//- (BOOL)commitEditing {
|
NSLog(@"[%@ setValue:%@ forKeyPath:%@]", NSStringFromClass([self class]), value, keyPath);
|
||||||
// return [super commitEditing];
|
[super setValue:value forKeyPath:keyPath];
|
||||||
//}
|
}
|
||||||
//
|
|
||||||
//- (BOOL)commitEditingAndReturnError:(NSError * _Nullable __autoreleasing *)error {
|
|
||||||
// return [super commitEditingAndReturnError:error];
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//- (void)commitEditingWithDelegate:(id)delegate didCommitSelector:(SEL)didCommitSelector contextInfo:(void *)contextInfo {
|
|
||||||
// [super commitEditingWithDelegate:delegate didCommitSelector:didCommitSelector contextInfo:contextInfo];
|
|
||||||
//}
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Reference in New Issue
Block a user