[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/ns/testing e8bd0b7 5/6: Make NS toolbar item ID more unique (bug
From: |
Alan Third |
Subject: |
scratch/ns/testing e8bd0b7 5/6: Make NS toolbar item ID more unique (bug#50160) |
Date: |
Tue, 31 Aug 2021 15:51:15 -0400 (EDT) |
branch: scratch/ns/testing
commit e8bd0b720ab71e4ba884891bbe3dd1b1fa740298
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 0e271e2..0d0b2f6 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1196,8 +1196,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 e66bb00), Alan Third, 2021/08/31
- scratch/ns/testing 32fbd55 3/6: Fix macfont backend color handling, Alan Third, 2021/08/31
- scratch/ns/testing e66bb00 6/6: Allow resizing undecorated frames on macOS (bug#28512, bug#31795), Alan Third, 2021/08/31
- scratch/ns/testing f7ada2d 2/6: Further cleanup of NS color code, Alan Third, 2021/08/31
- scratch/ns/testing 4ef7ac1 4/6: Make NS toolbar use NSString instead of C strings, Alan Third, 2021/08/31
- scratch/ns/testing e8bd0b7 5/6: Make NS toolbar item ID more unique (bug#50160),
Alan Third <=
- scratch/ns/testing 9ba21bc 1/6: Simplify NS color handling, Alan Third, 2021/08/31