159 author, |
159 author, |
160 date, |
160 date, |
161 " ".join(msg), |
161 " ".join(msg), |
162 ]) |
162 ]) |
163 |
163 |
164 itm.setData(0, self.__messageRole, QVariant(message)) |
164 itm.setData(0, self.__messageRole, message) |
165 # TODO: change this to simply store the list for QVariant v2 |
165 itm.setData(0, self.__changesRole, changedPaths) |
166 itm.setData(0, self.__changesRole, QVariant(repr(changedPaths))) |
|
167 |
166 |
168 itm.setTextAlignment(0, Qt.AlignRight) |
167 itm.setTextAlignment(0, Qt.AlignRight) |
169 itm.setTextAlignment(1, Qt.AlignLeft) |
168 itm.setTextAlignment(1, Qt.AlignLeft) |
170 itm.setTextAlignment(2, Qt.AlignLeft) |
169 itm.setTextAlignment(2, Qt.AlignLeft) |
171 itm.setTextAlignment(3, Qt.AlignLeft) |
170 itm.setTextAlignment(3, Qt.AlignLeft) |
432 |
431 |
433 @param current reference to the new current item (QTreeWidgetItem) |
432 @param current reference to the new current item (QTreeWidgetItem) |
434 @param previous reference to the old current item (QTreeWidgetItem) |
433 @param previous reference to the old current item (QTreeWidgetItem) |
435 """ |
434 """ |
436 self.messageEdit.clear() |
435 self.messageEdit.clear() |
437 for line in current.data(0, self.__messageRole).toStringList(): |
436 for line in current.data(0, self.__messageRole): |
438 self.messageEdit.append(line.strip()) |
437 self.messageEdit.append(line.strip()) |
439 |
438 |
440 self.filesTree.clear() |
439 self.filesTree.clear() |
441 # TODO: change this for QVariant v2 to not use eval |
440 changes = current.data(0, self.__changesRole) |
442 changes = eval(current.data(0, self.__changesRole).toString()) |
|
443 if len(changes) > 0: |
441 if len(changes) > 0: |
444 for change in changes: |
442 for change in changes: |
445 self.__generateFileItem(change["action"], change["path"], |
443 self.__generateFileItem(change["action"], change["path"], |
446 change["copyfrom_path"], change["copyfrom_revision"]) |
444 change["copyfrom_path"], change["copyfrom_revision"]) |
447 self.__resizeColumnsFiles() |
445 self.__resizeColumnsFiles() |