diff --git a/NEWS.md b/NEWS.md index ef294b7..706f4f0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,3 @@ -# v0.11.0 - -- Added support for [Adw.AlertDialog](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.AlertDialog.html#adwalertdialog-as-gtkbuildable) custom syntax. - # v0.10.0 ## Added diff --git a/docs/reference/extensions.rst b/docs/reference/extensions.rst index 86cfe62..744326f 100644 --- a/docs/reference/extensions.rst +++ b/docs/reference/extensions.rst @@ -15,7 +15,8 @@ Properties are the main way to set values on objects, but they are limited by th .. rst-class:: grammar-block Extension = :ref:`ExtAccessibility` - | :ref:`ExtAdwResponseDialog` + | :ref:`ExtAdwAlertDialog` + | :ref:`ExtAdwMessageDialog` | :ref:`ExtAdwBreakpoint` | :ref:`ExtComboBoxItems` | :ref:`ExtFileFilterMimeTypes` @@ -63,34 +64,7 @@ Defines the condition for a breakpoint and the properties that will be set at th The `Adw.Breakpoint:condition `_ property has type `Adw.BreakpointCondition `_, which GtkBuilder doesn't know how to parse from a string. Therefore, the ``condition`` syntax is used instead. -.. _Syntax ExtAdwResponseDialog: - -Adw.MessageDialog Responses ----------------------------- - -.. rst-class:: grammar-block - - ExtAdwResponseDialog = 'responses' '[' (ExtAdwResponseDialogResponse),* ']' - ExtAdwResponseDialogResponse = `> ':' :ref:`StringValue` ExtAdwResponseDialogFlag* - ExtAdwResponseDialogFlag = 'destructive' | 'suggested' | 'disabled' - -Valid in `Adw.MessageDialog `_. - -The ``responses`` block defines the buttons that will be added to the dialog. The ``destructive`` or ``suggested`` flag sets the appearance of the button, and the ``disabled`` flag can be used to disable the button. - -.. code-block:: blueprint - - using Adw 1; - - Adw.MessageDialog { - responses [ - cancel: _("Cancel"), - delete: _("Delete") destructive, - save: "Save" suggested, - wipeHardDrive: "Wipe Hard Drive" destructive disabled, - ] - } - +.. _Syntax ExtAdwAlertDialog: Adw.AlertDialog Responses ---------------------------- @@ -119,6 +93,35 @@ The ``responses`` block defines the buttons that will be added to the dialog. Th } +.. _Syntax ExtAdwMessageDialog: + +Adw.MessageDialog Responses +---------------------------- + +.. rst-class:: grammar-block + + ExtAdwMessageDialog = 'responses' '[' (ExtAdwMessageDialogResponse),* ']' + ExtAdwMessageDialogResponse = `> ':' :ref:`StringValue` ExtAdwMessageDialogFlag* + ExtAdwMessageDialogFlag = 'destructive' | 'suggested' | 'disabled' + +Valid in `Adw.MessageDialog `_. + +The ``responses`` block defines the buttons that will be added to the dialog. The ``destructive`` or ``suggested`` flag sets the appearance of the button, and the ``disabled`` flag can be used to disable the button. + +.. code-block:: blueprint + + using Adw 1; + + Adw.MessageDialog { + responses [ + cancel: _("Cancel"), + delete: _("Delete") destructive, + save: "Save" suggested, + wipeHardDrive: "Wipe Hard Drive" destructive disabled, + ] + } + + .. _Syntax ExtComboBoxItems: Gtk.ComboBoxText Items