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

status: emit menu requests from WctxFileTree and handle in StatusWidget

No functionality change.

Changeset 2f6d7279ac1b

Parent bcf75adfe332

by Steve Borho

Changes to one file · Browse files at 2f6d7279ac1b Showing diff from parent bcf75adfe332 Diff from another changeset...

 
152
153
154
155
156
157
158
159
 
160
161
162
 
207
208
209
 
 
 
 
 
 
210
211
212
 
396
397
398
399
 
400
401
402
 
458
459
460
461
462
463
464
 
 
465
466
467
 
152
153
154
 
155
156
157
158
159
160
161
162
 
207
208
209
210
211
212
213
214
215
216
217
218
 
402
403
404
 
405
406
407
408
 
464
465
466
 
 
 
 
467
468
469
470
471
@@ -152,11 +152,11 @@
  hcbox.addStretch(1)   hcbox.addWidget(self.countlbl)   - tv.menuAction.connect(self.refreshWctx)   tv.setItemsExpandable(False)   tv.setRootIsDecorated(False)   tv.sortByColumn(COL_STATUS, Qt.AscendingOrder)   tv.clicked.connect(self.onRowClicked) + tv.menuRequest.connect(self.onMenuRequest)   le.textEdited.connect(self.setFilter)     def statusTypeTrigger(status): @@ -207,6 +207,12 @@
  self.fileview.saveSettings(qs, prefix+'/fileview')   qs.setValue(prefix+'/state', self.split.saveState())   + @pyqtSlot(QPoint, object) + def onMenuRequest(self, point, selected): + action = wctxactions.wctxactions(self, point, self.repo, selected) + if action: + self.refreshWctx() +   def refreshWctx(self):   if self.refthread:   return @@ -396,7 +402,7 @@
     class WctxFileTree(QTreeView): - menuAction = pyqtSignal() + menuRequest = pyqtSignal(QPoint, object)     def __init__(self, repo, parent=None):   QTreeView.__init__(self, parent) @@ -458,10 +464,8 @@
  for index in self.selectedRows():   path, status, mst, u, ext, sz = self.model().getRow(index)   selrows.append((set(status+mst.lower()), path)) - point = self.mapToGlobal(point) - action = wctxactions.wctxactions(self, point, self.repo, selrows) - if action: - self.menuAction.emit() + if selrows: + self.menuRequest.emit(self.mapToGlobal(point), selrows)     def selectedRows(self):   return self.selectionModel().selectedRows()