Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

status: fix issue of default checkbox state

I introduced tuple structure to satisfy both providing
correct 'ctype' and msgid for gettext.

Changeset e6b3c3216fd3

Parent c7bbfee98310

by Yuki KODAMA

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

Change 1 of 1 Show Entire File hggtk/​status.py Stacked
 
444
445
446
447
 
 
 
 
448
449
 
 
 
 
450
451
452
453
 
 
 
454
455
 
456
457
458
 
444
445
446
 
447
448
449
450
451
 
452
453
454
455
456
 
 
 
457
458
459
460
 
461
462
463
464
@@ -444,15 +444,21 @@
    self._show_checks = {}   row, col = 0, 0 - checks = (_('modified'), _('added'), _('removed')) + # Tuple: (ctype, translated label) + checks = (('modified', _('modified')), + ('added', _('added')), + ('removed', _('removed')))   if self.count_revs() <= 1: - checks += (_('deleted'), _('unknown'), _('clean'), _('ignored')) + checks += (('deleted', _('deleted')), + ('unknown', _('unknown')), + ('close', _('clean')), + ('ignored', _('ignored')))   - for ctype in checks: - check = gtk.CheckButton(ctype) - check.connect('toggled', self._show_toggle, ctype) + for ctuple in checks: + check = gtk.CheckButton(ctuple[1]) + check.connect('toggled', self._show_toggle, ctuple[0])   table.attach(check, col, col+1, row, row+1) - self._show_checks[ctype] = check + self._show_checks[ctuple[0]] = check   col += row   row = not row