Skip to content

Conversation

@ptziegler
Copy link
Contributor

This restricts the GTK4-specific dialogs to only be executed when the system is using at least GTK 4.10. In all other cases, the (deprecated) implementation that was removed with the following commits has been restored:

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2025

Test Results

   502 files  ±0     502 suites  ±0   9m 27s ⏱️ - 1m 39s
 4 334 tests ±0   4 320 ✅ ±0   14 💤 ±0  0 ❌ ±0 
16 575 runs  ±0  16 466 ✅ ±0  109 💤 ±0  0 ❌ ±0 

Results for commit b046ad3. ± Comparison against base commit cd8bb13.

♻️ This comment has been updated with latest results.

@ptziegler ptziegler force-pushed the gtk4-guard-dialogs-behind-4.10 branch from 04ceeec to 467a797 Compare February 3, 2025 19:38
@akurtakov akurtakov force-pushed the gtk4-guard-dialogs-behind-4.10 branch from 467a797 to d781f48 Compare February 10, 2025 07:13
@akurtakov
Copy link
Member

akurtakov commented Feb 10, 2025

I have just tested(on gtk4-4.16.5-2.fc41) this patch with ControlExample Directory/FileDialog are fine but FontDialog crashes with:

Exception in thread "main" java.lang.IllegalArgumentException: Argument cannot be null
	at org.eclipse.swt.SWT.error(SWT.java:4913)
	at org.eclipse.swt.SWT.error(SWT.java:4847)
	at org.eclipse.swt.SWT.error(SWT.java:4818)
	at org.eclipse.swt.graphics.Font.<init>(Font.java:78)
	at org.eclipse.swt.widgets.FontDialog.open(FontDialog.java:214)
	at org.eclipse.swt.examples.controlexample.DialogTab.createButtonSelected(DialogTab.java:221)
	at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:83)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:286)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5857)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1652)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5067)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4519)
	at org.eclipse.swt.examples.controlexample.ControlExample.main(ControlExample.java:240)

@ptziegler ptziegler force-pushed the gtk4-guard-dialogs-behind-4.10 branch from d781f48 to 9932242 Compare February 10, 2025 18:22
@ptziegler
Copy link
Contributor Author

I have just tested(on gtk4-4.16.5-2.fc41) this patch with ControlExample Directory/FileDialog are fine but FontDialog crashes with:

You're right. I only tested the implementation with Snipet133, so I didn't notice the case in which the dialog is called without an initial font. I've added an additional NULL check in case no font data has been set.

This restricts the GTK4-specific dialogs to only be executed when the
system is using at least GTK 4.10. In all other cases, the (deprecated)
implementation that was removed with the following commits has been
restored:

- FontDialog: 10567bb
- FileDialog: 4179dc7
- DirectoryDialog: 2e61b4b
@akurtakov akurtakov force-pushed the gtk4-guard-dialogs-behind-4.10 branch from 9932242 to b046ad3 Compare February 11, 2025 06:39
@akurtakov
Copy link
Member

Thanks for the fast changes! This one is good to go in.

@akurtakov akurtakov merged commit 9cdf0e2 into eclipse-platform:master Feb 11, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants