[Xfce4-commits] [apps/xfce4-notifyd] 01/01: logviewer: Check for markup in the notification body
noreply at xfce.org
noreply at xfce.org
Tue Sep 5 15:36:11 CEST 2017
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-notifyd.
commit 26790d0e9effefd084d0088267625eba55c1eb4d
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Sep 5 15:35:48 2017 +0200
logviewer: Check for markup in the notification body
---
xfce4-notifyd-config/main.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/xfce4-notifyd-config/main.c b/xfce4-notifyd-config/main.c
index 39be4af..3acd2c5 100644
--- a/xfce4-notifyd-config/main.c
+++ b/xfce4-notifyd-config/main.c
@@ -567,7 +567,16 @@ xfce4_notifyd_log_populate (NotificationLogWidgets *log_widgets)
#endif
g_free (markup);
tmp = g_key_file_get_string (notify_log, group, "body", NULL);
- body = gtk_label_new (tmp);
+ body = gtk_label_new (NULL);
+ if (pango_parse_markup (tmp, -1, 0, NULL, NULL, NULL, NULL)) {
+ gtk_label_set_markup (GTK_LABEL (body), tmp);
+ } else {
+ gchar *tmp1;
+
+ tmp1 = g_markup_escape_text (tmp, -1);
+ gtk_label_set_text (GTK_LABEL (body), tmp1);
+ g_free (tmp1);
+ }
g_free (tmp);
#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (body), 0);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list