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.
This commit is contained in:
parent
903195f429
commit
3e414e6698
1 changed files with 19 additions and 7 deletions
|
|
@ -332,15 +332,26 @@ gimp_proc_view_create_args (GimpProcedure *procedure,
|
|||
gchar *blurb;
|
||||
|
||||
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);
|
||||
if (blurb != NULL)
|
||||
{
|
||||
gchar *tmp;
|
||||
|
||||
tmp = g_strconcat (blurb, " ", desc, NULL);
|
||||
g_free (desc);
|
||||
g_free (blurb);
|
||||
|
||||
blurb = tmp;
|
||||
}
|
||||
else
|
||||
{
|
||||
blurb = g_strdup (g_param_spec_get_blurb (pspec));
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue