Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

cslist: improve performance to show snipped csinfo

Changeset 243fa0acaaa3

Parent 5655c4b25d99

by Yuki KODAMA

Changes to one file · Browse files at 243fa0acaaa3 Showing diff from parent 5655c4b25d99 Diff from another changeset...

 
102
103
104
105
106
 
107
108
109
 
521
522
523
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524
525
526
 
684
685
686
687
 
 
 
 
 
 
 
688
689
690
 
692
693
694
 
 
 
 
 
 
695
696
697
 
102
103
104
 
 
105
106
107
108
 
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
 
697
698
699
 
700
701
702
703
704
705
706
707
708
709
 
711
712
713
714
715
716
717
718
719
720
721
722
@@ -102,8 +102,7 @@
  self.csbox.set_border_width(4)     # signal handlers - self.allbtn.connect('clicked', lambda b: self.update(self.curitems, \ - self.currepo, limit=False, queue=False, keep=True)) + self.allbtn.connect('clicked', lambda b: self.expand_items())   self.compactopt.connect('toggled', lambda b: self.update( \   self.curitems, self.currepo, queue=False, keep=True))   @@ -521,6 +520,20 @@
  self.get_sep(0).set_visible(False)   self.get_sep(-1).set_visible(False)   + def expand_items(self): + if not self.has_limit(): + return + # insert snipped csinfo + rest = self.curitems[self.limit - 1:-1] + for pos, item in enumerate(rest): + self.insert_csinfo(item, self.limit + pos) + # remove snip + self.remove_snip() + + self.showitems = self.curitems[:] + self.update_seps() + self.update_status() +   def reorder_item(self, pos, insert):   """   pos: Number, the position of item to move. This must be curitems @@ -684,7 +697,13 @@
  self.itemmap['snip'] = {'widget': wrapbox,   'snip': snipbox,   'sep': sep} - return wrapbox + + def remove_snip(self): + if not self.has_limit(): + return + snip = self.itemmap['snip']['widget'] + self.csbox.remove(snip) + del self.itemmap['snip']     ### signal handlers ###   @@ -692,6 +711,12 @@
  self.chkmap[item] = button.get_active()   self.update_status()   + def allbtn_clicked(self, button): + self.update(self.curitems, self.currepo, limit=False, + queue=False, keep=True) + + ### dnd signal handlers ### +   def dnd_begin(self, widget, context):   self.setup_dnd()   context.set_icon_pixbuf(self.dnd_pb, 0, 0)