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

stable repofilter: Do not use empty label on branch combobox when showing all branches

Changeset b5f20f71fb5d

Parent bfab15827483

by Angel Ezquerra

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

 
26
27
28
 
 
29
30
31
 
209
210
211
212
 
213
214
215
216
217
218
 
 
219
220
221
 
225
226
227
228
 
 
 
 
 
229
230
231
 
26
27
28
29
30
31
32
33
 
211
212
213
 
214
215
216
217
218
219
220
221
222
223
224
225
 
229
230
231
 
232
233
234
235
236
237
238
239
@@ -26,6 +26,8 @@
    branchChanged = pyqtSignal(unicode, bool)   """Emitted (branch, allparents) when branch selection changed""" + + _allBranchesLabel = u'\u2605 ' + _('Show all') + u' \u2605'     def __init__(self, repo, parent):   super(RepoFilterBar, self).__init__(parent) @@ -209,13 +211,15 @@
    self._branchReloading = True   self._branchCombo.clear() - self._branchCombo.addItem('') + self._branchCombo.addItem(self._allBranchesLabel)   for branch in branches:   self._branchCombo.addItem(branch)   self._branchLabel.setEnabled(self.filterEnabled and len(branches) > 1)   self._branchCombo.setEnabled(self.filterEnabled and len(branches) > 1)   self._branchReloading = False   + if not curbranch: + curbranch = self._allBranchesLabel   self.setBranch(curbranch)     @pyqtSlot(unicode) @@ -225,7 +229,11 @@
    def branch(self):   """Return the current branch name [unicode]""" - return unicode(self._branchCombo.currentText()) + curbranch = self._branchCombo.currentText() + if curbranch == self._allBranchesLabel: + curbranch = '' + + return unicode(curbranch)     @pyqtSlot()   def _emitBranchChanged(self):