From 3e414e6698ab5028eec1a6f9ed65cedcb9b9db71 Mon Sep 17 00:00:00 2001 From: Jehan Date: Tue, 14 Oct 2025 21:01:09 +0200 Subject: [PATCH] libgimp: better fix for procedure blurb in GimpProcView. Commit 6874c47544 was not correct as we generate some type/values description, extensively using Pango markup. This additional fix does not change the logic from the aforementionned commit, which is that the blurb still is just plain text (nor markup), which we properly escape to display as-is, mixed with Pango markup. --- libgimp/gimpprocview.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/libgimp/gimpprocview.c b/libgimp/gimpprocview.c index fec30ecabe..aba303b4a6 100644 --- a/libgimp/gimpprocview.c +++ b/libgimp/gimpprocview.c @@ -331,16 +331,27 @@ gimp_proc_view_create_args (GimpProcedure *procedure, gchar *desc; gchar *blurb; - desc = gimp_param_spec_get_desc (pspec); + desc = gimp_param_spec_get_desc (pspec); + blurb = (gchar *) g_param_spec_get_blurb (pspec); + if (blurb != NULL) + blurb = g_markup_escape_text (blurb, -1); if (desc) { - blurb = g_strconcat (g_param_spec_get_blurb (pspec), " ", desc, NULL); - g_free (desc); - } - else - { - blurb = g_strdup (g_param_spec_get_blurb (pspec)); + if (blurb != NULL) + { + gchar *tmp; + + tmp = g_strconcat (blurb, " ", desc, NULL); + g_free (desc); + g_free (blurb); + + blurb = tmp; + } + else + { + blurb = g_strstrip (desc); + } } /* name */ @@ -365,6 +376,7 @@ gimp_proc_view_create_args (GimpProcedure *procedure, /* description */ label = gtk_label_new (blurb); + gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_label_set_selectable (GTK_LABEL (label), TRUE); gtk_label_set_xalign (GTK_LABEL (label), 0.0); gtk_label_set_yalign (GTK_LABEL (label), 0.0);