Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

repotreeitem: allow rename and open-all on the default group

Changeset 8765460b7cf9

Parent 960103388bac

by Phil Currier

Changes to one file · Browse files at 8765460b7cf9 Showing diff from parent 960103388bac Diff from another changeset...

 
255
256
257
258
 
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
 
286
287
 
 
 
 
288
 
255
256
257
 
258
259
260
261
262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
 
 
 
 
 
 
 
 
264
265
266
267
268
269
270
271
@@ -255,34 +255,17 @@
  return False     -class AllRepoGroupItem(RepoTreeItem): +class AllRepoGroupItem(RepoGroupItem):   def __init__(self, model, parent=None):   RepoTreeItem.__init__(self, model, parent)   self.name = _('default')   - def data(self, column, role): - if role == Qt.DecorationRole: - if column == 0: - s = QApplication.style() - ico = s.standardIcon(QStyle.SP_DirIcon) - return QVariant(ico) - return QVariant() - if column == 0: - return QVariant(self.name) - return QVariant() - - def setData(self, column, value): - return False -   def menulist(self): - return ['add', 'newGroup'] - - def flags(self): - return (Qt.ItemIsEnabled | Qt.ItemIsSelectable | Qt.ItemIsDropEnabled - | Qt.ItemIsDragEnabled) - - def dump(self, xw): - RepoTreeItem.dump(self, xw) + return ['openAll', 'add', None, 'newGroup', None, 'rename']     def undump(self, xr): + a = xr.attributes() + name = a.value('', 'name').toString() + if name: + self.name = name   RepoTreeItem.undump(self, xr)