gtkglade

In GTK projects, what is the difference between a GtkBuilder '.ui' file and a '.glade' file?


I'm just starting with development of GTK applications, and took a look at some tutorials along with source code of established projects, and while tutorials designing interfaces use Glade to output '.glade' files, I see source code utilizing '.ui' files.

What is the difference here?


Solution

  • The file extension has no meaning and is best to ignore it but .ui is probably the more reasonable one for you to use though.

    Historically Glade used to provide its own format to design UIs and thus .glade was used. Many years ago GTK integrated its own solution called GtkBuilder and Glade was updated to also support this format. No maintained project in 2020 should be using the glade format but many people and old projects likely still use that file extension because the Glade save dialog still defaults to it I believe.