Fix #1439 (Sort is not saved when quitting)

This commit is contained in:
Kovid Goyal 2009-01-12 18:29:36 -08:00
parent d4e3104157
commit 4741e10a7a

View File

@ -1482,7 +1482,8 @@ in which you want to store your books files. Any existing books will be automati
return True return True
def shutdown(self): def shutdown(self, write_settings=True):
if write_settings:
self.write_settings() self.write_settings()
self.job_manager.terminate_all_jobs() self.job_manager.terminate_all_jobs()
self.device_manager.keep_going = False self.device_manager.keep_going = False
@ -1503,6 +1504,7 @@ in which you want to store your books files. Any existing books will be automati
def closeEvent(self, e): def closeEvent(self, e):
self.write_settings()
if self.system_tray_icon.isVisible(): if self.system_tray_icon.isVisible():
if not dynamic['systray_msg'] and not isosx: 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_() 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: else:
if self.confirm_quit(): if self.confirm_quit():
try: try:
self.shutdown() self.shutdown(write_settings=False)
except: except:
pass pass
e.accept() e.accept()