From 7077a76ba05bfbb7c3988263582dcd122a803da4 Mon Sep 17 00:00:00 2001 From: James Westman Date: Mon, 18 Jul 2022 16:52:55 -0500 Subject: [PATCH] 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). --- blueprintcompiler/language/gtk_list_item_factory.py | 2 +- tests/samples/list_item_factory.ui | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/blueprintcompiler/language/gtk_list_item_factory.py b/blueprintcompiler/language/gtk_list_item_factory.py index 07b29d8..856ea94 100644 --- a/blueprintcompiler/language/gtk_list_item_factory.py +++ b/blueprintcompiler/language/gtk_list_item_factory.py @@ -60,7 +60,7 @@ class ListItemFactory(AstNode, Scope): for obj in self.iterate_children_recursive() 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 diff --git a/tests/samples/list_item_factory.ui b/tests/samples/list_item_factory.ui index a3c0856..7ab699f 100644 --- a/tests/samples/list_item_factory.ui +++ b/tests/samples/list_item_factory.ui @@ -14,7 +14,7 @@ - GtkListItem + GtkListItem