mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-15 01:02:24 +00:00
Minor change to codestyle
This commit is contained in:
@@ -467,24 +467,23 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CS: don't know how to iterate through KPKEntry properties to check for blanks so just check the declared properties
|
|
||||||
KPKEntry *targetEntry = [self _clickedOrSelectedEntry];
|
KPKEntry *targetEntry = [self _clickedOrSelectedEntry];
|
||||||
MPActionType actionType = [MPActionHelper typeForAction:[menuItem action]];
|
MPActionType actionType = [MPActionHelper typeForAction:[menuItem action]];
|
||||||
|
|
||||||
if (([[targetEntry username] length] == 0) && (actionType == MPActionCopyUsername)) {
|
switch (actionType) {
|
||||||
return NO;
|
case MPActionCopyUsername:
|
||||||
|
return [targetEntry.username length] > 0;
|
||||||
|
|
||||||
|
case MPActionCopyPassword:
|
||||||
|
return [targetEntry.password length] > 0;
|
||||||
|
|
||||||
|
case MPActionCopyURL:
|
||||||
|
case MPActionOpenURL:
|
||||||
|
return [targetEntry.url length] > 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (([[targetEntry password] length] == 0) && (actionType == MPActionCopyPassword)) {
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (([[targetEntry url] length] == 0) && (actionType == MPActionCopyURL || actionType == MPActionOpenURL)) {
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
return YES;
|
|
||||||
/* TODO handle _clickedOrSlectedEnty */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark ContextMenu
|
#pragma mark ContextMenu
|
||||||
|
|||||||
Reference in New Issue
Block a user