Commits

Yuya Nishihara committed 1a4f525

workbench: clear progress bar when command execution is finished

If command execution is aborted, progress bar may not be cleared due to lack
of the final pos=None message. CmdThread addresses this problem by emitting
progress message for each uncleared topic, but it isn't simple to port the
same workaround to CmdProc and CmdServer.

Since all command widgets can be notified on busyChanged or commandFinished,
it isn't necessary to emulate progress messages.

Comments (0)

Files changed (2)

tortoisehg/hgqt/cmdui.py

         for key in keys:
             self._removeProgress(key)
 
+    @pyqtSlot(unicode)
+    def clearRepoProgress(self, root):
+        root = unicode(root)
+        keys = [k for k in self.topics if k[0] == root]
+        for key in keys:
+            self._removeProgress(key)
+
     def _removeProgress(self, key):
         pm = self.topics[key]
         self.removeWidget(pm)

tortoisehg/hgqt/workbench.py

         self._repomanager.repositoryDestroyed.connect(self.closeRepo)
 
         self.setupUi()
+        repomanager.busyChanged.connect(self.statusbar.clearRepoProgress)
         repomanager.progressReceived.connect(self.statusbar.setRepoProgress)
 
         self.reporegistry = rr = RepoRegistryView(repomanager, self)