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

status: add a label indicating count of checked files

Let's settle on 'checkmarked' instead of selected, for this interface

Changeset 03cdd729ccf5

Parent 4fec2468ec0c

by Steve Borho

Changes to 2 files · Browse files at 03cdd729ccf5 Showing diff from parent 4fec2468ec0c Diff from another changeset...

 
16
17
18
19
20
21
22
 
 
 
 
23
24
25
 
16
17
18
 
 
 
 
19
20
21
22
23
24
25
@@ -16,10 +16,10 @@
   from tortoisehg.hgqt import qtlib, status, cmdui   -LABELS = { 'add': (_('Select files to add'), _('Add')), - 'forget': (_('Select files to forget'), _('Forget')), - 'revert': (_('Select files to revert'), _('Revert')), - 'remove': (_('Select files to remove'), _('Remove')),} +LABELS = { 'add': (_('Checkmark files to add'), _('Add')), + 'forget': (_('Checkmark files to forget'), _('Forget')), + 'revert': (_('Checkmark files to revert'), _('Revert')), + 'remove': (_('Checkmark files to remove'), _('Remove')),}    class QuickOpDialog(QtGui.QDialog):   """ Dialog for performing quick dirstate operations """
 
103
104
105
 
 
106
107
108
 
247
248
249
 
 
 
 
 
 
250
251
252
 
517
518
519
 
520
521
522
 
103
104
105
106
107
108
109
110
 
249
250
251
252
253
254
255
256
257
258
259
260
 
525
526
527
528
529
530
531
@@ -103,6 +103,8 @@
  cpb = QPushButton(_('Remove filter, show root'))   vbox.addWidget(cpb)   cpb.clicked.connect(clearPattern) + self.countlbl = QLabel() + vbox.addWidget(self.countlbl)     self.connect(tv, SIGNAL('clicked(QModelIndex)'), self.rowSelected)   self.connect(tv, SIGNAL('menuAction()'), self.refreshWctx) @@ -247,6 +249,12 @@
  self.connect(self.tv, SIGNAL('activated(QModelIndex)'), tm.toggleRow)   self.connect(self.tv, SIGNAL('pressed(QModelIndex)'), tm.pressedRow)   self.connect(self.le, SIGNAL('textEdited(QString)'), tm.setFilter) + self.connect(tm, SIGNAL('checkToggled()'), self.updateCheckCount) + self.updateCheckCount() + + def updateCheckCount(self): + text = _('Checkmarked file count: %d') % len(self.getChecked()) + self.countlbl.setText(text)     def isMerge(self):   return bool(self.wctx.p2()) @@ -517,6 +525,7 @@
  self.emit(SIGNAL("layoutAboutToBeChanged()"))   self.checked[fname] = not self.checked[fname]   self.emit(SIGNAL("layoutChanged()")) + self.emit(SIGNAL("checkToggled()"))     def pressedRow(self, index):   'Connected to "pressed" signal, emitted by mouse clicks'