Use properties

This commit is contained in:
Michael Starke
2019-10-30 16:04:34 +01:00
parent 264866dff0
commit f1033c1006

View File

@@ -300,7 +300,7 @@ NSString *const MPToolbarItemAutotype = @"TOOLBAR_AUTOTYPE";
[menu addItem:item];
[menu addItem:[NSMenuItem separatorItem]];
item = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"RECENT_SEARCHES", @"Recent searches menu item") action:NULL keyEquivalent:@""];
item.tag = NSSearchFieldRecentsTitleMenuItemTag;
[menu addItem:item];
@@ -341,7 +341,7 @@ NSString *const MPToolbarItemAutotype = @"TOOLBAR_AUTOTYPE";
}
- (void)_didExitSearch:(NSNotification *)notification {
[self.searchField setStringValue:@""];
self.searchField.stringValue = @"";
NSWindow *window = [self.searchField window];
/* Resign first responder form search field only if it was the first responder */
if(window.firstResponder == [self.searchField currentEditor]) {