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 context menu to the 'current filename' label

Changeset f0c8331eaae9

Parent ecc99425d95b

by Steve Borho

Changes to one file · Browse files at f0c8331eaae9 Showing diff from parent ecc99425d95b Diff from another changeset...

 
23
24
25
26
27
28
29
 
143
144
145
 
 
 
 
146
147
148
 
169
170
171
 
 
 
 
 
 
 
 
 
 
 
172
173
174
 
23
24
25
 
26
27
28
 
142
143
144
145
146
147
148
149
150
151
 
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
@@ -23,7 +23,6 @@
 # working copy browser.    # Technical Debt -# Need mechanism to override file size/binary check  # We need a real icon set for file status types  # Add some initial drag distance before starting QDrag  # (it interferes with selection the way it is now) @@ -143,6 +142,10 @@
  hbox = QHBoxLayout()   hbox.setContentsMargins (5, 7, 0, 0)   self.fnamelabel = QLabel() + self.fnamelabel.setContextMenuPolicy(Qt.CustomContextMenu) + self.connect(self.fnamelabel, + SIGNAL('customContextMenuRequested(const QPoint &)'), + self.customContextMenuRequested)   hbox.addWidget(self.fnamelabel)   hbox.addStretch()   @@ -169,6 +172,17 @@
    self.refreshWctx()   + def customContextMenuRequested(self, point): + 'menu request for filename label' + if self.curRow is None: + return + point = self.fnamelabel.mapToGlobal(point) + path, status, mst, u = self.curRow + selrows = [(set(status+mst.lower()), path), ] + action = wctxactions.wctxactions(self, point, self.repo, selrows) + if action: + self.emit(SIGNAL('menuAction()')) +   def keyPressEvent(self, event):   if event.key() == Qt.Key_F5:   self.te.clear()