28 @param item reference to the item |
28 @param item reference to the item |
29 @type QTreeWidgetItem |
29 @type QTreeWidgetItem |
30 @param column column number inside the tree widget item |
30 @param column column number inside the tree widget item |
31 @type int |
31 @type int |
32 """ |
32 """ |
33 super(HgHisteditPlanActionComboBox, self).__init__() |
33 super().__init__() |
34 |
34 |
35 self.__item = item |
35 self.__item = item |
36 self.__column = column |
36 self.__column = column |
37 |
37 |
38 self.addItems(["pick", "drop", "mess", "fold", "roll", "edit"]) |
38 self.addItems(["pick", "drop", "mess", "fold", "roll", "edit"]) |
64 |
64 |
65 This is reimplemented in order to set the associated item as the |
65 This is reimplemented in order to set the associated item as the |
66 current item of the tree widget. |
66 current item of the tree widget. |
67 """ |
67 """ |
68 self.__item.treeWidget().setCurrentItem(self.__item) |
68 self.__item.treeWidget().setCurrentItem(self.__item) |
69 super(HgHisteditPlanActionComboBox, self).showPopup() |
69 super().showPopup() |
70 |
70 |
71 |
71 |
72 class HgHisteditPlanEditor(QDialog, Ui_HgHisteditPlanEditor): |
72 class HgHisteditPlanEditor(QDialog, Ui_HgHisteditPlanEditor): |
73 """ |
73 """ |
74 Class implementing a dialog to edit the history modification plan. |
74 Class implementing a dialog to edit the history modification plan. |
148 |
148 |
149 parts = text.split(" ", 3) |
149 parts = text.split(" ", 3) |
150 action = parts[0] |
150 action = parts[0] |
151 try: |
151 try: |
152 rev = int(parts[2]) |
152 rev = int(parts[2]) |
153 if len(parts) > 3: |
153 summary = parts[3] if len(parts) > 3 else "" |
154 summary = parts[3] |
|
155 else: |
|
156 summary = "" |
|
157 except ValueError: |
154 except ValueError: |
158 rev = -1 |
155 rev = -1 |
159 summary = " ".join(parts[2:]) |
156 summary = " ".join(parts[2:]) |
160 if rev > -1: |
157 revision = ("{0:>7}:{1}".format(rev, parts[1]) |
161 revision = "{0:>7}:{1}".format(rev, parts[1]) |
158 if rev > -1 else parts[1]) |
162 else: |
|
163 revision = parts[1] |
|
164 |
159 |
165 itm = QTreeWidgetItem(self.planTreeWidget, [ |
160 itm = QTreeWidgetItem(self.planTreeWidget, [ |
166 action, |
161 action, |
167 revision, |
162 revision, |
168 summary, |
163 summary, |