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
This commit is contained in:
parent
40f6e24f01
commit
6874c47544
2 changed files with 18 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue