compile: fix flag values

gtk builder does not support combining interger values with | in flags
properties, so the short names are used instead.
This commit is contained in:
kotontrion 2024-11-20 10:41:56 +01:00
parent 778a979714
commit f48b840cfa
2 changed files with 2 additions and 2 deletions

View file

@ -216,7 +216,7 @@ class Flag(AstNode):
if not isinstance(type, Enumeration):
return None
elif member := type.members.get(self.name):
return member.value
return member.name
else:
return None

View file

@ -7,7 +7,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GApplication">
<property name="flags">1|4</property>
<property name="flags">is_service|handles_open</property>
</object>
<object class="GtkEventControllerScroll">
<property name="flags">1</property>