mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 22:52:26 +00:00
converted to properties where appropriate
This commit is contained in:
@@ -709,7 +709,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
|||||||
NSString *expandedURL = [selectedEntry.url kpk_finalValueForEntry:selectedEntry];
|
NSString *expandedURL = [selectedEntry.url kpk_finalValueForEntry:selectedEntry];
|
||||||
if(expandedURL.length > 0) {
|
if(expandedURL.length > 0) {
|
||||||
NSURL *webURL = [NSURL URLWithString:[expandedURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
|
NSURL *webURL = [NSURL URLWithString:[expandedURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
|
||||||
NSString *scheme = [webURL scheme];
|
NSString *scheme = webURL.scheme;
|
||||||
if(!scheme) {
|
if(!scheme) {
|
||||||
webURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@", [expandedURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
|
webURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@", [expandedURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
|
||||||
}
|
}
|
||||||
@@ -754,11 +754,11 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
|||||||
return; // No data available
|
return; // No data available
|
||||||
}
|
}
|
||||||
NSInteger columnIndex = [self.entryTable clickedColumn];
|
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
|
return; // No Column to use
|
||||||
}
|
}
|
||||||
NSTableColumn *column = [self.entryTable tableColumns][[self.entryTable clickedColumn]];
|
NSTableColumn *column = self.entryTable.tableColumns[self.entryTable.clickedColumn];
|
||||||
NSString *identifier = [column identifier];
|
NSString *identifier = column.identifier;
|
||||||
if([identifier isEqualToString:MPEntryTableTitleColumnIdentifier]) {
|
if([identifier isEqualToString:MPEntryTableTitleColumnIdentifier]) {
|
||||||
[self _executeTitleColumnDoubleClick];
|
[self _executeTitleColumnDoubleClick];
|
||||||
}
|
}
|
||||||
@@ -775,7 +775,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)_executeTitleColumnDoubleClick {
|
- (void)_executeTitleColumnDoubleClick {
|
||||||
MPDoubleClickTitleAction action = [[NSUserDefaults standardUserDefaults] integerForKey:kMPSettingsKeyDoubleClickTitleAction];
|
MPDoubleClickTitleAction action = [NSUserDefaults.standardUserDefaults integerForKey:kMPSettingsKeyDoubleClickTitleAction];
|
||||||
switch(action) {
|
switch(action) {
|
||||||
case MPDoubleClickTitleActionInspect:
|
case MPDoubleClickTitleActionInspect:
|
||||||
[(MPDocumentWindowController *)self.windowController showInspector:nil];
|
[(MPDocumentWindowController *)self.windowController showInspector:nil];
|
||||||
@@ -788,7 +788,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
- (void)_executeURLColumnDoubleClick {
|
- (void)_executeURLColumnDoubleClick {
|
||||||
MPDoubleClickURLAction action = [[NSUserDefaults standardUserDefaults] integerForKey:kMPSettingsKeyDoubleClickURLAction];
|
MPDoubleClickURLAction action = [NSUserDefaults.standardUserDefaults integerForKey:kMPSettingsKeyDoubleClickURLAction];
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case MPDoubleClickURLActionOpen:
|
case MPDoubleClickURLActionOpen:
|
||||||
[self openURL:nil];
|
[self openURL:nil];
|
||||||
|
|||||||
Reference in New Issue
Block a user