mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Accept string literals for parseable types
GtkBuilder knows some class-specific parsing methods, so we can use string literals for these types and pass them straight to the XML.
This commit is contained in:
parent
3804d91118
commit
2130c78da9
4 changed files with 29 additions and 4 deletions
5
tests/samples/parseable.blp
Normal file
5
tests/samples/parseable.blp
Normal file
|
@ -0,0 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Gtk.Shortcut {
|
||||
trigger: "Escape";
|
||||
}
|
7
tests/samples/parseable.ui
Normal file
7
tests/samples/parseable.ui
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkShortcut">
|
||||
<property name="trigger">Escape</property>
|
||||
</object>
|
||||
</interface>
|
|
@ -104,6 +104,7 @@ class TestSamples(unittest.TestCase):
|
|||
self.assert_sample("layout")
|
||||
self.assert_sample("menu")
|
||||
self.assert_sample("object_prop")
|
||||
self.assert_sample("parseable")
|
||||
self.assert_sample("property")
|
||||
self.assert_sample("signal")
|
||||
self.assert_sample("size_group")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue