Changeset 6be7b0d7edb2…
Parent 4a78f577647b…
by
Changes to one file · Browse files at 6be7b0d7edb2 Showing diff from parent 4a78f577647b Diff from another changeset...
@@ -148,6 +148,12 @@ if ctx.branch() != 'default':
title_line(_('branch:'), ctx.branch(), 'greybg')
title_line(_('user/date:'), ctx.user() + '\t' + date, 'changeset')
+
+ if len(ctx.parents()) == 2 and self.parent_toggle.get_active():
+ parentindex = 1
+ else:
+ parentindex = 0
+
for pctx in ctx.parents():
try:
summary = pctx.description().splitlines()[0]
@@ -157,9 +163,16 @@ change = str(pctx.rev()) + ' : ' + str(pctx)
title = _('parent:')
title += ' ' * (12 - len(title))
- buf.insert_with_tags_by_name(eob, title, 'parent')
- buf.insert_with_tags_by_name(eob, change, 'link')
- buf.insert_with_tags_by_name(eob, ' ' + summary, 'parent')
+
+ if len(ctx.parents()) == 2 and pctx == ctx.parents()[parentindex]:
+ buf.insert_with_tags_by_name(eob, title, 'parenthl')
+ buf.insert_with_tags_by_name(eob, change, 'linkhl')
+ buf.insert_with_tags_by_name(eob, ' ' + summary, 'parenthl')
+ else:
+ buf.insert_with_tags_by_name(eob, title, 'parent')
+ buf.insert_with_tags_by_name(eob, change, 'link')
+ buf.insert_with_tags_by_name(eob, ' ' + summary, 'parent')
+
buf.insert(eob, "\n")
for cctx in ctx.children():
try:
@@ -418,6 +431,9 @@ paragraph_background='#F0F0F0'))
tag_table.add(make_texttag('parent', foreground='#000090',
paragraph_background='#F0F0F0'))
+ tag_table.add(make_texttag('parenthl', foreground='#000090',
+ paragraph_background='#F0F0F0',
+ weight=pango.WEIGHT_BOLD ))
tag_table.add( make_texttag( 'mono', family='Monospace' ))
tag_table.add( make_texttag( 'blue', foreground='blue' ))
@@ -430,8 +446,13 @@ tag_table.add( make_texttag( 'yellowbg', background='yellow' ))
link_tag = make_texttag( 'link', foreground='blue',
underline=pango.UNDERLINE_SINGLE )
+ linkhl_tag = make_texttag( 'linkhl', foreground='blue',
+ underline=pango.UNDERLINE_SINGLE,
+ weight=pango.WEIGHT_BOLD )
link_tag.connect('event', self.link_event )
+ linkhl_tag.connect('event', self.link_event )
tag_table.add( link_tag )
+ tag_table.add( linkhl_tag )
def file_button_release(self, widget, event):
if event.button == 3 and not (event.state & (gtk.gdk.SHIFT_MASK |
|
Loading...