mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix stopping content server message not being dismissable
This commit is contained in:
parent
33f926a8d6
commit
60e8690e6e
@ -235,12 +235,11 @@ class ConnectShareAction(InterfaceAction):
|
||||
_('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 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
_('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…
x
Reference in New Issue
Block a user