using property syntax

Signed-off-by: michael starke <michael.starke@hicknhack-software.com>
This commit is contained in:
michael starke
2015-10-07 15:54:17 +02:00
parent 1f18b2c03d
commit cd925a81f3
2 changed files with 15 additions and 15 deletions

View File

@@ -650,21 +650,21 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
#pragma mark Actions
- (void)copyPassword:(id)sender {
KPKEntry *selectedEntry = [[self currentTargetNode] asEntry];
KPKEntry *selectedEntry = [self currentTargetNode].asEntry;
if(selectedEntry) {
[self _copyToPasteboard:[selectedEntry.password finalValueForEntry:selectedEntry] overlayInfo:MPOverlayInfoPassword name:nil];
}
}
- (void)copyUsername:(id)sender {
KPKEntry *selectedEntry = [[self currentTargetNode] asEntry];
KPKEntry *selectedEntry = [self currentTargetNode].asEntry;
if(selectedEntry) {
[self _copyToPasteboard:[selectedEntry.username finalValueForEntry:selectedEntry] overlayInfo:MPOverlayInfoUsername name:nil];
}
}
- (void)copyCustomAttribute:(id)sender {
KPKEntry *selectedEntry = [[self currentTargetNode] asEntry];
KPKEntry *selectedEntry = [self currentTargetNode].asEntry;
if(selectedEntry && [selectedEntry isKindOfClass:[KPKEntry class]]) {
NSUInteger index = [sender tag];
NSAssert((index >= 0) && (index < [selectedEntry.customAttributes count]), @"Index for custom field needs to be valid");
@@ -674,14 +674,14 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
}
- (void)copyURL:(id)sender {
KPKEntry *selectedEntry = [[self currentTargetNode] asEntry];
KPKEntry *selectedEntry = [self currentTargetNode].asEntry;
if(selectedEntry) {
[self _copyToPasteboard:[selectedEntry.url finalValueForEntry:selectedEntry] overlayInfo:MPOverlayInfoURL name:nil];
}
}
- (void)openURL:(id)sender {
KPKEntry *selectedEntry = [[self currentTargetNode] asEntry];
KPKEntry *selectedEntry = [self currentTargetNode].asEntry;
NSString *expandedURL = [selectedEntry.url finalValueForEntry:selectedEntry];
if(expandedURL.length > 0) {
NSURL *webURL = [NSURL URLWithString:[expandedURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
@@ -707,7 +707,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
}
- (void)delete:(id)sender {
KPKEntry *entry = [[self currentTargetNode] asEntry];
KPKEntry *entry = [self currentTargetNode].asEntry;
if(!entry) {
return;
}