GtkShortcutsWindow that worked in GTK3 is broken in GTK4
In GTK3, Container.add()
with a ShortcutsSection
would work and link up everything properly between the Window and Section.
In GTK4, Window.set_child()
does nothing of the sort: only GtkBuilder
/Buildable
can make this work properly, by calling static void gtk_shortcuts_window_add_section()
. set_child()
results in broken rendering (no size groups around widgets), warnings (about search, and about signal handling on close)... etc.
This is a pain for code being migrated from GTK3 to GTK4, which builds up shortcuts windows programmatically - something that, I know, is not well-supported since these widgets are wildly barebones and only recommended for use via GtkBuilder
- but which did work OK as long as certain byzantine ordering dances etc were done.
I see an issue saying the shortcuts widgets might go away entirely in GTK5. OK, but in the meantime, will an MR be accepted that will bring their functionality at least to par with the limited amount in GTK3? So migrating on this path won't break instantly. I'm happy to try it!