summaryrefslogtreecommitdiff
path: root/src/themes/coco
diff options
context:
space:
mode:
authorkajzer <[email protected]>2016-10-07 16:48:19 +0200
committerkajzer <[email protected]>2016-10-07 16:48:19 +0200
commit3fa974b37a629eab3668b2565dd0c59dbe38c1a8 (patch)
treed6ce07f35b7dd6fea58aea4c024111147c8e8217 /src/themes/coco
parent7bf293b7c187f12c9b2697ba2b6e02b3281b574a (diff)
downloadmate-notification-daemon-3fa974b37a629eab3668b2565dd0c59dbe38c1a8.tar.bz2
mate-notification-daemon-3fa974b37a629eab3668b2565dd0c59dbe38c1a8.tar.xz
Fix: bold formatting #111
Diffstat (limited to 'src/themes/coco')
-rw-r--r--src/themes/coco/coco-theme.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c
index c1fa929..ae4037b 100644
--- a/src/themes/coco/coco-theme.c
+++ b/src/themes/coco/coco-theme.c
@@ -506,18 +506,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, "&amp;") || strstr(body, "&lt;") || strstr(body, "&gt;") || strstr(body, "&apos;") || strstr(body, "&quot;"))
+ if (pango_parse_markup (body, -1, 0, NULL, NULL, NULL, NULL))
{
str = g_strdup_printf("<span color=\"#EAEAEA\">%s</span>", 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("<span color=\"#EAEAEA\">%s</span>", 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);