| Summary: | [GTK2][Menu] no menu item added. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Thomas Singer <eclipse> | ||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||
| Status: | RESOLVED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | akurtakov, ericwill | ||||
| Version: | 4.5 | Keywords: | triaged | ||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 530841 | ||||||
| Attachments: |
|
||||||
Created attachment 257159 [details]
Modified Snippet117
I can't reproduce this issue on Gtk2 or Gtk3 -- both with Mars.1 and Neon nightly (20151001). I've attached this Snippet to indicate this.
The problem is not easily reproducible, otherwise we would have tons of bug reports. Without a working reproducer there isn't much we can do to fix such problem so please try coming with one. I think, what you actually can do is to add an assertion that after adding a menu item the item count actually increased. It's a bit not clear as to whether this is gtk2 specific or occurs on Gtk3 also. Triaging Gtk2-only bugs. Please see Bug 530841 for details. If this bug is not gtk2-specific, i.e, it also occurs on Gtk3, please indicate and I'll update the bug accordingly. Thank you for your bug submission. Please note: GTK2 support for SWT is being dropped in Eclipse 4.10 / SimRel 2018-12 release. See the following mail for more info: http://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg15783.html Marking the bug as wontfix as no work for GTK2 issues will happen. Please reopen if you still face the issue using GTK 3.x. |
We have code where a Menu is filled, if nothing has been added an disabled menu item is added, e.g. public void fill(Menu menu) { doFill(menu); if (menu.getItemCount() == 0) { final MenuItem menuItem = new MenuItem(menu, SWT.PUSH); menuItem.setText("Nothing"); menuItem.setEnabled(false); } finish(menu); } private void finish(Menu menu) { if (menu.getItemCount() == 0) { throw new OurAssertException(); } ... } From time to time we are getting bug reports (only for Linux) that this assertion in finish() failed. Unfortunately, I don't have a reproducible snippet.