Bug 543059 - [GTK3] Menu Item: accelerator display is inconsistent with other platforms
Summary: [GTK3] Menu Item: accelerator display is inconsistent with other platforms
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.10   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-12-27 06:13 EST by Thomas Singer CLA
Modified: 2020-12-25 08:17 EST (History)
3 users (show)

See Also:


Attachments
a slightly modified Snippet29 for reproducing the problem (1.01 KB, text/plain)
2018-12-27 06:14 EST, Thomas Singer CLA
no flags Details
Screenshot with setAccelerator invoked (5.76 KB, image/png)
2018-12-27 06:22 EST, Thomas Singer CLA
no flags Details
Screenshot without setAccelerator invoked (5.63 KB, image/png)
2018-12-27 06:22 EST, Thomas Singer CLA
no flags Details
Screenshot on Windows 10 (11.27 KB, image/png)
2018-12-27 06:23 EST, Thomas Singer CLA
no flags Details
Screenshot on macOS 10.14 (76.65 KB, image/png)
2018-12-27 06:35 EST, Thomas Singer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Singer CLA 2018-12-27 06:13:24 EST
Please launch the attached application on Linux (tried on CentOS 7, GTK 3.28.3): if menuItem.setAccelerator is invoked, it will show the set accelerator ignoring the text after the \t. If menuItem.setAccelerator is not invoked, it will show the one accelerator, but not the other. Since we are not using accelerators but rather key listeners in our application, this causes the accelerators to only partly be shown.
Comment 1 Thomas Singer CLA 2018-12-27 06:14:30 EST
Created attachment 277007 [details]
a slightly modified Snippet29 for reproducing the problem
Comment 2 Thomas Singer CLA 2018-12-27 06:22:11 EST
Created attachment 277008 [details]
Screenshot with setAccelerator invoked
Comment 3 Thomas Singer CLA 2018-12-27 06:22:26 EST
Created attachment 277009 [details]
Screenshot without setAccelerator invoked
Comment 4 Thomas Singer CLA 2018-12-27 06:23:46 EST
Created attachment 277010 [details]
Screenshot on Windows 10
Comment 5 Thomas Singer CLA 2018-12-27 06:35:00 EST
Created attachment 277011 [details]
Screenshot on macOS 10.14
Comment 6 Eric Williams CLA 2019-01-02 10:21:28 EST
I can reproduce the issue with GTK3.24/Fedora 29, using SWT from master as of today.
Comment 7 Eric Williams CLA 2019-01-03 15:15:51 EST
The other screenshots you have posted, do they show the behaviour with or without the accelerator invoked?
Comment 8 Eric Williams CLA 2019-01-04 16:59:32 EST
There is definitely a bug in SWT here: MenuItem.setText() doesn't work for mnemonics that don't start with a valid modifier (Ctrl/Shift/etc.). This is fixable and will solve the issue of the MenuItem's accelerator text from being blank.

There is however a platform difference: once this is fixed, the MenuItem's accelerator text will only read "/". This is because GTK only accepts modifier keys for combination inputs, and Numpad/Keypad is not a modifier key.
Comment 9 Eclipse Genie CLA 2020-12-25 04:48:50 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 10 Thomas Singer CLA 2020-12-25 08:17:24 EST
still a problem