From 7787a90b8dd7d4b81972b931ecbc9c1f484cf13e Mon Sep 17 00:00:00 2001 From: Jehan Date: Fri, 5 Dec 2025 21:20:26 +0100 Subject: [PATCH] libgimp: clean comment. I am unsure about the previous commit (see MR !2568), though it should not be hurtful either. At least though, let's not leave duplicate comments. So merging the 2 comments and making the remaining text a bit more technically correct. --- libgimp/gimp.c | 4 ---- libgimp/gimpplugin.c | 18 ++++++++---------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/libgimp/gimp.c b/libgimp/gimp.c index e3ac83b563..3e450067bb 100644 --- a/libgimp/gimp.c +++ b/libgimp/gimp.c @@ -1179,10 +1179,6 @@ _gimp_config (GPConfig *config) "application-license", "GPL3", NULL); - /* XXX Running gegl_init() before gegl_config() is not appreciated by - * GEGL and generates a bunch of CRITICALs. - */ - g_clear_object (&_check_custom_color1); _check_custom_color1 = gegl_color_new (NULL); pixel = g_bytes_get_data (config->check_custom_color1, &bpp); diff --git a/libgimp/gimpplugin.c b/libgimp/gimpplugin.c index bc7473944e..5c57ee7498 100644 --- a/libgimp/gimpplugin.c +++ b/libgimp/gimpplugin.c @@ -290,16 +290,14 @@ gimp_plug_in_class_init (GimpPlugInClass *klass) g_object_class_install_properties (object_class, N_PROPS, props); - /* GIMP uses GeglColor so GEGL must be init. - * GEGL depends on BABL so it must be init. - * - * XXX Usually would call gegl_init which calls babl_init. - * But when call gegl_init before gegl_config, - * GEGL loads its libraries (also called plugins) twice - * and GObject throws CRITICAL re multiple register of GTypes - * "Two different plugins tried to register". - * See related XXX comment in libgimp/gimp.c - * See gegl#427 + /* libgimp creates GeglColor-s in _gimp_config(), which requires at + * least babl to be initialized. + * We don't call gegl_init() because gegl_config() does not appreciate + * being called after, which generates a bunch of CRITICALs (see + * commit b06fe36970c and gegl#427). + * Therefore gegl_init() still needs to be called manually by plug-ins + * if necessary (it is called by gimp_ui_init() too, but this only + * applies to GUI plug-ins). */ babl_init (); }