Skip to content

GTK4: Replace deprecated container, layout and display APIs#1092

Open
Dev10-sys wants to merge 2 commits intosugarlabs:gtk4-portfrom
Dev10-sys:gtk4-vbox-hbox-migration
Open

GTK4: Replace deprecated container, layout and display APIs#1092
Dev10-sys wants to merge 2 commits intosugarlabs:gtk4-portfrom
Dev10-sys:gtk4-vbox-hbox-migration

Conversation

@Dev10-sys
Copy link
Copy Markdown
Contributor

This patch updates several deprecated GTK3 APIs to GTK4 equivalents across the Sugar shell.

Main changes include replacing Gdk.Screen with Gdk.Display and monitor geometry with proper guards and fallbacks, migrating Gtk.Alignment to Gtk.Box using halign, valign and margin properties, replacing Gtk.EventBox with Gtk.Box where appropriate, and updating container APIs such as add, pack_start and show_all to GTK4 compatible methods like append, set_child and show or present.

Deprecated modify_bg and modify_fg usage was replaced with CSS providers, and get_children usage was updated to GTK4-safe child iteration patterns. Gtk.Dialog content handling was updated to use get_content_area(), and Gtk.Bin usage was replaced where necessary.

These changes are mechanical GTK4 migration changes and are not intended to change functionality, only to keep existing behavior working while moving the codebase toward GTK4 compatibility.

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.

1 participant