Fix issue with menus

Trying to use a menu as an object would fail because it didn't have a
gir_class.
This commit is contained in:
James Westman 2021-11-24 21:35:01 -06:00
parent 5c0fd46ebe
commit 097c7df326
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6

View file

@ -34,6 +34,10 @@ class Menu(AstNode):
child.emit_xml(xml)
xml.end_tag()
@property
def gir_class(self):
return self.root.gir.namespaces["Gtk"].lookup_type("Gio.MenuModel")
class MenuAttribute(BaseAttribute):
tag_name = "attribute"