Add dialog actions

This commit is contained in:
James Westman 2022-02-02 15:39:55 -06:00
parent bac008296a
commit 8ba898e354
10 changed files with 115 additions and 3 deletions

View file

@ -0,0 +1,8 @@
using Gtk 4.0;
Gtk.Dialog {
[action response=1]
Button {}
[action response=cancel]
Button cancel {}
}

16
tests/samples/actions.ui Normal file
View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkDialog">
<child type="action">
<object class="GtkButton" id="__1"></object>
</child>
<child type="action">
<object class="GtkButton" id="cancel"></object>
</child>
<action-widgets>
<action-widget response="1">__1</action-widget>
<action-widget response="cancel">cancel</action-widget>
</action-widgets>
</object>
</interface>