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

stable changeset: move branch name to summary label

Remove brackets of branch name and unexpected rev jump.
If branch name is embedded in rev label, it will be the cause
of unexpected 'revision jump' on click.

Changeset ad1c49b26627

Parent 67d73a7d8f80

by Yuki KODAMA

Changes to one file · Browse files at ad1c49b26627 Showing diff from parent 67d73a7d8f80 Diff from another changeset...

 
499
500
501
502
 
503
504
505
506
 
507
508
509
 
520
521
522
 
523
524
525
526
527
528
 
 
 
 
 
 
 
 
529
530
531
532
533
534
535
536
537
538
539
540
 
 
 
 
 
541
542
543
 
 
544
545
546
 
499
500
501
 
502
503
504
505
 
506
507
508
509
 
520
521
522
523
524
525
526
 
 
 
527
528
529
530
531
532
533
534
535
 
 
 
 
 
 
 
 
 
 
 
536
537
538
539
540
541
 
 
542
543
544
545
546
@@ -499,11 +499,11 @@
  if revid:   revid = revid_markup(revid)   if branch: - return '%s (%s) [%s] %s' % (revnum, revid, branch, summary) + return '%s (%s) %s %s' % (revnum, revid, branch, summary)   return '%s (%s) %s' % (revnum, revid, summary)   else:   if branch: - return '%s [%s] - %s' % (revnum, branch, summary) + return '%s - %s %s' % (revnum, branch, summary)   return '%s - %s' % (revnum, summary)   if item in ('cset', 'transplant', 'patch'):   if isinstance(value, basestring): @@ -520,27 +520,27 @@
  raise csinfo.UnknownItem(item)   def widget_func(widget, item, markups):   def linkwidget(revnum, revid, summary, highlight=None, branch=None): + # revision label   opts = dict(underline='single', foreground='#0000FF')   if highlight:   opts['weight'] = 'bold' - revfmt = '%s (%s)' - revargs = [gtklib.markup(revnum, **opts), - revid_markup(revid, **opts)] + rev = '%s (%s)' % (gtklib.markup(revnum, **opts), + revid_markup(revid, **opts)) + revlabel = gtk.Label() + revlabel.set_markup(rev) + revlabel.set_selectable(True) + revlabel.connect('button-release-event', self.link_event, revnum) + # summary & branch label + sum = gtklib.markup(summary)   if branch: - revfmt = '%s (%s) [%s]' - revargs.append(gtklib.markup(branch, color='black', - background='#aaffaa')) - - rev = revfmt % tuple(revargs) - link = gtk.Label() - link.set_markup(rev) - link.set_selectable(True) - link.connect('button-release-event', self.link_event, revnum) - text = gtk.Label(summary) - text.set_selectable(True) + sum = gtklib.markup(branch, color='black', + background='#aaffaa') + ' ' + sum + sumlabel = gtk.Label() + sumlabel.set_markup(sum) + sumlabel.set_selectable(True)   box = gtk.HBox() - box.pack_start(link, False, False) - box.pack_start(text, True, True, 4) + box.pack_start(revlabel, False, False) + box.pack_start(sumlabel, True, True, 4)   return box   def genwidget(param):   if isinstance(param, basestring):