GTK3 to GTK4 UI migration

I have some GTK3 layouts, made with glade, for a GTK3 application. But when I tried to migrate to the fourth version, I faces with a lot of problems:

  1. gtk4-builder-tool simplify --3to4 did nothing: it returned the same UI file with multiple errors like parameter not found in GtkSomeComponent. Installing libgtk3 packages changed nothing
  2. I can’t do anything with Cambalache designer: it is absolutely laggy(when I add widget or change anything it freezes for a minute to apply the operation) and it’s projects are useless in GTK (are only compiled inside of Cambalache)

What shall I do to use and edit my GTK3 layouts in new GTK4?

Hi there!

Regarding 1 - gtk4-builder-tool … yeah, I tried to use this to migrate a relatively complex UI layout … doing a lot of manual search + replace … retrying running it. I ended up deciding it was much simpler to just start again. Further, as glade seems to be effectively abandoned ( correct me if I’m wrong ) … it’s probably not a bad idea to move to another tool and learn to use it by starting again.

Regarding 2 - Cambalache has been pretty bug-free for me. It’s obviously not complete yet, but it does what I need. How did you install it? Did you try the flatpak version? Oh - you can export Cambalache projects back to builder XML files.

I think it is planned for GNOME Builder (IDE) to, at some point, have a UI editor. Even if it does receive that feature, it will not be soon it seems.

So, the current solution is to use Blueprint instead. It is not the same as GUI tool but it is far better than writing XML by hand.


For prototyping XML and blueprint files there is also Workbench.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.