Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py

changeset 3243
bbaa32bb9e63
parent 3242
a7e006073658
child 3247
ed79e48ba0b4
equal deleted inserted replaced
3242:a7e006073658 3243:bbaa32bb9e63
963 self.__filterLogs() 963 self.__filterLogs()
964 964
965 self.__updateDiffButtons() 965 self.__updateDiffButtons()
966 self.__updatePhaseAction() 966 self.__updatePhaseAction()
967 self.__updateGraftAction() 967 self.__updateGraftAction()
968 self.__updateTagAction()
968 969
969 def __readStdout(self): 970 def __readStdout(self):
970 """ 971 """
971 Private slot to handle the readyReadStandardOutput signal. 972 Private slot to handle the readyReadStandardOutput signal.
972 973
1064 1065
1065 self.diffRevisionsButton.setEnabled(False) 1066 self.diffRevisionsButton.setEnabled(False)
1066 1067
1067 def __updatePhaseAction(self): 1068 def __updatePhaseAction(self):
1068 """ 1069 """
1069 Private slot to update the status of the phase button. 1070 Private slot to update the status of the phase action.
1070 """ 1071 """
1071 if self.initialCommandMode == "log": 1072 if self.initialCommandMode == "log":
1072 # step 1: count entries with changeable phases 1073 # step 1: count entries with changeable phases
1073 secret = 0 1074 secret = 0
1074 draft = 0 1075 draft = 0
1092 else: 1093 else:
1093 self.__phaseAct.setEnabled(False) 1094 self.__phaseAct.setEnabled(False)
1094 1095
1095 def __updateGraftAction(self): 1096 def __updateGraftAction(self):
1096 """ 1097 """
1097 Private slot to update the status of the graft button. 1098 Private slot to update the status of the graft action.
1098 """ 1099 """
1099 if self.__graftAct is not None: 1100 if self.__graftAct is not None:
1100 if self.initialCommandMode == "log": 1101 if self.initialCommandMode == "log":
1101 # step 1: count selected entries not belonging to the 1102 # step 1: count selected entries not belonging to the
1102 # current branch 1103 # current branch
1109 # step 2: set the status of the graft action 1110 # step 2: set the status of the graft action
1110 self.__graftAct.setEnabled(otherBranches > 0) 1111 self.__graftAct.setEnabled(otherBranches > 0)
1111 else: 1112 else:
1112 self.__graftAct.setEnabled(False) 1113 self.__graftAct.setEnabled(False)
1113 1114
1115 def __updateTagAction(self):
1116 """
1117 Private slot to update the status of the graft action.
1118 """
1119 if self.initialCommandMode == "log":
1120 self.__tagAct.setEnabled(len(self.logTree.selectedItems()) == 1)
1121 else:
1122 self.__tagAct.setEnabled(False)
1123
1114 def __updateGui(self, itm): 1124 def __updateGui(self, itm):
1115 """ 1125 """
1116 Private slot to update GUI elements except the diff and phase buttons. 1126 Private slot to update GUI elements except the diff and phase buttons.
1117 1127
1118 @param itm reference to the item the update should be based on 1128 @param itm reference to the item the update should be based on
1143 """ 1153 """
1144 self.__updateGui(current) 1154 self.__updateGui(current)
1145 self.__updateDiffButtons() 1155 self.__updateDiffButtons()
1146 self.__updatePhaseAction() 1156 self.__updatePhaseAction()
1147 self.__updateGraftAction() 1157 self.__updateGraftAction()
1158 self.__updateTagAction()
1148 1159
1149 @pyqtSlot() 1160 @pyqtSlot()
1150 def on_logTree_itemSelectionChanged(self): 1161 def on_logTree_itemSelectionChanged(self):
1151 """ 1162 """
1152 Private slot called, when the selection has changed. 1163 Private slot called, when the selection has changed.
1153 """ 1164 """
1154 if len(self.logTree.selectedItems()) == 1: 1165 if len(self.logTree.selectedItems()) == 1:
1155 self.__updateGui(self.logTree.selectedItems()[0]) 1166 self.__updateGui(self.logTree.selectedItems()[0])
1156 self.__tagAct.setEnabled(True)
1157 else:
1158 self.__tagAct.setEnabled(False)
1159 1167
1160 self.__updateDiffButtons() 1168 self.__updateDiffButtons()
1161 self.__updatePhaseAction() 1169 self.__updatePhaseAction()
1162 self.__updateGraftAction() 1170 self.__updateGraftAction()
1171 self.__updateTagAction()
1163 1172
1164 @pyqtSlot() 1173 @pyqtSlot()
1165 def on_nextButton_clicked(self): 1174 def on_nextButton_clicked(self):
1166 """ 1175 """
1167 Private slot to handle the Next button. 1176 Private slot to handle the Next button.

eric ide

mercurial