From 5cc333146eb184824d74ab4dfe0fa221135d3423 Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Fri, 16 Feb 2018 17:09:46 +0100 Subject: [PATCH] converted to properties where appropriate --- MacPass/MPEntryViewController.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m index 06d6f43e..3eb96069 100644 --- a/MacPass/MPEntryViewController.m +++ b/MacPass/MPEntryViewController.m @@ -709,7 +709,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell"; NSString *expandedURL = [selectedEntry.url kpk_finalValueForEntry:selectedEntry]; if(expandedURL.length > 0) { NSURL *webURL = [NSURL URLWithString:[expandedURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; - NSString *scheme = [webURL scheme]; + NSString *scheme = webURL.scheme; if(!scheme) { webURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@", [expandedURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]; } @@ -754,11 +754,11 @@ NSString *const _MPTableSecurCellView = @"PasswordCell"; return; // No data available } NSInteger columnIndex = [self.entryTable clickedColumn]; - if(columnIndex < 0 || columnIndex >= [[self.entryTable tableColumns] count]) { + if(columnIndex < 0 || columnIndex >= self.entryTable.tableColumns.count) { return; // No Column to use } - NSTableColumn *column = [self.entryTable tableColumns][[self.entryTable clickedColumn]]; - NSString *identifier = [column identifier]; + NSTableColumn *column = self.entryTable.tableColumns[self.entryTable.clickedColumn]; + NSString *identifier = column.identifier; if([identifier isEqualToString:MPEntryTableTitleColumnIdentifier]) { [self _executeTitleColumnDoubleClick]; } @@ -775,7 +775,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell"; } - (void)_executeTitleColumnDoubleClick { - MPDoubleClickTitleAction action = [[NSUserDefaults standardUserDefaults] integerForKey:kMPSettingsKeyDoubleClickTitleAction]; + MPDoubleClickTitleAction action = [NSUserDefaults.standardUserDefaults integerForKey:kMPSettingsKeyDoubleClickTitleAction]; switch(action) { case MPDoubleClickTitleActionInspect: [(MPDocumentWindowController *)self.windowController showInspector:nil]; @@ -788,7 +788,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell"; } } - (void)_executeURLColumnDoubleClick { - MPDoubleClickURLAction action = [[NSUserDefaults standardUserDefaults] integerForKey:kMPSettingsKeyDoubleClickURLAction]; + MPDoubleClickURLAction action = [NSUserDefaults.standardUserDefaults integerForKey:kMPSettingsKeyDoubleClickURLAction]; switch (action) { case MPDoubleClickURLActionOpen: [self openURL:nil];