-
Notifications
You must be signed in to change notification settings - Fork 185
Fix some GTK4 deprecation warning #2726
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
Conversation
- Replace gtk_widget_get_allocation with gtk_widget_compute_bounds (with GTK4 version check) - Replace gtk_css_provider_load_from_data with gtk_css_provider_load_from_string - Replace gtk_widget_translate_coordinates with gtk_widget_compute_point These changes reduce GTK4 deprecation warnings from 159 to 156. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the method is no longer used in the Java side, that would solve the deprecation issue.
| *******************************************************************************/ | ||
|
|
||
| /* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */ | ||
| /* DO NOT EDIT - your changes will be lost. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@laeubi these files are auto generated from GTK4.java and OS.java respectively, so the changes should be made at the Java level for this.
|
PS If the problem really needs to be solved in the C code, then it needs to be added to os_custom.c and in OS.java set: |
|
@jonahgraham thanks for the pointer I'll take a look to find out what would be the proper way here. |
|
Closing this one as it manually changes two files that should be auto generated and does so wrong e.g. binding for gtk_css_provider_load_from_data calling gtk_css_provider_load_from_string |
|
Tip: gtk_css_provider_load_from_string/bytes has a since 4.12 while SWT still supports 4.0 (or at least claims to do so). |
These changes reduce GTK4 deprecation warnings from 159 to 156.