Commits

Yuya Nishihara  committed 5736665

compress: replace internal showMessage signal by direct function call

  • Participants
  • Parent commits c5038b6

Comments (0)

Files changed (1)

File tortoisehg/hgqt/compress.py

 from tortoisehg.hgqt import csinfo, cmdui, commit, wctxcleaner
 
 class CompressDialog(QDialog):
-    showMessage = pyqtSignal(QString)
 
     def __init__(self, repoagent, revs, parent):
         super(CompressDialog, self).__init__(parent)
         self.cmd = cmdui.Widget(True, True, self)
         self.cmd.commandFinished.connect(self.commandFinished)
         self.cmd.setShowOutput(True)
-        self.showMessage.connect(self.cmd.stbar.showMessage)
         self.layout().addWidget(self.cmd, 2)
 
         bbox = QDialogButtonBox()
         self.layout().addWidget(bbox)
         self.bbox = bbox
 
-        self.showMessage.emit(_('Checking...'))
+        self.cmd.stbar.showMessage(_('Checking...'))
         self._wctxcleaner = wctxcleaner.WctxCleaner(repoagent, self)
         self._wctxcleaner.checkFinished.connect(self._checkCompleted)
         self.cmd.stbar.linkActivated.connect(self._wctxcleaner.runCleaner)
         else:
             self.compressbtn.setEnabled(True)
             txt = _('You may continue the compress')
-        self.showMessage.emit(txt)
+        self.cmd.stbar.showMessage(txt)
 
     def compress(self):
         self.cancelbtn.setShown(False)
 
     def commandFinished(self, ret):
         self.repo.decrementBusyCount()
-        self.showMessage.emit(_('Changes have been moved, you must now commit'))
+        self.cmd.stbar.showMessage(_('Changes have been moved, you must now '
+                                     'commit'))
         self.compressbtn.setText(_('Commit', 'action button'))
         self.compressbtn.clicked.disconnect(self.compress)
         self.compressbtn.clicked.connect(self.commit)
         dlg = commit.CommitDialog(self._repoagent, [], {}, self)
         dlg.finished.connect(dlg.deleteLater)
         dlg.exec_()
-        self.showMessage.emit(_('Compress is complete, old history untouched'))
+        self.cmd.stbar.showMessage(_('Compress is complete, old history '
+                                     'untouched'))
         self.compressbtn.setText(_('Close'))
         self.compressbtn.clicked.disconnect(self.commit)
         self.compressbtn.clicked.connect(self.accept)