From f0a2f37deec868751542f5b67fc9e545570172ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=ADn?= Date: Sat, 18 Mar 2023 01:47:32 +0100 Subject: [PATCH] Fix toolbar item validation in the NS port * src/nsterm.m ([EmacsView validateToolbarItem:]): Implement this NSToolbarItemValidation method, which is called by AppKit when it needs to validate an image item in a toolbar. This solves, in particular, the problem with having the "Save" icon on the tool bar enabled at Emacs startup. (Bug#62234) --- src/nsterm.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nsterm.m b/src/nsterm.m index 4180cdc9e7f..c9f955000ac 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8581,6 +8581,10 @@ ns_in_echo_area (void) return self; } +- (BOOL) validateToolbarItem: (NSToolbarItem *) toolbarItem +{ + return [toolbarItem isEnabled]; +} - (instancetype)toggleToolbar: (id)sender { -- 2.39.5