def start(self):
"""Start the download.
"""
self._shouldCancel = False
# Use a timer because timers aren't re-entrant.
self._guiExecTimer = wx.PyTimer(self._guiExecNotify)
gui.mainFrame.prePopup()
# Translators: The title of the dialog displayed while downloading add-on update.
self._progressDialog = wx.ProgressDialog(_("Downloading Add-on Update"),
# Translators: The progress message indicating that a connection is being established.
_("Connecting"),
# PD_AUTO_HIDE is required because ProgressDialog.Update blocks at 100%
# and waits for the user to press the Close button.
style=wx.PD_CAN_ABORT | wx.PD_ELAPSED_TIME | wx.PD_REMAINING_TIME | wx.PD_AUTO_HIDE,
parent=gui.mainFrame)
self._progressDialog.Raise()
t = threading.Thread(target=self._bg)
t.daemon = True
t.start()
评论列表
文章目录