Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

history: improve behavior of branch selection

Changeset 2ec863d571cd

Parent f3fd13ff4448

by Steve Borho

Changes to one file · Browse files at 2ec863d571cd Showing diff from parent f3fd13ff4448 Diff from another changeset...

Change 1 of 5 Show Entire File hggtk/​history.py Stacked
 
181
182
183
184
185
 
 
 
 
 
186
187
188
 
334
335
336
337
338
339
 
340
341
342
 
483
484
485
486
487
488
489
490
491
492
493
494
495
 
519
520
521
 
 
 
 
 
 
 
 
 
 
 
 
 
522
523
524
 
598
599
600
601
 
 
602
 
 
603
604
605
 
181
182
183
 
 
184
185
186
187
188
189
190
191
 
337
338
339
 
 
 
340
341
342
343
 
484
485
486
 
 
 
 
 
 
 
487
488
489
 
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
 
605
606
607
 
608
609
610
611
612
613
614
615
@@ -181,8 +181,11 @@
  def filter_selected(self, widget, type):   if not widget.get_active():   return - self.filter = type - self.reload_log() + if type == 'branch': + self.select_branch(self.branchcombo) + else: + self.filter = type + self.reload_log()     def view_menu(self):   menu = gtk.Menu() @@ -334,9 +337,7 @@
  branch = opts.get('branch', None)   self.graphview.refresh(True, branch, opts)   self.set_title(_('%s branch %s') % (self.get_title(), branch)) - else: - self.branchcombo.set_active(-1) - if self.filter == 'custom': + elif self.filter == 'custom':   self.set_title(self.get_title() + _(' custom filter'))   pats = opts.get('pats', [])   if len(pats) == 1 and not os.path.isdir(pats[0]): @@ -483,13 +484,6 @@
    filterbox = gtk.HBox()   - branchcombo = gtk.combo_box_new_text() - for name in self.repo.branchtags().keys(): - branchcombo.append_text(name) - branchcombo.connect('changed', self.select_branch) - filterbox.pack_start(branchcombo, False) - self.branchcombo = branchcombo -   all = gtk.RadioButton(None, _('all'))   all.set_active(True)   all.connect('toggled', self.filter_selected, 'all') @@ -519,6 +513,19 @@
  merges.connect('toggled', self.filter_selected, 'only_merges')   filterbox.pack_start(merges, False)   + branches = gtk.RadioButton(all, _('branch')) + branches.connect('toggled', self.filter_selected, 'branch') + branches.set_sensitive(False) + self.branchbutton = branches + filterbox.pack_start(branches, False) + + branchcombo = gtk.combo_box_new_text() + for name in self.repo.branchtags().keys(): + branchcombo.append_text(name) + branchcombo.connect('changed', self.select_branch) + filterbox.pack_start(branchcombo, False) + self.branchcombo = branchcombo +   self.custombutton = gtk.RadioButton(all, _('custom'))   self.custombutton.set_sensitive(False)   filterbox.pack_start(self.custombutton, False) @@ -598,8 +605,11 @@
  row = combo.get_active()   if row >= 0:   self.filter = 'branch' - self.custombutton.set_active(True) + self.branchbutton.set_active(True) + self.branchbutton.set_sensitive(True)   self.reload_log(branch=combo.get_model()[row][0]) + else: + self.branchbutton.set_sensitive(False)     def show_goto_dialog(self):   'Launch a modeless goto revision dialog'