docs: Use code blocks for inline XML

Otherwise the markdown renderer will just ignore them.

Fixes: #4076
This commit is contained in:
Emmanuele Bassi 2021-06-27 15:25:18 +01:00
parent 85cb5509c4
commit 9bf3724d25

View File

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