gtk4-builder-toolGTKDeveloperMatthiasClasengtk4-builder-tool1User Commandsgtk4-builder-toolGtkBuilder file utilitygtk4-builder-toolCOMMANDOPTIONFILEDescriptiongtk4-builder-tool can perform various operations
on GtkBuilder .ui files.
The command validates the .ui file and reports
errors to stderr.
The command lists all the named objects that
are created in the .ui file.
The command displays the .ui file. This command
accepts options to specify the ID of the toplevel object and a .css file
to use.
The command simplifies the .ui file by removing
properties that are set to their default values and writes the resulting XML
to stdout, or back to the input file.
When the is specified,
interprets the input as a GTK 3 ui file and attempts to convert it to GTK 4
equivalents. It performs various conversions, such as renaming properties,
translating child properties to layout properties, rewriting the setup for
GtkNotebook, GtkStack, GtkAssistant or changing toolbars into boxes.
You should always test the modified .ui files produced by gtk4-builder-tool
before using them in production.
Note in particular that the conversion
done with is meant as a starting point for a port
from GTK 3 to GTK 4. It is expected that you will have to do manual fixups
after the initial conversion.
Simplify OptionsThe command accepts the following options:Write the content back to the .ui file instead of stdout.Transform a GTK 3 ui file to GTK 4Preview OptionsThe command accepts the following options:The ID of the object to preview. If not specified,
gtk4-builder-tool will choose a suitable object on its own.Load style information from the given .css file.