MenuItem.setImage() GTK4 fix.
ImageSet() fix for GTK4. #2299 Previously ImageSet() returned null on GTK4, This is an implementation of ImageSet() for GTK4.
To test:
- Ensure GTK4 is forced with "SWT_GTK4 = 1" environment variable in ControlExample.
- Start ControlExample -> Click "Menu" -> Check "Images" -> Click "Create Shell"
If Cascade dropdown has icons then the change is working.
Test Results
118 files ±0 118 suites ±0 11m 41s ⏱️ +53s 4 583 tests ±0 4 547 ✅ ±0 36 💤 ±0 0 ❌ ±0 330 runs ±0 307 ✅ ±0 23 💤 ±0 0 ❌ ±0
Results for commit d3ad875b. ± Comparison against base commit 12ac449f.
:recycle: This comment has been updated with latest results.
@Theo-Dann-Muirhead-Renesas It looks like some part of your commit may be missing as build fails with:
Error: The method gtk_reorder_child_after(long, long, int) is undefined for the type GTK4
Did you have a change to GTK4.java that should be included here?
The full error is here, quoted below:
Error: Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:5.0.0:compile (default-compile) on project org.eclipse.swt.gtk.linux.ppc64le: Compilation failure: Compilation failure:
Error: /home/runner/work/eclipse.platform.swt/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java:[1065]
Error: GTK4.gtk_reorder_child_after(boxHandle, imageHandle, 0);
Error: ^^^^^^^^^^^^^^^^^^^^^^^
Error: The method gtk_reorder_child_after(long, long, int) is undefined for the type GTK4
Error: /home/runner/work/eclipse.platform.swt/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java:[1095]
Error: GTK4.gtk_box_remove(boxHandle, imageHandle);
Error: ^^^^^^^^^^^^^^
Error: The method gtk_box_remove(long, long) is undefined for the type GTK4
Error: /home/runner/work/eclipse.platform.swt/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java:[1103]
Error: GTK4.gtk_box_remove(boxHandle, imageHandle);
Error: ^^^^^^^^^^^^^^
Error: The method gtk_box_remove(long, long) is undefined for the type GTK4
Error: [ERROR] 5 problems (3 errors, 2 warnings)
Error: -> [Help 1]
Yes, I missed that two methods were not originally included
Please resolve the conflicts with master.
As you can see by the failing check - merge commits are not welcome, so please rebase on master without merge commits.
I guess all the ImageSet() in the commit message should really be setImage(), right ?
There are conflicts with master, please always rebase on master before pushing new version.