Commits

Yuya Nishihara committed 781b912

cmdui: clarify that dialog monitors command session

Comments (0)

Files changed (3)

tortoisehg/hgqt/cmdui.py

             self.setShowOutput(True)
         self.commandFinished.emit(ret)
 
-class Dialog(QDialog):
-    """A dialog for running random Mercurial command"""
+class CmdSessionDialog(QDialog):
+    """Dialog to monitor running Mercurial commands"""
 
     def __init__(self, parent=None):
-        super(Dialog, self).__init__(parent)
+        super(CmdSessionDialog, self).__init__(parent)
         self.setWindowFlags(self.windowFlags()
                             & ~Qt.WindowContextHelpButtonHint)
 
         if self._session.exitCode() == 0:
             self.accept()  # means command successfully finished
         else:
-            super(Dialog, self).reject()
+            super(CmdSessionDialog, self).reject()
 
     @pyqtSlot()
     def _updateUi(self):

tortoisehg/hgqt/hgemail.py

 
         opts = self._patchbombopts()
         cmdline = hglib.buildcmdargs('email', **opts)
-        cmd = cmdui.Dialog(self)
+        cmd = cmdui.CmdSessionDialog(self)
         cmd.setWindowTitle(_('Sending Email'))
         cmd.setShowOutput(False)
         cmd.setSession(self._repoagent.runCommand(cmdline, self))

tortoisehg/hgqt/repowidget.py

 
     def verify(self):
         cmdline = ['verify', '--verbose']
-        dlg = cmdui.Dialog(self)
+        dlg = cmdui.CmdSessionDialog(self)
         dlg.setWindowIcon(qtlib.geticon('hg-verify'))
         dlg.setWindowTitle(_('%s - verify repository') % self.repo.displayname)
         dlg.setWindowFlags(dlg.windowFlags() | Qt.WindowMaximizeButtonHint)
 
     def recover(self):
         cmdline = ['recover', '--verbose']
-        dlg = cmdui.Dialog(self)
+        dlg = cmdui.CmdSessionDialog(self)
         dlg.setWindowIcon(qtlib.geticon('hg-recover'))
         dlg.setWindowTitle(_('%s - recover repository') % self.repo.displayname)
         dlg.setWindowFlags(dlg.windowFlags() | Qt.WindowMaximizeButtonHint)