From 0610f600148944de69ed5c52699ba6c61c93ff4f Mon Sep 17 00:00:00 2001 From: Jacob Boerema Date: Tue, 21 May 2024 14:48:14 -0400 Subject: [PATCH] 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. --- libgimp/gimpproceduredialog.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libgimp/gimpproceduredialog.c b/libgimp/gimpproceduredialog.c index 360dd274f4..010816d13f 100644 --- a/libgimp/gimpproceduredialog.c +++ b/libgimp/gimpproceduredialog.c @@ -286,8 +286,6 @@ gimp_procedure_dialog_constructed (GObject *object) GtkWidget *content_area; gchar *role; - G_OBJECT_CLASS (parent_class)->constructed (object); - dialog = GIMP_PROCEDURE_DIALOG (object); priv = gimp_procedure_dialog_get_instance_private (dialog); procedure = priv->procedure; @@ -306,6 +304,12 @@ gimp_procedure_dialog_constructed (GObject *object) NULL); 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)) ok_label = _("_Open"); else if (GIMP_IS_EXPORT_PROCEDURE (procedure))