Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.3, 2.0, and 2.0.1

stable repofilter: add a setEnableFilter method

This allows the repowidget to temporarily disable the user from changing the
filter through the filter bar's widget. It does allow the filtercb to be
toggled, since this does not change the revset. This is mostly intended for
incoming revision sets.

Changeset dd6e668abde5

Parent 27c0263a2080

by Steve Borho

Changes to one file · Browse files at dd6e668abde5 Showing diff from parent 27c0263a2080 Diff from another changeset...

 
34
35
36
 
37
38
39
 
91
92
93
 
 
 
 
 
 
 
 
 
 
 
94
95
96
 
189
190
191
192
193
 
 
194
195
196
 
34
35
36
37
38
39
40
 
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
 
201
202
203
 
 
204
205
206
207
208
@@ -34,6 +34,7 @@
  self.setFloatable(False)   self.setMovable(False)   self._repo = repo + self.filterEnabled = True     self.entrydlg = revset.RevisionSetQuery(repo, self)   self.entrydlg.progress.connect(self.progress) @@ -91,6 +92,17 @@
  self._initbranchfilter()   self.refresh()   + def setEnableFilter(self, enabled): + 'Enable/disable the changing of the current filter' + self.revsetcombo.setEnabled(enabled) + self.clearBtn.setEnabled(enabled) + self.searchBtn.setEnabled(enabled) + self.editorBtn.setEnabled(enabled) + self.deleteBtn.setEnabled(enabled) + self._branchCombo.setEnabled(enabled) + self._branchLabel.setEnabled(enabled) + self.filterEnabled = enabled +   def selectionChanged(self):   selection = self.revsetcombo.lineEdit().selectedText()   self.deleteBtn.setEnabled(selection in self.revsethist) @@ -189,8 +201,8 @@
  self._branchCombo.addItem('')   for branch in branches:   self._branchCombo.addItem(branch) - self._branchLabel.setEnabled(len(branches) > 1) - self._branchCombo.setEnabled(len(branches) > 1) + self._branchLabel.setEnabled(self.filterEnabled and len(branches) > 1) + self._branchCombo.setEnabled(self.filterEnabled and len(branches) > 1)   self._branchReloading = False     self.setBranch(curbranch)