def _post_processing_task_started(self):
"""Show a 'processing' message on the UI while the post processing task is executing."""
pub.unsubscribe(self._post_processing_task_started, RunUploaderTopics.started_post_processing)
pub.subscribe(self._post_processing_task_completed, RunUploaderTopics.finished_post_processing)
pub.subscribe(self._post_processing_task_failed, RunUploaderTopics.failed_post_processing)
logging.info("Post-processing started, updating UI.")
self.Freeze()
self._post_processing_sizer = wx.BoxSizer(wx.HORIZONTAL)
self._post_processing_placeholder = ProcessingPlaceholderText(self)
self._post_processing_placeholder.SetFont(wx.Font(pointSize=18, family=wx.FONTFAMILY_DEFAULT, style=wx.NORMAL, weight=wx.FONTWEIGHT_BOLD, face="Segoe UI Symbol"))
self._post_processing_text = wx.StaticText(self, label="Executing post-processing task.")
self._post_processing_text.SetFont(wx.Font(18, wx.DEFAULT, wx.NORMAL, wx.BOLD))
self._post_processing_text.Wrap(350)
self._post_processing_text.SetToolTipString("Executing command `{}`.".format(read_config_option("completion_cmd")))
self._post_processing_sizer.Add(self._post_processing_text, flag=wx.RIGHT, border=5, proportion=1)
self._post_processing_sizer.Add(self._post_processing_placeholder, flag=wx.LEFT, border=5, proportion=0)
self._sizer.Insert(0, self._post_processing_sizer, flag=wx.EXPAND | wx.ALL, border=5)
self.Layout()
self.Thaw()
评论列表
文章目录