emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 f0a2f37deec: Fix toolbar item validation in the NS port


From: Eli Zaretskii
Subject: emacs-29 f0a2f37deec: Fix toolbar item validation in the NS port
Date: Thu, 23 Mar 2023 04:09:18 -0400 (EDT)

branch: emacs-29
commit f0a2f37deec868751542f5b67fc9e545570172ae
Author: Daniel Martín <mardani29@yahoo.es>
Commit: Eli Zaretskii <eliz@gnu.org>

    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
 {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]