WIP: List item factories

The current problem is that types aren't inferred properly for
GtkListItem.item (it's always considered a GObject, and Gtk needs more
type information than that, and cast expressions don't exist yet).
This commit is contained in:
James Westman 2022-07-18 16:52:55 -05:00
parent fdf91dc08e
commit 7077a76ba0
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
2 changed files with 2 additions and 2 deletions

View file

@ -60,7 +60,7 @@ class ListItemFactory(AstNode, Scope):
for obj in self.iterate_children_recursive() for obj in self.iterate_children_recursive()
if obj.tokens["id"] is not None if obj.tokens["id"] is not None
}, },
"item": ScopeVariable("item", self.gir_class, emit_item_xml), "item": ScopeVariable("item", self.item_type, emit_item_xml),
} }
@property @property

View file

@ -14,7 +14,7 @@
<binding name="label"> <binding name="label">
<lookup name="label"> <lookup name="label">
<lookup name="group"> <lookup name="group">
<lookup name="item">GtkListItem</lookup> <lookup name="item" type="GtkCheckButton">GtkListItem</lookup>
</lookup> </lookup>
</lookup> </lookup>
</binding> </binding>