Confirm on quit if unsaved changes present

This commit is contained in:
Kovid Goyal 2013-10-16 21:16:26 +05:30
parent 1e3d8983e1
commit 12718e6785

View File

@ -150,6 +150,12 @@ class Boss(QObject):
'The current book is being saved in the background, quitting will abort'
' the save process, are you sure?'), default_yes=False):
return False
if self.gui.action_save.isEnabled():
if not question_dialog(
self.gui, _('Are you sure?'), _(
'The current book has unsaved changes, you will lose them if you quit,'
' are you sure?'), default_yes=False):
return False
return True