silenced undefined selector warning

This commit is contained in:
Michael Starke
2018-06-28 13:46:06 +02:00
parent 21be56bfad
commit 7e1b059e62

View File

@@ -561,9 +561,12 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
#pragma mark HNHUITextFieldDelegate #pragma mark HNHUITextFieldDelegate
- (NSMenu *)textField:(NSTextField *)textField textView:(NSTextView *)view menu:(NSMenu *)menu { - (NSMenu *)textField:(NSTextField *)textField textView:(NSTextView *)view menu:(NSMenu *)menu {
for(NSMenuItem *item in menu.itemArray) { for(NSMenuItem *item in menu.itemArray) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
if(item.action == @selector(_searchWithGoogleFromMenu:) || item.action == @selector(submenuAction:)) { if(item.action == @selector(_searchWithGoogleFromMenu:) || item.action == @selector(submenuAction:)) {
[menu removeItem:item]; [menu removeItem:item];
} }
#pragma clang diagnostic pop
} }
/* /*
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:@""]; 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:@""];