Merge branch 'ebassi/issues-4076' into 'master'

docs: Use code blocks for inline XML

Closes #4076

See merge request GNOME/gtk!3702
This commit is contained in:
Emmanuele Bassi 2021-06-27 15:10:15 +00:00
commit d8c416e8b2

View File

@ -95,6 +95,7 @@
* if you had more than a simple message in the dialog. * if you had more than a simple message in the dialog.
* *
* An example for simple `GtkDialog` usage: * An example for simple `GtkDialog` usage:
*
* ```c * ```c
* // Function to open a dialog box with a message * // Function to open a dialog box with a message
* void * void
@ -133,20 +134,21 @@
* The `GtkDialog` implementation of the `GtkBuildable` interface exposes the * The `GtkDialog` implementation of the `GtkBuildable` interface exposes the
* @content_area as an internal child with the name content_area. * @content_area as an internal child with the name content_area.
* *
* `GtkDialog` supports a custom <action-widgets> element, which can contain * `GtkDialog` supports a custom `<action-widgets>` element, which can contain
* multiple <action-widget> elements. The response attribute specifies a * multiple `<action-widget>` elements. The response attribute specifies a
* numeric response, and the content of the element is the id of widget * numeric response, and the content of the element is the id of widget
* (which should be a child of the dialogs @action_area). To mark a response * (which should be a child of the dialogs @action_area). To mark a response
* as default, set the defaultattribute of the <action-widget> element * as default, set the defaultattribute of the `<action-widget>` element
* to true. * to true.
* *
* `GtkDialog` supports adding action widgets by specifying action as * `GtkDialog` supports adding action widgets by specifying action as
* the typeattribute of a <child> element. The widget will be added * the typeattribute of a `<child>` element. The widget will be added
* either to the action area or the headerbar of the dialog, depending * either to the action area or the headerbar of the dialog, depending
* on the use-header-bar property. The response id has to be associated * on the use-header-bar property. The response id has to be associated
* with the action widget using the <action-widgets> element. * with the action widget using the `<action-widgets>` element.
* *
* An example of a `GtkDialog` UI definition fragment: * An example of a `GtkDialog` UI definition fragment:
*
* ```xml * ```xml
* <object class="GtkDialog" id="dialog1"> * <object class="GtkDialog" id="dialog1">
* <child type="action"> * <child type="action">