Merge branch 'ebassi/glade-docs' into 'main'

docs: Remove mentions of Glade

See merge request GNOME/gtk!5168
This commit is contained in:
Matthias Clasen 2022-10-25 00:39:57 +00:00
commit 114e2b607b
2 changed files with 23 additions and 15 deletions

View File

@ -8,8 +8,7 @@ are organized in a hierarchy. The window widget is the main container.
The user interface is then built by adding buttons, drop-down menus, input The user interface is then built by adding buttons, drop-down menus, input
fields, and other widgets to the window. If you are creating complex user fields, and other widgets to the window. If you are creating complex user
interfaces it is recommended to use GtkBuilder and its GTK-specific markup interfaces it is recommended to use GtkBuilder and its GTK-specific markup
description language, instead of assembling the interface manually. You can description language, instead of assembling the interface manually.
also use a visual user interface editor, like [Glade](https://glade.gnome.org/).
GTK is event-driven. The toolkit listens for events such as a click GTK is event-driven. The toolkit listens for events such as a click
on a button, and passes the event to your application. on a button, and passes the event to your application.
@ -712,11 +711,20 @@ A common location to install UI descriptions and similar data is
`/usr/share/appname`. `/usr/share/appname`.
It is also possible to embed the UI description in the source code as a It is also possible to embed the UI description in the source code as a
string and use [`method@Gtk.Builder.add_from_string`] to load it. But keeping the string and use [`method@Gtk.Builder.add_from_string`] to load it. But keeping
UI description in a separate file has several advantages: It is then possible the UI description in a separate file has several advantages:
to make minor adjustments to the UI without recompiling your program, and,
more importantly, graphical UI editors such as [Glade](http://glade.gnome.org) - it is possible to make minor adjustments to the UI without recompiling your
can load the file and allow you to create and modify your UI by point-and-click. program
- it is easier to isolate the UI code from the business logic of your
application
- it is easier to restructure your UI into separate classes using composite
widget templates
Using [GResource](https://docs.gtk.org/gio/struct.Resource.html) it is possible
to combine the best of both worlds: you can keep the UI definition files
separate inside your source code repository, and then ship them embedded into
your application.
## Building applications ## Building applications

View File

@ -321,14 +321,14 @@
* The interface description semantics expected in composite template descriptions * The interface description semantics expected in composite template descriptions
* is slightly different from regular [class@Gtk.Builder] XML. * is slightly different from regular [class@Gtk.Builder] XML.
* *
* Unlike regular interface descriptions, [method@Gtk.WidgetClass.set_template] will * Unlike regular interface descriptions, [method@Gtk.WidgetClass.set_template]
* expect a `<template>` tag as a direct child of the toplevel `<interface>` * will expect a `<template>` tag as a direct child of the toplevel
* tag. The `<template>` tag must specify the class attribute which must be * `<interface>` tag. The `<template>` tag must specify the class attribute
* the type name of the widget. Optionally, the parent attribute may be * which must be the type name of the widget. Optionally, the parent
* specified to specify the direct parent type of the widget type, this is * attribute may be specified to specify the direct parent type of the widget
* ignored by `GtkBuilder` but required for UI design tools like * type; this is ignored by `GtkBuilder` but can be used by UI design tools to
* [Glade](https://glade.gnome.org/) to introspect what kind of properties and * introspect what kind of properties and internal children exist for a given
* internal children exist for a given type when the actual type does not exist. * type when the actual type does not exist.
* *
* The XML which is contained inside the `<template>` tag behaves as if it were * The XML which is contained inside the `<template>` tag behaves as if it were
* added to the `<object>` tag defining the widget itself. You may set properties * added to the `<object>` tag defining the widget itself. You may set properties