[Xfce4-commits] [xfce/libxfce4ui] 01/01: Allows to properly show some characters, such as ampersand.
noreply at xfce.org
noreply at xfce.org
Tue Dec 5 14:20:14 CET 2017
This is an automated email from the git hooks/post-receive script.
s k u n n y k 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 xfce/libxfce4ui.
commit 8c99d266d7a9b0b09b1dc52df9c5bca2e812247c
Author: Romain B <skunnyk at alteroot.org>
Date: Tue Dec 5 13:43:13 2017 +0100
Allows to properly show some characters, such as ampersand.
- This fix xfce_dialog_show_warning, xfce_dialog_show_info, xfce_dialog_show_info etc
- Broken since gtk3 port
- Fix bug #12715
---
libxfce4ui/xfce-dialogs.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libxfce4ui/xfce-dialogs.c b/libxfce4ui/xfce-dialogs.c
index cf402f9..e585810 100644
--- a/libxfce4ui/xfce-dialogs.c
+++ b/libxfce4ui/xfce-dialogs.c
@@ -587,9 +587,12 @@ xfce_message_dialog_new_valist (GtkWindow *parent,
if (primary_text != NULL)
{
+ /* escape ampersand symbols, etc. (bug #12715) */
+ gchar *escaped_text = g_markup_escape_text (primary_text, -1);
+
/* Add a top line of large bold text */
GtkWidget *primary_label = gtk_label_new (NULL);
- gchar *markedup_text = g_strdup_printf ("<span weight='bold' size='large'>%s</span>", primary_text);
+ gchar *markedup_text = g_strdup_printf ("<span weight='bold' size='large'>%s</span>", escaped_text);
gtk_label_set_markup (GTK_LABEL (primary_label), markedup_text);
gtk_label_set_xalign (GTK_LABEL (primary_label), 0);
@@ -599,6 +602,7 @@ xfce_message_dialog_new_valist (GtkWindow *parent,
gtk_container_add (GTK_CONTAINER (label_box), primary_label);
gtk_widget_show (primary_label);
+ g_free (escaped_text);
g_free (markedup_text);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list