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

status: replace reselect hack with less onerous hack

Turns out it was selecting each row in turn, causing the dialog
to load diffs for each file in turn.. at a rate of ~1 second each.

Gtk's documented workaround for this: signal_handler_(un)block()
results in attribute erorrs (doesn't exist). So I set an early out
variable to tell the selection change handler to not load anything.

Changeset bad263cdd8b6

Parent 3fa6d2fa368e

by Steve Borho

Changes to one file · Browse files at bad263cdd8b6 Showing diff from parent 3fa6d2fa368e Diff from another changeset...

Change 1 of 3 Show Entire File hggtk/​status.py Stacked
 
618
619
620
621
622
623
624
625
 
 
 
 
 
 
626
627
628
 
858
859
860
 
 
861
862
863
 
902
903
904
 
 
905
906
907
 
618
619
620
 
 
 
 
 
621
622
623
624
625
626
627
628
629
 
859
860
861
862
863
864
865
866
 
905
906
907
908
909
910
911
912
@@ -618,11 +618,12 @@
  self.auto_check()     selected = False - if len(reselect) < 100: # issue 181 hack - for row in model: - if row[FM_PATH] in reselect: - selection.select_iter(row.iter) - selected = True + self.ready = False + for row in model: + if row[FM_PATH] in reselect: + selection.select_iter(row.iter) + selected = True + self.ready = True   if not selected:   selection.select_path((0,))   @@ -858,6 +859,8 @@
  def merge_sel_changed(self, selection):   'Selected row in file tree activated changed (merge mode)'   # Update the diff text with merge diff to both parents + if not self.ready: + return   model, paths = selection.get_selected_rows()   if not paths:   return @@ -902,6 +905,8 @@
  def tree_sel_changed(self, selection):   'Selected row in file tree activated changed'   # Read this file's diffs into diff model + if not self.ready: + return   model, paths = selection.get_selected_rows()   if not paths:   return