From 3fa974b37a629eab3668b2565dd0c59dbe38c1a8 Mon Sep 17 00:00:00 2001 From: kajzer Date: Fri, 7 Oct 2016 16:48:19 +0200 Subject: Fix: bold formatting #111 --- src/themes/nodoka/nodoka-theme.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/themes/nodoka') diff --git a/src/themes/nodoka/nodoka-theme.c b/src/themes/nodoka/nodoka-theme.c index dcb8449..b4420bd 100644 --- a/src/themes/nodoka/nodoka-theme.c +++ b/src/themes/nodoka/nodoka-theme.c @@ -891,18 +891,15 @@ set_notification_text(GtkWindow *nw, const char *summary, const char *body) gtk_label_set_markup(GTK_LABEL(windata->summary_label), str); g_free(str); - if (strstr(body, "&") || strstr(body, "<") || strstr(body, ">") || strstr(body, "'") || strstr(body, """)) + if (pango_parse_markup (body, -1, 0, NULL, NULL, NULL, NULL)) { str = g_strdup_printf("%s", body); + gtk_label_set_markup (GTK_LABEL (windata->body_label), str); + g_free(str); } - else - { - quoted = g_markup_escape_text(body, -1); - str = g_strdup_printf("%s", quoted); - g_free(quoted); + else { + gtk_label_set_text (GTK_LABEL (windata->body_label), body); } - gtk_label_set_markup(GTK_LABEL(windata->body_label), str); - g_free(str); if (body == NULL || *body == '\0') gtk_widget_hide(windata->body_label); -- cgit v1.2.1