Also require the delegate for Game.install(), and we are already providing it.

This commit is contained in:
Daniel Johnson 2024-01-14 10:20:03 -05:00 committed by Mathieu Comandon
parent 342a1cb24f
commit fbbcf2dff7

View file

@ -346,16 +346,13 @@ class Game(GObject.Object):
disable_compositing()
self.compositor_disabled = True
def install(self, launch_ui_delegate=None):
def install(self, launch_ui_delegate):
"""Request installation of a game"""
application = Gio.Application.get_default()
if not launch_ui_delegate:
launch_ui_delegate = application.launch_ui_delegate
if not self.slug:
raise ValueError("Invalid game passed: %s" % self)
if not self.service or self.service == "lutris":
application = Gio.Application.get_default()
application.show_lutris_installer_window(game_slug=self.slug)
return