mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -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...'),
|
_('Stopping server, this could take upto a minute, please wait...'),
|
||||||
show_copy_button=False)
|
show_copy_button=False)
|
||||||
QTimer.singleShot(1000, self.check_exited)
|
QTimer.singleShot(1000, self.check_exited)
|
||||||
|
self.stopping_msg.exec_()
|
||||||
|
|
||||||
def check_exited(self):
|
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)
|
QTimer.singleShot(50, self.check_exited)
|
||||||
if not self.stopping_msg.isVisible():
|
|
||||||
self.stopping_msg.exec_()
|
|
||||||
return
|
return
|
||||||
self.gui.content_server = None
|
self.gui.content_server = None
|
||||||
self.stopping_msg.accept()
|
self.stopping_msg.accept()
|
||||||
|
@ -85,12 +85,11 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
_('Stopping server, this could take upto a minute, please wait...'),
|
_('Stopping server, this could take upto a minute, please wait...'),
|
||||||
show_copy_button=False)
|
show_copy_button=False)
|
||||||
QTimer.singleShot(500, self.check_exited)
|
QTimer.singleShot(500, self.check_exited)
|
||||||
|
self.stopping_msg.exec_()
|
||||||
|
|
||||||
def check_exited(self):
|
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)
|
QTimer.singleShot(20, self.check_exited)
|
||||||
if not self.stopping_msg.isVisible():
|
|
||||||
self.stopping_msg.exec_()
|
|
||||||
return
|
return
|
||||||
|
|
||||||
self.gui.content_server = None
|
self.gui.content_server = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user