mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 15:52:19 +00:00
Removing searchWithGoogle and all submenu actions from context menu
This commit is contained in:
@@ -560,14 +560,15 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
|
||||
#pragma mark -
|
||||
#pragma mark HNHUITextFieldDelegate
|
||||
- (NSMenu *)textField:(NSTextField *)textField textView:(NSTextView *)view menu:(NSMenu *)menu {
|
||||
/*for(NSMenuItem *item in [menu itemArray]) {
|
||||
if(item.action == @selector(showReferenceBuilder:)) {
|
||||
return menu; // item is already contained!
|
||||
}
|
||||
}
|
||||
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"SHOW_REFERENCE_BUILDER", @"Menu item to show the reference builder in a text view's context menu")action:@selector(showReferenceBuilder:) keyEquivalent:@""];
|
||||
item.representedObject = textField;
|
||||
[menu addItem:item];
|
||||
for(NSMenuItem *item in menu.itemArray) {
|
||||
if(item.action == @selector(_searchWithGoogleFromMenu:) || item.action == @selector(submenuAction:)) {
|
||||
[menu removeItem:item];
|
||||
}
|
||||
}
|
||||
/*
|
||||
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"SHOW_REFERENCE_BUILDER", @"Menu item to show the reference builder in a text view's context menu")action:@selector(showReferenceBuilder:) keyEquivalent:@""];
|
||||
item.representedObject = textField;
|
||||
[menu addItem:item];
|
||||
*/
|
||||
return menu;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user