Move GUI layout code to Glade/GtkBuilder files

I saw some forum’s user tries to let interface change easier, but no success.

Do you want me to start moving dialogs to GtkBuilder files (it is a GTK native class)? They are editable by Glade app.
I don’t know if it changes anything for Windows or OSX building system.

1 Like

This would be awesome! I don’t think this influence much on Windows and OSX builds.

It would be nice to start by porting some simple dialogues - Preview Settings, Render Settings, Preferences Window are good candidates for that.

OK, I’ll do it then :slight_smile:

But I need to create new .cpp/.h files first. Do I really need to use that template available in synfig-studio/src?

IMHO that comments style is very dated and pollutes code readability instead of helping.
/* === S T A R T =========================================================== */

Modern text/source code editors have better fancy stuff to help us, like syntax highlighting.

1 Like

Done for Canvas Options

As good as it looks, there are some drawbacks using Glade:

  • It is harder to track modifications of the interface compared to source code (even if it is a xml file)
  • The format / available widgets set depend on Glade and GTK versions. Be sure to be totally compatible with current versions of libs used in current build system.
    After, this is just my personal opinion :wink:

But it is easier to change and see how it looks like, without recompiling and running the program/opening the dialog.
Editing layout by code is tedious and visualization is not trivial, because you create/instantiate widgets and after you pack into containers, making it difficult to follow.

Glade lets you test widget deprecation status according to a chosen GTK version (saved in XML file).
I set it to 3.0 in canvas_option.ui , but the first MS WIndows-ready was 3.4.

@rodolforg I am still support the idea of using Glade/GtkBuilder for GUI layout and your help is much appreciated!

Sorry for delay with reviewing PR, I will get to it ASAP.

But I need to create new .cpp/.h files first. Do I really need to use that template available in synfig-studio/src ?

I can’t say anything meaningful here, as I am not ready for taking decisions on that matter now. Let’s stick for template for now. :slight_smile: