-
Notifications
You must be signed in to change notification settings - Fork 187
[GTK4] Migrate deprecated ColorChooser to ColorDialog #1629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GTK4] Migrate deprecated ColorChooser to ColorDialog #1629
Conversation
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
Show resolved
Hide resolved
7a4a404 to
6cd388f
Compare
6cd388f to
c5f57d4
Compare
|
Would you please rebase on master and remove the draft if you agree that it's time to get this one in. |
c5f57d4 to
f041bb4
Compare
I only wanted to revisit the issue with the modal dialog but that has now been fixed. I don't see any (additional) warnings when trying out the snippets so I think this is done for now. |
|
There is one fundamental problem - the gtk_color_dialog calls are guarded with if( GTK4) blocks but they are introduced in gtk 4.10 so these symbols will simply fail to load (hard crash) if swt is run on gtk 4.0-4.8. |
|
Now I realize I missed the same problem in #1583 so we will have to redo it too. |
I was just about to ask about the Font/Dialog chooser. I can have a look at it over the weekend. |
f041bb4 to
0fde631
Compare
|
I've also updated this PR to guard the ColorDialog API behind a "GTK 4.10" check. This should avoid the crash with older GTK4 versions. |
The Color Chooser has been moved to the GTK3 class and all references inside the GTK4 blocks have been updated to use the new API. Note that the GTK4 API doesn't provide the means to set a custom palette, meaning that the colors specified with setRGBS(RGB[]) are effectively ignored.
0fde631 to
d9df766
Compare
|
This one is good to go. |


The Color Chooser has been moved to the GTK3 class and all references inside the GTK4 blocks have been updated to use the new API.
Note that the GTK4 API doesn't provide the means to set a custom palette, meaning that the colors specified with setRGBS(RGB[]) are effectively ignored.