[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 89749a6 5/7: Make NS toolbar item ID more unique (bug#50160)
From: |
Alan Third |
Subject: |
master 89749a6 5/7: Make NS toolbar item ID more unique (bug#50160) |
Date: |
Wed, 22 Dec 2021 15:49:23 -0500 (EST) |
branch: master
commit 89749a62b51e19a39f145a1985ae5992c58c6776
Author: Alan Third <alan@idiocy.org>
Commit: Alan Third <alan@idiocy.org>
Make NS toolbar item ID more unique (bug#50160)
* src/nsmenu.m
([EmacsToolbar
addDisplayItemWithImage:idx:tag:labelText:helpText:enabled:]):
Add the label to the identifier to avoid collisions between toolbar
items that use the same image.
---
src/nsmenu.m | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nsmenu.m b/src/nsmenu.m
index f42cd38..d153866 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1255,8 +1255,8 @@ update_frame_tool_bar (struct frame *f)
NSTRACE ("[EmacsToolbar addDisplayItemWithImage: ...]");
/* 1) come up w/identifier */
- NSString *identifier
- = [NSString stringWithFormat: @"%lu", (unsigned long)[img hash]];
+ NSString *identifier = [NSString stringWithFormat: @"%lu%@",
+ (unsigned long)[img hash], label];
[activeIdentifiers addObject: identifier];
/* 2) create / reuse item */
- master updated (5b0121b -> ec1312d), Alan Third, 2021/12/22
- master 0f427be 1/7: Simplify NS color handling, Alan Third, 2021/12/22
- master 89749a6 5/7: Make NS toolbar item ID more unique (bug#50160),
Alan Third <=
- master 11c0b25 2/7: Further cleanup of NS color code, Alan Third, 2021/12/22
- master 42601d3 4/7: Make NS toolbar use NSString instead of C strings, Alan Third, 2021/12/22
- master ec1312d 7/7: Add native HEIC support on macOS (bug#51381), Alan Third, 2021/12/22
- master ab0d7a2 6/7: Allow resizing undecorated frames on macOS (bug#28512, bug#31795), Alan Third, 2021/12/22
- master 308ad05 3/7: Fix macfont backend color handling, Alan Third, 2021/12/22