Skip to content

Conversation

@laeubi
Copy link
Contributor

@laeubi laeubi commented Oct 31, 2025

  • 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.


- 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>
@github-actions
Copy link
Contributor

Test Results

  118 files  ±0    118 suites  ±0   15m 43s ⏱️ +14s
4 650 tests ±0  4 633 ✅ ±0  17 💤 ±0  0 ❌ ±0 
  330 runs  ±0    326 ✅ ±0   4 💤 ±0  0 ❌ ±0 

Results for commit f267894. ± Comparison against base commit d3574fc.

Copy link
Contributor

@jonahgraham jonahgraham left a 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. */
Copy link
Contributor

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.

@jonahgraham
Copy link
Contributor

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:

	/** @method flags=no_gen
	 * @category custom
	 */

@laeubi
Copy link
Contributor Author

laeubi commented Oct 31, 2025

@jonahgraham thanks for the pointer I'll take a look to find out what would be the proper way here.

@akurtakov
Copy link
Member

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

@akurtakov akurtakov closed this Nov 4, 2025
@akurtakov
Copy link
Member

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).

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.

3 participants