diff options
author | Alan Third <alan@idiocy.org> | 2021-08-25 19:50:27 +0100 |
---|---|---|
committer | Alan Third <alan@idiocy.org> | 2021-08-31 20:50:12 +0100 |
commit | e8bd0b720ab71e4ba884891bbe3dd1b1fa740298 (patch) | |
tree | 12ea8b3aa825d898fe255c6dd437856fc7e3c8d5 | |
parent | 4ef7ac18ac319921f3f7df34dd957b4941e66db2 (diff) | |
download | emacs-e8bd0b720ab71e4ba884891bbe3dd1b1fa740298.tar.gz |
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.
-rw-r--r-- | src/nsmenu.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nsmenu.m b/src/nsmenu.m index 0e271e2197b..0d0b2f60c93 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 */ |