mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Fix simple bindings with template soure
This commit is contained in:
parent
8f3682135b
commit
e4bad039b0
4 changed files with 23 additions and 1 deletions
|
@ -114,7 +114,16 @@ class XmlOutput(OutputFormat):
|
|||
|
||||
elif isinstance(value, Binding):
|
||||
if simple := value.simple_binding:
|
||||
props["bind-source"] = simple.source
|
||||
if (
|
||||
simple.source == "template"
|
||||
and value.context[ScopeCtx].template is not None
|
||||
):
|
||||
props["bind-source"] = value.context[
|
||||
ScopeCtx
|
||||
].template.gir_class.glib_type_name
|
||||
else:
|
||||
props["bind-source"] = simple.source
|
||||
|
||||
props["bind-property"] = simple.property_name
|
||||
props["bind-flags"] = "sync-create"
|
||||
xml.put_self_closing("property", **props)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue