mirror of
https://github.com/lutris/lutris
synced 2024-09-05 23:46:21 +00:00
Redirect some installer-window responses to the cancel button logic, rather than just destroying the window.
This causes ongoing incomplete downloads to be cancelled.
This commit is contained in:
parent
07c7ac6b5c
commit
466345c831
|
@ -205,6 +205,12 @@ class InstallerWindow(ModelessDialog,
|
|||
"""Open the cache configuration dialog"""
|
||||
CacheConfigurationDialog(parent=self)
|
||||
|
||||
def on_response(self, dialog, response: Gtk.ResponseType) -> None:
|
||||
if response in (Gtk.ResponseType.CLOSE, Gtk.ResponseType.CANCEL, Gtk.ResponseType.DELETE_EVENT):
|
||||
self.on_cancel_clicked()
|
||||
else:
|
||||
super().on_response(dialog, response)
|
||||
|
||||
def on_back_clicked(self, _button):
|
||||
self.stack.navigate_back()
|
||||
|
||||
|
|
Loading…
Reference in a new issue