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

history: fix columns issue on first run

The issue was introduced at <a1eb5844b2e3>.

Changeset 96711ee3ae1b

Parent 78d2a058b069

by Yuki KODAMA

Changes to one file · Browse files at 96711ee3ae1b Showing diff from parent 78d2a058b069 Diff from another changeset...

 
21
22
23
24
 
 
25
26
27
 
718
719
720
721
 
722
723
724
 
775
776
777
778
779
 
 
780
781
782
 
799
800
801
802
803
804
805
 
 
 
806
807
808
 
 
809
810
811
 
21
22
23
 
24
25
26
27
28
 
719
720
721
 
722
723
724
725
 
776
777
778
 
 
779
780
781
782
783
 
800
801
802
 
 
 
 
803
804
805
806
 
 
807
808
809
810
811
@@ -21,7 +21,8 @@
 from tortoisehg.util import hglib    from tortoisehg.hgtk.logview.treeview import TreeView as LogTreeView -from tortoisehg.hgtk.logview.treeview import COLS as DEFAULT_COLS +from tortoisehg.hgtk.logview.treeview import COLS +DEFAULT_COLS = 'graph msg user age'.split()    from tortoisehg.hgtk import gdialog, gtklib, hgcmd, gorev, thgstrip  from tortoisehg.hgtk import backout, status, hgemail, tagadd, update, merge @@ -718,7 +719,7 @@
  for col in [c for c in self.column_order.split()]:   if col == 'graph':   vis = self.graphcol - elif col in self.showcol: + else:   vis = self.showcol[col]   self.graphview.set_property(col + '-column-visible', vis)   if vis: @@ -775,8 +776,8 @@
  settings['show-syncbar'] = self.show_syncbar   settings['graphcol'] = self.graphcol   settings['compactgraph'] = self.compactgraph - for col in [col for col in DEFAULT_COLS.split() if col != 'graph']: - vis = self.graphview.get_property(col+'-column-visible') + for col in [col for col in COLS.split() if col != 'graph']: + vis = self.graphview.get_property(col + '-column-visible')   settings['glog-vis-'+col] = vis   settings['filter-mode'] = self.filtercombo.get_active()   settings['column-order'] = self.column_order @@ -799,13 +800,12 @@
  self.graphcol = settings.get('graphcol', True)   self.compactgraph = settings.get('compactgraph', False)   self.showcol = {} - for col in [col for col in DEFAULT_COLS.split() if col != 'graph']: - key = 'glog-vis-'+col - if key in settings: - self.showcol[col] = settings[key] + for col in [col for col in COLS.split() if col != 'graph']: + key = 'glog-vis-' + col + self.showcol[col] = settings.get(key, col in DEFAULT_COLS)   self.filter_mode = settings.get('filter-mode', 1) - order = settings.get('column-order', DEFAULT_COLS) - order_list, def_list = order.split(), DEFAULT_COLS.split() + order = settings.get('column-order', COLS) + order_list, def_list = order.split(), COLS.split()   order_len, def_len = len(order_list), len(def_list)   if order_len != def_len:   # add newly added columns if exists