mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
xml: Fix flags and enums
GtkBuilder XML uses enum nicknames, full names, or integer values, but we accept GIR names, so passing those through doesn't work if the name has an underscore (which traditionally turns into a dash in the nickname). Avoid the problem by always writing the integer value of the enum member.
This commit is contained in:
parent
51d8969ced
commit
6c67e1fc5a
11 changed files with 34 additions and 14 deletions
|
@ -5,7 +5,7 @@
|
|||
<accessibility>
|
||||
<property name="label" translatable="true">Hello, world!</property>
|
||||
<relation name="labelled-by">my_label</relation>
|
||||
<state name="checked">true</state>
|
||||
<state name="checked">1</state>
|
||||
</accessibility>
|
||||
</object>
|
||||
<object class="GtkLabel" id="my_label"></object>
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="window-placement">top-left</property>
|
||||
<property name="window-placement">0</property>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GApplication">
|
||||
<property name="flags">is_service|handles_open</property>
|
||||
<property name="flags">1|4</property>
|
||||
</object>
|
||||
<object class="GtkEventControllerScroll">
|
||||
<property name="flags">vertical</property>
|
||||
<property name="flags">1</property>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="orientation">1</property>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkSizeGroup">
|
||||
<property name="mode">horizontal</property>
|
||||
<property name="mode">1</property>
|
||||
<widgets>
|
||||
<widget name="label"/>
|
||||
<widget name="button"/>
|
||||
|
|
|
@ -153,7 +153,7 @@ class TestSamples(unittest.TestCase):
|
|||
self.assert_sample("enum")
|
||||
self.assert_sample("expr_lookup", skip_run=True) # TODO: Fix
|
||||
self.assert_sample("file_filter")
|
||||
self.assert_sample("flags", skip_run=True) # TODO: Fix
|
||||
self.assert_sample("flags")
|
||||
self.assert_sample("id_prop")
|
||||
self.assert_sample("layout")
|
||||
self.assert_sample("menu")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue