[gimp] app: re-use the generated gimp_enums_init() code from libgimp
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: re-use the generated gimp_enums_init() code from libgimp
- Date: Mon, 12 Aug 2019 17:27:47 +0000 (UTC)
commit dcb6a2c064a816db5f9bae5d4f29ebab9adbaf5e
Author: Michael Natterer <mitch gimp org>
Date: Mon Aug 12 19:26:08 2019 +0200
app: re-use the generated gimp_enums_init() code from libgimp
In gimp_init(), call gimp_enums_init(). We need to make all enum types
known to the type system by name because the PDB is now based on enum
type names.
app/core/gimp.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/app/core/gimp.c b/app/core/gimp.c
index c0fbd7b2ce..41f074ce08 100644
--- a/app/core/gimp.c
+++ b/app/core/gimp.c
@@ -23,6 +23,7 @@
#include <gegl.h>
#include "libgimpbase/gimpbase.h"
+#include "libgimpbase/gimpbase-private.h"
#include "libgimpconfig/gimpconfig.h"
#include "core-types.h"
@@ -75,6 +76,14 @@
#include "gimp-intl.h"
+/* we need to register all enum types so they are known to the type
+ * system by name, re-use the files the pdb generated for libgimp
+ */
+void gimp_enums_init (void);
+const gchar ** gimp_enums_get_type_names (gint *n_type_names);
+#include "libgimp/gimpenums.c.tail"
+
+
enum
{
INITIALIZE,
@@ -227,6 +236,8 @@ gimp_init (Gimp *gimp)
gimp->parasites = gimp_parasite_list_new ();
+ gimp_enums_init ();
+
gimp_units_init (gimp);
gimp->images = gimp_list_new_weak (GIMP_TYPE_IMAGE, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]