mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-05 16:09:07 -04:00
WIP: Add AdwMessageDialog support
Support AdwMessageDialog's custom XML.
This commit is contained in:
parent
08da6f79c7
commit
c5aeb9a16f
8 changed files with 156 additions and 0 deletions
12
tests/samples/responses.blp
Normal file
12
tests/samples/responses.blp
Normal file
|
@ -0,0 +1,12 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
Adw.MessageDialog {
|
||||
responses {
|
||||
cancel: _("Cancel"),
|
||||
discard: _("Discard") destructive,
|
||||
save: "Save" suggested disabled,
|
||||
}
|
||||
|
||||
response::save => on_response_save();
|
||||
}
|
12
tests/samples/responses.ui
Normal file
12
tests/samples/responses.ui
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="AdwMessageDialog">
|
||||
<responses>
|
||||
<response id="cancel" translatable="yes">Cancel</response>
|
||||
<response id="discard" translatable="yes" appearance="destructive">Discard</response>
|
||||
<response id="save" enabled="false" appearance="suggested">Save</response>
|
||||
</responses>
|
||||
<signal name="response::save" handler="on_response_save"/>
|
||||
</object>
|
||||
</interface>
|
Loading…
Add table
Add a link
Reference in a new issue