GTK+ Reference Manual |
---|
Since version 2.12, GTK+ provides GtkBuilder to construct user interfaces from XML descriptions, similar to the functionality provided by GladeXML in the libglade library.
A good way to start a migration from libglade to GtkBuilder is
to run the gtk-builder-convert
utility on your glade file, and inspect the resulting output.
If your code uses the root
parameter of glade_xml_new()
, you
may want to split your glade file into multiple GtkBuilder files
by using the --root
option of
gtk-builder-convert. Alternatively, you
can use gtk_builder_add_objects_from_file()
to construct only certain
objects from a GtkBuilder file.
While GtkBuilder strives to be a complete replacement for libglade, there are a number of areas where it is currently still behind libglade:
GtkBuilder supports context information in translatable properties in a slightly different way than libglade. Intltool does not yet support this; see bug 454894 for the current status of intltool support for GtkBuilder files. Thankfully, context in translations is a rarely used feature, and if you are not using it, intltools glade format support works just fine for GtkBuilder files.
More details about migrating from libglade to GtkBuilder will appear here over time...