Add confirmation dialog before logout (Closes #1654)

This commit is contained in:
Mathieu Comandon 2019-01-26 14:39:08 -08:00
parent acb6f18047
commit f6cdb2e3c3

View file

@ -522,6 +522,14 @@ class LutrisWindow(Gtk.ApplicationWindow):
@GtkTemplate.Callback
def on_disconnect(self, *_args):
"""Callback from user disconnect"""
dlg = dialogs.QuestionDialog(
{
"question": "Do you want to log out from Lutris?",
"title": "Log out?",
}
)
if dlg.result != Gtk.ResponseType.YES:
return
api.disconnect()
self.toggle_connection(False)
self.actions["synchronize"].props.enabled = False