On 30.10.2009 10:03, Yuki KODAMA wrote:
> # HG changeset patch
> # User Yuki KODAMA <endflow....@gmail.com>
> # Date 1256886743 -32400
> # Branch stable
> # Node ID 4b477c4fa4e2b911059c7efd3c9c9233e5546838
> # Parent  171990177c086cab7ce964bfebe518c0c8f69d04
> 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.
> 
> diff --git a/tortoisehg/hgtk/changeset.py b/tortoisehg/hgtk/changeset.py
> --- a/tortoisehg/hgtk/changeset.py
> +++ b/tortoisehg/hgtk/changeset.py
> @@ -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,23 +520,23 @@
>              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)]
> -                if branch:
> -                    revfmt = '%s (%s) [%s]'
> -                    revargs.append(gtklib.markup(branch, color='black',
> -                        background='#aaffaa'))
> -
> -                rev = revfmt % tuple(revargs)
> +                rev = '%s (%s)' % (gtklib.markup(revnum, **opts),
> +                        revid_markup(revid, **opts))
>                  link = gtk.Label()
>                  link.set_markup(rev)
>                  link.set_selectable(True)
>                  link.connect('button-release-event', self.link_event, revnum)
> -                text = gtk.Label(summary)
> +                # body label

Why are you using the word "body" in this comment?

Isn't this the summary you are dealing with below?

> +                sum = gtklib.markup(summary)
> +                if branch:
> +                    sum = gtklib.markup(branch, color='black',
> +                        background='#aaffaa') + ' ' + sum
> +                text = gtk.Label()
> +                text.set_markup(sum)
>                  text.set_selectable(True)
>                  box = gtk.HBox()
>                  box.pack_start(link, False, False)

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to