Skip to content

Many improvements and GTK4 Jukebox upgrade

Davin Ockerby requested to merge PlatinumLucario/Bassoon:develop into develop

With this MR, it contains many changes, including a full upgrade of the Jukebox to GTK4, and a full workflow that will package the libraries with all their native dependencies.

A big thanks to Fangjun Kuang for making the python script for packaging the libraries. The repo that contains it, can be found here here. It also comes with a bug fix: It will now make any directories, if the needed directories don't exist, so that the runtime.csproj files can be generated.

And as I mentioned before, the Jukebox sample project is now upgraded to GTK4 and runs the GTK4 libraries via Gir.Core bindings. And with that, comes a few changes:

  • The Jukebox.glade file (made by the Glade UI designer tool) was identical to a .ui file, but after renaming it to Jukebox.ui and running it through the gtk-build upgrade tool, it became GTK4 compliant, but it wasn't ready to run yet at the time, since it had to be imported into Cambalache, the successor UI designer to Glade! After the fixes were done, the Jukebox.ui file now works.
  • Some events and widgets had to be replaced, including:
    • FileChooserButton - GTK4 removed the widget, so it had to be remade with a Gtk.Button, Gtk.Box, Gtk.Label and a Gtk.Image, along with the addition of a FileDialog (for GTK 4.9 and later) and a Gtk.FileChooserNative (for GTK 4.0 to 4.8).
    • ButtonReleaseEvent - This, along with every signal had to be removed from the Jukebox.ui, since signals can no longer be done in the .ui files. So they were written into Jukebox.cs instead, however ButtonReleaseEvent was completely removed in GTK4, so instead, Gtk.GestureClick had to be used replace the event signal, and it's now handled in a Gtk.EventController class.
  • Removal of all GtkSharp-specific functions, since they weren't present in the native GTK libraries and only complicated stuff further, when there already was plenty of callbacks to use.

I really hope to continue improving this repo further, so it can be used in many projects in the future.

Merge request reports