Using non-deprecated NSMenu allocations

This commit is contained in:
Michael Starke
2018-08-30 21:38:20 +02:00
parent 213e3584a0
commit 0274b32356
2 changed files with 2 additions and 2 deletions

View File

@@ -588,7 +588,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
}
- (void)_setupHeaderMenu {
NSMenu *headerMenu = [[NSMenu allocWithZone:[NSMenu menuZone]] init];
NSMenu *headerMenu = [[NSMenu alloc] init];
[headerMenu addItemWithTitle:NSLocalizedString(@"TITLE", "Menu item to toggle display of title column in entry table") action:NULL keyEquivalent:@""];
[headerMenu addItemWithTitle:NSLocalizedString(@"USERNAME", "Menu item to toggle display of username column in entry table") action:NULL keyEquivalent:@""];

View File

@@ -145,7 +145,7 @@ NSString *const MPToolbarItemAutotype = @"TOOLBAR_AUTOTYPE";
[button setImage:image];
[button sizeToFit];
NSMenu *menu = [NSMenu allocWithZone:[NSMenu menuZone]];
NSMenu *menu = [[NSMenu alloc] init];
[menu addItemWithTitle:NSLocalizedString(@"UNKNOWN_TOOLBAR_ITEM", @"") action:NULL keyEquivalent:@""];
menu.delegate = _entryMenuDelegate;
button.contextMenu = menu;