tests: add tests for action widget syntax

This commit is contained in:
Gleb Smirnov 2022-02-18 19:04:08 +03:00
parent 736681a841
commit d9ef1d4df9
No known key found for this signature in database
GPG key ID: 559DB6D1D625EFAB
17 changed files with 120 additions and 0 deletions

View file

@ -0,0 +1,18 @@
using Gtk 4.0;
Dialog {
[action response=cancel]
Button cancel_button {
label: _("Cancel");
}
[action reponse=9]
Button custom_response_button {
label: _("Reinstall Windows");
}
[action response=ok default]
Button ok_button {
label: _("Ok");
}
}

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkDialog">
<child type="action">
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="true">Cancel</property>
</object>
</child>
<child type="action">
<object class="GtkButton" id="custom_response_button">
<property name="label" translatable="true">Reinstall Windows</property>
</object>
</child>
<child type="action">
<object class="GtkButton" id="ok_button">
<property name="label" translatable="true">Ok</property>
</object>
</child>
<action-widgets>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="9">custom_response_button</action-widget>
<action-widget response="ok" default="True">ok_button</action-widget>
</action-widgets>
</object>
</interface>