summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Martín <mardani29@yahoo.es>2023-03-18 01:47:32 +0100
committerEli Zaretskii <eliz@gnu.org>2023-03-23 10:07:51 +0200
commitf0a2f37deec868751542f5b67fc9e545570172ae (patch)
treedb7820cb400cc27bd66aca16e4bb682f3904c081 /src
parent22de4b1e724da7ceadc117c0d4611ecf4bf589d1 (diff)
downloademacs-f0a2f37deec868751542f5b67fc9e545570172ae.tar.gz
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)
Diffstat (limited to 'src')
-rw-r--r--src/nsterm.m4
1 files changed, 4 insertions, 0 deletions
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
{