mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 03:45:22 +02:00
Fix stopping content server message not being dismissable
This commit is contained in:
parent
33f926a8d6
commit
60e8690e6e
2 changed files with 5 additions and 7 deletions
|
|
@ -235,12 +235,11 @@ def toggle_content_server(self):
|
|||
_('Stopping server, this could take upto a minute, please wait...'),
|
||||
show_copy_button=False)
|
||||
QTimer.singleShot(1000, self.check_exited)
|
||||
self.stopping_msg.exec_()
|
||||
|
||||
def check_exited(self):
|
||||
if self.gui.content_server.is_running:
|
||||
QTimer.singleShot(20, self.check_exited)
|
||||
if not self.stopping_msg.isVisible():
|
||||
self.stopping_msg.exec_()
|
||||
if getattr(self.gui.content_server, 'is_running', False):
|
||||
QTimer.singleShot(50, self.check_exited)
|
||||
return
|
||||
self.gui.content_server = None
|
||||
self.stopping_msg.accept()
|
||||
|
|
|
|||
|
|
@ -85,12 +85,11 @@ def stop_server(self):
|
|||
_('Stopping server, this could take upto a minute, please wait...'),
|
||||
show_copy_button=False)
|
||||
QTimer.singleShot(500, self.check_exited)
|
||||
self.stopping_msg.exec_()
|
||||
|
||||
def check_exited(self):
|
||||
if self.gui.content_server.is_running:
|
||||
if getattr(self.gui.content_server, 'is_running', False):
|
||||
QTimer.singleShot(20, self.check_exited)
|
||||
if not self.stopping_msg.isVisible():
|
||||
self.stopping_msg.exec_()
|
||||
return
|
||||
|
||||
self.gui.content_server = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue