diff --git a/packages/lib/src/generics/gtk.ts b/packages/lib/src/generics/gtk.ts index 8cb0a566..928de87f 100644 --- a/packages/lib/src/generics/gtk.ts +++ b/packages/lib/src/generics/gtk.ts @@ -34,20 +34,8 @@ export default { constraint: GObject.getType() }); - // Add generic support for FlowBox - FlowBox.addGeneric({ - default: GObject.getType(), - constraint: GObject.getType() - }); - - // Add generic support for ListBox - ListBox.addGeneric({ - default: GObject.getType(), - constraint: GObject.getType() - }); - // Update bind_model methods to use generics - const updateBindModel = (cls: IntrospectedBaseClass, widgetFuncName: string) => { + const updateBindModelMethod = (cls: IntrospectedBaseClass, widgetFuncName: string) => { cls.members = cls.members.map(m => { if (m.name === "bind_model") { m.generics.push(new Generic(new GenericType("A"), GObject.getType(), undefined, GObject.getType())); @@ -71,7 +59,7 @@ export default { }); }; - updateBindModel(FlowBox, "FlowBoxCreateWidgetFunc"); - updateBindModel(ListBox, "ListBoxCreateWidgetFunc"); + updateBindModelMethod(FlowBox, "FlowBoxCreateWidgetFunc"); + updateBindModelMethod(ListBox, "ListBoxCreateWidgetFunc"); } };