libgimp: fix #11421 Some legacy filters have lost their Help button

Legacy plug-ins like Checkerboard (legacy) under Render Patterns lost
their Help button, although using F1 was still working.

Due to changes in how procedures are called, `gimp_dialog_constructed`
was called before the help-id was set.
The simplest way to fix this, is to call
 `G_OBJECT_CLASS (parent_class)->constructed (object);`
at a later time in `gimp_procedure_dialog_constructed` after we have
set the help-id there.
This commit is contained in:
Jacob Boerema 2024-05-21 14:48:14 -04:00
parent f8fa0d056d
commit 0610f60014
1 changed files with 6 additions and 2 deletions

View File

@ -286,8 +286,6 @@ gimp_procedure_dialog_constructed (GObject *object)
GtkWidget *content_area; GtkWidget *content_area;
gchar *role; gchar *role;
G_OBJECT_CLASS (parent_class)->constructed (object);
dialog = GIMP_PROCEDURE_DIALOG (object); dialog = GIMP_PROCEDURE_DIALOG (object);
priv = gimp_procedure_dialog_get_instance_private (dialog); priv = gimp_procedure_dialog_get_instance_private (dialog);
procedure = priv->procedure; procedure = priv->procedure;
@ -306,6 +304,12 @@ gimp_procedure_dialog_constructed (GObject *object)
NULL); NULL);
g_free (role); g_free (role);
/* Normally, we would call the parents constructed as soon as possible.
* However, gimp_dialog_constructed needs the help-id to already be set, or
* else the help button in legacy plug-ins doesn't show up. Since we only
* set a few object properties, that seems safe to do here. */
G_OBJECT_CLASS (parent_class)->constructed (object);
if (GIMP_IS_LOAD_PROCEDURE (procedure)) if (GIMP_IS_LOAD_PROCEDURE (procedure))
ok_label = _("_Open"); ok_label = _("_Open");
else if (GIMP_IS_EXPORT_PROCEDURE (procedure)) else if (GIMP_IS_EXPORT_PROCEDURE (procedure))