Don't underline status labels with emoji

This commit is contained in:
bleakgrey 2019-03-08 14:54:44 +03:00
parent 627756ade4
commit a043c16d19
2 changed files with 20 additions and 13 deletions

View File

@ -1,6 +1,7 @@
public enum Tootle.NotificationType {
MENTION,
REBLOG,
REBLOG_REMOTE_USER, // Internal
FAVORITE,
FOLLOW,
FOLLOW_REQUEST, // Internal
@ -12,6 +13,8 @@ public enum Tootle.NotificationType {
return "mention";
case REBLOG:
return "reblog";
case REBLOG_REMOTE_USER:
return "reblog_remote";
case FAVORITE:
return "favourite";
case FOLLOW:
@ -31,6 +34,8 @@ public enum Tootle.NotificationType {
return MENTION;
case "reblog":
return REBLOG;
case "reblog_remote":
return REBLOG_REMOTE_USER;
case "favourite":
return FAVORITE;
case "follow":
@ -47,17 +52,19 @@ public enum Tootle.NotificationType {
public string get_desc (Account? account) {
switch (this) {
case MENTION:
return _("<a href=\"%s\"><b>%s</b></a> mentioned you").printf (account.url, account.display_name);
return _("<span underline=\"none\"><a href=\"%s\"><b>%s</b></a> mentioned you</span>").printf (account.url, account.display_name);
case REBLOG:
return _("<a href=\"%s\"><b>%s</b></a> boosted your toot").printf (account.url, account.display_name);
return _("<span underline=\"none\"><a href=\"%s\"><b>%s</b></a> boosted your toot</span>").printf (account.url, account.display_name);
case REBLOG_REMOTE_USER:
return _("<span underline=\"none\"><a href=\"%s\"><b>%s</b></a> boosted</span>").printf (account.url, account.display_name);
case FAVORITE:
return _("<a href=\"%s\"><b>%s</b></a> favorited your toot").printf (account.url, account.display_name);
return _("<span underline=\"none\"><a href=\"%s\"><b>%s</b></a> favorited your toot</span>").printf (account.url, account.display_name);
case FOLLOW:
return _("<a href=\"%s\"><b>%s</b></a> now follows you").printf (account.url, account.display_name);
return _("<span underline=\"none\"><a href=\"%s\"><b>%s</b></a> now follows you</span>").printf (account.url, account.display_name);
case FOLLOW_REQUEST:
return _("<a href=\"%s\"><b>%s</b></a> wants to follow you").printf (account.url, account.display_name);
return _("<span underline=\"none\"><a href=\"%s\"><b>%s</b></a> wants to follow you</span>").printf (account.url, account.display_name);
case WATCHLIST:
return _("<a href=\"%s\"><b>%s</b></a> posted a toot").printf (account.url, account.display_name);
return _("<span underline=\"none\"><a href=\"%s\"><b>%s</b></a> posted a toot</span>").printf (account.url, account.display_name);
default:
assert_not_reached();
}

View File

@ -134,7 +134,7 @@ public class Tootle.StatusWidget : Gtk.EventBox {
image.margin_top = 6;
image.show ();
var label_text = _("<a href=\"%s\"><b>%s</b></a> boosted").printf (this.status.account.url, this.status.account.display_name);
var label_text = NotificationType.REBLOG_REMOTE_USER.get_desc (status.account);
var label = new RichLabel (label_text);
label.halign = Align.START;
label.margin_top = 6;