[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/ns/testing 7d2c360 6/7: Make NS toolbar item ID more unique (bug
From: |
Alan Third |
Subject: |
scratch/ns/testing 7d2c360 6/7: Make NS toolbar item ID more unique (bug#50160) |
Date: |
Sun, 14 Nov 2021 13:50:27 -0500 (EST) |
branch: scratch/ns/testing
commit 7d2c360a6b4450107beeb9be55d1bc0266c52201
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 */
- branch scratch/ns/testing created (now 6ab3dc1), Alan Third, 2021/11/14
- scratch/ns/testing 2dd414a 2/7: Simplify NS color handling, Alan Third, 2021/11/14
- scratch/ns/testing 5e4ba5c 1/7: Only set LANG if the ID is valid, Alan Third, 2021/11/14
- scratch/ns/testing 9eadfb7 5/7: Make NS toolbar use NSString instead of C strings, Alan Third, 2021/11/14
- scratch/ns/testing 7d2c360 6/7: Make NS toolbar item ID more unique (bug#50160),
Alan Third <=
- scratch/ns/testing bc3b8f3 3/7: Further cleanup of NS color code, Alan Third, 2021/11/14
- scratch/ns/testing ee8e8af 4/7: Fix macfont backend color handling, Alan Third, 2021/11/14
- scratch/ns/testing 6ab3dc1 7/7: Allow resizing undecorated frames on macOS (bug#28512, bug#31795), Alan Third, 2021/11/14