mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1439 (Sort is not saved when quitting)
This commit is contained in:
parent
d4e3104157
commit
4741e10a7a
@ -1482,8 +1482,9 @@ in which you want to store your books files. Any existing books will be automati
|
||||
return True
|
||||
|
||||
|
||||
def shutdown(self):
|
||||
self.write_settings()
|
||||
def shutdown(self, write_settings=True):
|
||||
if write_settings:
|
||||
self.write_settings()
|
||||
self.job_manager.terminate_all_jobs()
|
||||
self.device_manager.keep_going = False
|
||||
self.cover_cache.stop()
|
||||
@ -1503,6 +1504,7 @@ in which you want to store your books files. Any existing books will be automati
|
||||
|
||||
|
||||
def closeEvent(self, e):
|
||||
self.write_settings()
|
||||
if self.system_tray_icon.isVisible():
|
||||
if not dynamic['systray_msg'] and not isosx:
|
||||
info_dialog(self, 'calibre', 'calibre '+_('will keep running in the system tray. To close it, choose <b>Quit</b> in the context menu of the system tray.')).exec_()
|
||||
@ -1512,7 +1514,7 @@ in which you want to store your books files. Any existing books will be automati
|
||||
else:
|
||||
if self.confirm_quit():
|
||||
try:
|
||||
self.shutdown()
|
||||
self.shutdown(write_settings=False)
|
||||
except:
|
||||
pass
|
||||
e.accept()
|
||||
|
Loading…
x
Reference in New Issue
Block a user