eric6/Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py

changeset 7188
f9c57c6fa7c4
parent 7183
4ac1c9daa90b
child 7192
a22eee00b052
equal deleted inserted replaced
7187:11b0c7802a70 7188:f9c57c6fa7c4
405 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) 405 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False)
406 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(True) 406 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(True)
407 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) 407 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True)
408 408
409 self.refreshButton.setEnabled(False) 409 self.refreshButton.setEnabled(False)
410
411 self.statusList.setEnabled(not self.vcs.canCommitMerge(self.dname))
412 410
413 def __finish(self): 411 def __finish(self):
414 """ 412 """
415 Private slot called when the process finished or the user pressed 413 Private slot called when the process finished or the user pressed
416 the button. 414 the button.
573 @pyqtSlot() 571 @pyqtSlot()
574 def on_refreshButton_clicked(self): 572 def on_refreshButton_clicked(self):
575 """ 573 """
576 Private slot to refresh the status display. 574 Private slot to refresh the status display.
577 """ 575 """
578 self.statusList.setEnabled(not self.vcs.canCommitMerge(self.dname))
579
580 selectedItems = self.statusList.selectedItems() 576 selectedItems = self.statusList.selectedItems()
581 if len(selectedItems) == 1: 577 if len(selectedItems) == 1:
582 self.__selectedName = selectedItems[0].text(self.__pathColumn) 578 self.__selectedName = selectedItems[0].text(self.__pathColumn)
583 else: 579 else:
584 self.__selectedName = "" 580 self.__selectedName = ""
933 929
934 def __commitMerge(self): 930 def __commitMerge(self):
935 """ 931 """
936 Private slot to handle the Commit Merge context menu entry. 932 Private slot to handle the Commit Merge context menu entry.
937 """ 933 """
938 self.vcs.vcsCommit(self.dname, 'Merge', merge=True) 934 self.vcs.vcsCommit(self.dname, self.tr('Merge'), merge=True)
939 self.__committed() 935 self.__committed()
940 936
941 def __abortMerge(self): 937 def __abortMerge(self):
942 """ 938 """
943 Private slot used to abort an uncommitted merge. 939 Private slot used to abort an uncommitted merge.

eric ide

mercurial