Hyperlink emails onto names in commit details

Instead of separating email addresses from author / commiter names,
turn them into hyperlinks, reveal the addresses on hover with a tooltip.

This allows for a much more compact and aesthetically-pleasing UI.

Related: https://gitlab.gnome.org/GNOME/gitg/-/issues/440
This commit is contained in:
Jean-François Fortin Tam 2024-02-10 12:21:31 -05:00 committed by Alberto Fanjul
parent e519c95382
commit fe1e97719e

View File

@ -204,7 +204,7 @@ class Gitg.DiffViewCommitDetails : Gtk.Grid
var name = Markup.escape_text(author.get_name());
var email = Markup.escape_text(author.get_email());
return "%s &lt;<a href=\"mailto:%s\">%s</a>&gt;".printf(name, email, email);
return "<a href=\"mailto:%s\" title=\"%s\">%s</a>".printf(email, email, name);
}
private void update()