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 intelligent tooltips

Changeset 64c97c2026da

Parent f967eef82208

by Steve Borho

Changes to one file · Browse files at 64c97c2026da Showing diff from parent f967eef82208 Diff from another changeset...

 
123
124
125
 
 
 
 
 
 
 
 
 
 
 
126
127
128
 
169
170
171
 
 
 
 
172
173
174
 
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
 
180
181
182
183
184
185
186
187
188
189
@@ -123,6 +123,17 @@
 COL_PATH_DISPLAY = 2  COL_PATH = 3   +tips = { + 'M': _('%s is modified'), + 'A': _('%s is added'), + 'R': _('%s is removed'), + '?': _('%s is not tracked (unknown)'), + '!': _('%s is missing!'), + 'I': _('%s is ignored'), + 'C': _('%s is not modified (clean)'), + 'S': _('%s is a dirty subrepo'), +} +  class WctxModel(QAbstractTableModel):   def __init__(self, wctx, parent=None):   QAbstractTableModel.__init__(self, parent) @@ -169,6 +180,10 @@
  return Qt.Unchecked   elif role == Qt.DisplayRole:   return QVariant(self.rows[index.row()][index.column()]) + elif role == Qt.ToolTipRole: + checked, status, upath, path = self.rows[index.row()] + if status in tips: + return QVariant(tips[status] % upath)   return QVariant()     def headerData(self, col, orientation, role):