Commits

Martin Geisler committed 9d91727

history: save and restore column widths

Fixes #1380.

Comments (0)

Files changed (1)

tortoisehg/hgtk/history.py

                 self.graphview.set_property(col + '-column-visible', vis)
             if vis:
                 columns.append(col)
+            width = self.colwidths.get(col)
+            if width:
+                column = self.graphview.tvcolumns[col]
+                column.set_fixed_width(width)
         self.graphview.set_columns(columns)
 
         self.cmd_set_sensitive('compact-graph', self.graphcol)
         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
+        for col in COLS.split():
+            column = self.graphview.tvcolumns[col]
+            settings['glog-width-' + col] = column.get_width()
         settings['filter-mode'] = self.filtercombo.get_active()
         settings['column-order'] = self.column_order
         return settings
         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.colwidths = {}
+        for col in COLS.split():
+            self.colwidths[col] = settings.get('glog-width-' + col)
         self.filter_mode = settings.get('filter-mode', 1)
         order = settings.get('column-order', COLS)
         order_list, def_list = order.split(), COLS.split()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.