mirror of
https://github.com/lutris/lutris
synced 2024-11-05 18:10:49 +00:00
Add confirmation dialog before logout (Closes #1654)
This commit is contained in:
parent
acb6f18047
commit
f6cdb2e3c3
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue