891 self.branchCombo.setCurrentIndex( |
891 self.branchCombo.setCurrentIndex( |
892 self.branchCombo.findText(branchFilter)) |
892 self.branchCombo.findText(branchFilter)) |
893 |
893 |
894 self.__filterLogsEnabled = True |
894 self.__filterLogsEnabled = True |
895 self.__filterLogs() |
895 self.__filterLogs() |
|
896 |
|
897 self.__updateDiffButtons() |
|
898 self.__updatePhaseButton() |
896 |
899 |
897 def __readStdout(self): |
900 def __readStdout(self): |
898 """ |
901 """ |
899 Private slot to handle the readyReadStandardOutput signal. |
902 Private slot to handle the readyReadStandardOutput signal. |
900 |
903 |
989 |
992 |
990 def __updatePhaseButton(self): |
993 def __updatePhaseButton(self): |
991 """ |
994 """ |
992 Private slot to update the status of the phase button. |
995 Private slot to update the status of the phase button. |
993 """ |
996 """ |
994 # step 1: count entries with changeable phases |
997 if self.initialCommandMode == "log": |
995 secret = 0 |
998 # step 1: count entries with changeable phases |
996 draft = 0 |
999 secret = 0 |
997 public = 0 |
1000 draft = 0 |
998 for itm in self.logTree.selectedItems(): |
1001 public = 0 |
999 phase = itm.text(self.PhaseColumn) |
1002 for itm in self.logTree.selectedItems(): |
1000 if phase == "draft": |
1003 phase = itm.text(self.PhaseColumn) |
1001 draft += 1 |
1004 if phase == "draft": |
1002 elif phase == "secret": |
1005 draft += 1 |
1003 secret += 1 |
1006 elif phase == "secret": |
|
1007 secret += 1 |
|
1008 else: |
|
1009 public += 1 |
|
1010 |
|
1011 # step 2: set the status of the phase button |
|
1012 if public == 0 and \ |
|
1013 ((secret > 0 and draft == 0) or \ |
|
1014 (secret == 0 and draft > 0)): |
|
1015 self.phaseButton.setEnabled(True) |
1004 else: |
1016 else: |
1005 public += 1 |
1017 self.phaseButton.setEnabled(False) |
1006 |
|
1007 # step 2: set the status of the phase button |
|
1008 if public == 0 and \ |
|
1009 ((secret > 0 and draft == 0) or \ |
|
1010 (secret == 0 and draft > 0)): |
|
1011 self.phaseButton.setEnabled(True) |
|
1012 else: |
1018 else: |
1013 self.phaseButton.setEnabled(False) |
1019 self.phaseButton.setEnabled(False) |
1014 |
1020 |
1015 def __updateGui(self, itm): |
1021 def __updateGui(self, itm): |
1016 """ |
1022 """ |