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)
This commit is contained in:
Daniel Martín 2023-03-18 01:47:32 +01:00 committed by Eli Zaretskii
parent 22de4b1e72
commit f0a2f37dee

View file

@ -8581,6 +8581,10 @@ - (instancetype)toolbarClicked: (id)item
return self;
}
- (BOOL) validateToolbarItem: (NSToolbarItem *) toolbarItem
{
return [toolbarItem isEnabled];
}
- (instancetype)toggleToolbar: (id)sender
{