mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
tests: add tests for action widget syntax
This commit is contained in:
parent
736681a841
commit
d9ef1d4df9
17 changed files with 120 additions and 0 deletions
18
tests/samples/action_widgets.blp
Normal file
18
tests/samples/action_widgets.blp
Normal 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");
|
||||
}
|
||||
}
|
26
tests/samples/action_widgets.ui
Normal file
26
tests/samples/action_widgets.ui
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue