Commits

Yuya Nishihara  committed ccf2bc4

graft: extract helper method to switch graft button to close button

  • Participants
  • Parent commits d00f72d

Comments (0)

Files changed (1)

File tortoisehg/hgqt/graft.py

             else:
                 self._updateSource(len(self.sourcelist) - 1)
             self._stbar.showMessage(msg)
-            self.graftbtn.setEnabled(True)
-            self.graftbtn.setText(_('Close'))
-            self.graftbtn.clicked.disconnect(self.graft)
-            self.graftbtn.clicked.connect(self.accept)
+            self._makeCloseButton()
+
+    def _makeCloseButton(self):
+        self.graftbtn.setEnabled(True)
+        self.graftbtn.setText(_('Close'))
+        self.graftbtn.clicked.disconnect(self.graft)
+        self.graftbtn.clicked.connect(self.accept)
 
     def checkResolve(self):
         for root, path, status in thgrepo.recursiveMergeStatus(self.repo):