[gimp/gimp-2-10] plug-ins: use global gegl_init() in file-pdf-load run() function.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] plug-ins: use global gegl_init() in file-pdf-load run() function.
- Date: Mon, 22 Jul 2019 12:58:13 +0000 (UTC)
commit 8d609ecfa4b81f55afedde46a892f2a8c7fed542
Author: Jehan <jehan girinstud io>
Date: Mon Jul 22 14:56:04 2019 +0200
plug-ins: use global gegl_init() in file-pdf-load run() function.
As noted by Mitch, this is simpler and what we do in other plug-ins.
(cherry picked from commit ef3c13c6c546d699bda80b5900571cf0452856fd)
plug-ins/common/file-pdf-load.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/plug-ins/common/file-pdf-load.c b/plug-ins/common/file-pdf-load.c
index 3dec4c892b..cfb13cb5b6 100644
--- a/plug-ins/common/file-pdf-load.c
+++ b/plug-ins/common/file-pdf-load.c
@@ -382,6 +382,7 @@ run (const gchar *name,
GError *error = NULL;
INIT_I18N ();
+ gegl_init (NULL, NULL);
*nreturn_vals = 1;
*return_vals = values;
@@ -660,6 +661,8 @@ run (const gchar *name,
}
values[0].data.d_status = status;
+
+ gegl_exit ();
}
static PopplerDocument*
@@ -935,17 +938,10 @@ layer_from_surface (gint32 image,
{
gint32 layer;
- /* This may have already been run for the interactive code path,
- * as part of gimp_ui_init(), but it doesn't hurt to init again
- * (needed for non-interactive calls too), as long as we match the
- * exit.
- */
- babl_init ();
layer = gimp_layer_new_from_surface (image, layer_name, surface,
progress_start,
progress_start + progress_scale);
gimp_image_insert_layer (image, layer, -1, position);
- babl_exit ();
return layer;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]