From 6874c475445b092ec33bf8bb2f9dfa300f455012 Mon Sep 17 00:00:00 2001 From: Jehan Date: Mon, 13 Oct 2025 16:16:45 +0200 Subject: [PATCH] libgimp: procedure blurb is not Pango markup. I did wonder if it was supposed to be markup, and after a bit of test, I could confirm that adding random markup in some other arguments, it does sometimes styles the text, and other times, it just display the tags. So I'm leaving an API warning to review this for GIMP 4. This also fixes WARNINGs when a tag-like text is added: https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/2469#note_2574483 --- libgimp/gimpprocedure-params.c | 18 ++++++++++++++++++ libgimp/gimpprocview.c | 1 - 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/libgimp/gimpprocedure-params.c b/libgimp/gimpprocedure-params.c index 859d39aaac..80b77c28e9 100644 --- a/libgimp/gimpprocedure-params.c +++ b/libgimp/gimpprocedure-params.c @@ -25,11 +25,29 @@ #include "gimp.h" +#include "libgimpbase/gimpversion-private.h" + #include "gimpprocedure-params.h" #include "libgimp-intl.h" +/* It looks like for some generated widgets, we consider the nick or + * blurb as Pangom markup, and in others, not. We should be consistent + * and properly document our choice in function docs. The question is + * basically: do we want to allow text styling for generated widgets? + * + * - If yes, it is up to plug-in developers to make sure they don't + * break markup, and for us to filter out any markup when needed. + * - If no, we will have to use markup variants for setting labels and + * tooltips, and run g_markup_escape_text() when we need to integrate + * the text into larger markup contents. + * + * For GIMP 3, let's stick to the statement that nick and blurb is + * normal (non-markup) text and review in GIMP 4. + */ +GIMP_WARNING_API_BREAK("Should nick and/or blurb be in Pango markup?") + /** * gimp_procedure_add_boolean_argument: * @procedure: the #GimpProcedure. diff --git a/libgimp/gimpprocview.c b/libgimp/gimpprocview.c index d3c3b48b3e..fec30ecabe 100644 --- a/libgimp/gimpprocview.c +++ b/libgimp/gimpprocview.c @@ -365,7 +365,6 @@ 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);