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): if not isinstance(type, Enumeration):
return None return None
elif member := type.members.get(self.name): elif member := type.members.get(self.name):
return member.value return member.name
else: else:
return None return None

View file

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