164 "path" : changedPath["path"], |
164 "path" : changedPath["path"], |
165 "copyfrom_path" : copyPath, |
165 "copyfrom_path" : copyPath, |
166 "copyfrom_revision" : copyRev, |
166 "copyfrom_revision" : copyRev, |
167 } |
167 } |
168 changes.append(change) |
168 changes.append(change) |
169 itm.setData(0, self.__messageRole, QVariant(message)) |
169 itm.setData(0, self.__messageRole, message) |
170 # TODO: change this to simply store the list for QVariant v2 |
170 itm.setData(0, self.__changesRole, unicode(changes)) |
171 itm.setData(0, self.__changesRole, QVariant(unicode(changes))) |
|
172 |
171 |
173 itm.setTextAlignment(0, Qt.AlignRight) |
172 itm.setTextAlignment(0, Qt.AlignRight) |
174 itm.setTextAlignment(1, Qt.AlignLeft) |
173 itm.setTextAlignment(1, Qt.AlignLeft) |
175 itm.setTextAlignment(2, Qt.AlignLeft) |
174 itm.setTextAlignment(2, Qt.AlignLeft) |
176 itm.setTextAlignment(3, Qt.AlignLeft) |
175 itm.setTextAlignment(3, Qt.AlignLeft) |
337 Private slot called, when the current item of the log tree changes. |
336 Private slot called, when the current item of the log tree changes. |
338 |
337 |
339 @param current reference to the new current item (QTreeWidgetItem) |
338 @param current reference to the new current item (QTreeWidgetItem) |
340 @param previous reference to the old current item (QTreeWidgetItem) |
339 @param previous reference to the old current item (QTreeWidgetItem) |
341 """ |
340 """ |
342 self.messageEdit.setPlainText(current.data(0, self.__messageRole).toString()) |
341 self.messageEdit.setPlainText(current.data(0, self.__messageRole)) |
343 |
342 |
344 self.filesTree.clear() |
343 self.filesTree.clear() |
345 # TODO: change this for QVariant v2 to not use eval |
344 changes = current.data(0, self.__changesRole) |
346 changes = eval(unicode(current.data(0, self.__changesRole).toString())) |
|
347 if len(changes) > 0: |
345 if len(changes) > 0: |
348 for change in changes: |
346 for change in changes: |
349 self.__generateFileItem(change["action"], change["path"], |
347 self.__generateFileItem(change["action"], change["path"], |
350 change["copyfrom_path"], change["copyfrom_revision"]) |
348 change["copyfrom_path"], change["copyfrom_revision"]) |
351 self.__resizeColumnsFiles() |
349 self.__resizeColumnsFiles() |