Changeset a9c8a7d10b44…
Parent ead0992db967…
by
Changes to 3 files · Browse files at a9c8a7d10b44 Showing diff from parent ead0992db967 Diff from another changeset...
@@ -396,6 +396,7 @@
column('rev', _('Revision Number'))
column('id', _('Changeset ID'))
+ column('revhex', _('Revision Number/ID'))
column('branch', _('Branch Name'))
column('msg', _('Summary'))
column('user', _('User'))
@@ -572,7 +573,7 @@ self.syncbox.set_property('visible', self.show_syncbar)
self.syncbox.set_no_show_all(True)
- for col in ('rev', 'date', 'id', 'branch', 'utc', 'age', 'tag'):
+ for col in ('rev', 'date', 'id', 'revhex', 'branch', 'utc', 'age', 'tag'):
if col in self.showcol:
self.graphview.set_property(col+'-column-visible',
self.showcol[col])
@@ -632,7 +633,7 @@ settings['show-syncbar'] = self.show_syncbar
settings['graphcol'] = self.graphcol
settings['compactgraph'] = self.compactgraph
- for col in ('rev', 'date', 'id', 'branch', 'utc', 'age', 'tag'):
+ for col in ('rev', 'date', 'id', 'revhex', 'branch', 'utc', 'age', 'tag'):
vis = self.graphview.get_property(col+'-column-visible')
settings['glog-vis-'+col] = vis
settings['filter-mode'] = self.filtercombo.get_active()
@@ -655,12 +656,12 @@ self.graphcol = settings.get('graphcol', True)
self.compactgraph = settings.get('compactgraph', False)
self.showcol = {}
- for col in ('rev', 'date', 'id', 'branch', 'utc', 'age', 'tag'):
+ for col in ('rev', 'date', 'id', 'revhex', 'branch', 'utc', 'age', 'tag'):
key = 'glog-vis-'+col
if key in settings:
self.showcol[col] = settings[key]
self.filter_mode = settings.get('filter-mode', 1)
- default_co = 'graph rev id branch msg user date utc age tag'
+ default_co = 'graph rev id revhex branch msg user date utc age tag'
self.column_order = settings.get('column-order', default_co)
def show_toolbar_on_start(self):
|
@@ -31,6 +31,7 @@
BRANCH = 5 # calculated on demand, not cached
HEXID = 6
+REVHEX = 14
LOCALTIME = 7
UTC = 8
@@ -105,6 +106,7 @@ if index == TAGS: return str
if index == FGCOLOR: return str
if index == AGE: return str
+ if index == REVHEX: return str
def on_get_iter(self, path):
return path[0]
@@ -123,13 +125,16 @@ return []
if column == WFILE: return path or ''
- if column in (HEXID, BRANCH, LOCALTIME, UTC):
+ if column in (HEXID, REVHEX, BRANCH, LOCALTIME, UTC):
try:
ctx = self.repo[revid]
except IndexError:
return None
if column == HEXID:
return str(ctx)
+ if column == REVHEX:
+ hexid = gtklib.markup(str(ctx), face='monospace')
+ return '%s: %s' % (revid, hexid)
if column == BRANCH:
return ctx.branch()
if column == LOCALTIME:
|
@@ -77,10 +77,15 @@ False,
gobject.PARAM_READWRITE),
'id-column-visible': (gobject.TYPE_BOOLEAN,
- 'Tags',
+ 'ID',
'Show revision ID column',
False,
gobject.PARAM_READWRITE),
+ 'revhex-column-visible': (gobject.TYPE_BOOLEAN,
+ 'Rev/ID',
+ 'Show revision number/ID column',
+ False,
+ gobject.PARAM_READWRITE),
'branch-column-visible': (gobject.TYPE_BOOLEAN,
'Branch',
'Show branch',
@@ -424,6 +429,18 @@ col.add_attribute(cell, "foreground", treemodel.FGCOLOR)
cell = gtk.CellRendererText()
+ cell.set_property("width-chars", 22)
+ cell.set_property("ellipsize", pango.ELLIPSIZE_END)
+ col = self.tvcolumns['revhex'] = gtk.TreeViewColumn(_('Rev/ID'))
+ col.set_visible(False)
+ col.set_resizable(True)
+ col.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
+ col.set_fixed_width(cell.get_size(self.treeview)[2])
+ col.pack_start(cell, expand=True)
+ col.add_attribute(cell, "foreground", treemodel.FGCOLOR)
+ col.add_attribute(cell, "markup", treemodel.REVHEX)
+
+ cell = gtk.CellRendererText()
cell.set_property("width-chars", 15)
cell.set_property("ellipsize", pango.ELLIPSIZE_END)
col = self.tvcolumns['branch'] = gtk.TreeViewColumn(_('Branch'))
@@ -506,7 +523,7 @@ col.add_attribute(cell, "text", treemodel.TAGS)
col.add_attribute(cell, "foreground", treemodel.FGCOLOR)
- cols = 'graph rev id branch msg user date utc age tag'
+ cols = 'graph rev id revhex branch msg user date utc age tag'
self.columns = cols.split()
# append columns
|
Loading...