gtk4-builder-toolgtk4-builder-tool — GtkBuilder file utility |
Synopsis
gtk4-builder-tool
[COMMAND
] [OPTION
...] FILE
Description
gtk4-builder-tool can perform various operations on GtkBuilder .ui files.
The validate
command validates the .ui file and reports
errors to stderr.
The enumerate
command lists all the named objects that
are created in the .ui file.
The preview
command displays the .ui file. This command
accepts options to specify the ID of the toplevel object and a .css file
to use.
The simplify
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 --3to4
is specified, simplify
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 --3to4
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.