Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

reporegistry: refactor class AllRepoGroupItem

- Kill self.name: We can implement data() and use a constant
- Subclass from RepoTreeItem directly instead of RepoGroupItem

Changeset ffe575b51f8d

Parent 842aa63e9fe8

by Adrian Buehlmann

Changes to one file · Browse files at ffe575b51f8d Showing diff from parent 842aa63e9fe8 Diff from another changeset...

 
234
235
236
237
 
238
239
240
 
 
 
 
 
 
 
 
241
242
243
 
234
235
236
 
237
238
 
 
239
240
241
242
243
244
245
246
247
248
249
@@ -234,10 +234,16 @@
  RepoTreeItem.undump(self, xr)     -class AllRepoGroupItem(RepoGroupItem): +class AllRepoGroupItem(RepoTreeItem):   def __init__(self, parent=None): - RepoGroupItem.__init__(self, parent) - self.name = _('all') + RepoTreeItem.__init__(self, parent) + + def data(self, column, role): + if role == Qt.DecorationRole: + return QVariant() + if column == 0: + return QVariant(_('all')) + return QVariant()     def setData(self, column, value):   return False