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

treeview: add set_columns and get_columns

allows to set and get the order of the columns

Changeset ba3cc25b417b

Parent f41205df5a2f

by Adrian Buehlmann

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

 
513
514
515
 
 
 
 
 
 
 
 
 
 
 
 
 
516
517
518
 
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
@@ -513,6 +513,19 @@
  c = self.tvcolumns[cn]   self.treeview.append_column(c)   + def set_columns(self, columns): + if ' '.join(columns) != ' '.join(self.columns): + for cn in self.columns: + c = self.tvcolumns[cn] + self.treeview.remove_column(c) + for cn in columns: + c = self.tvcolumns[cn] + self.treeview.append_column(c) + self.columns = columns + + def get_columns(self): + return self.columns +   def text_color_orig(self, parents, rev, author):   if int(rev) >= self.origtip:   return 'darkgreen'