Bug 784305 - Deprecated enum constants are not registered in python-fu.

This commit is contained in:
Massimo Valentini 2017-06-30 14:52:44 +02:00 committed by Jehan
parent 819a27564e
commit 7c32451dfb
4 changed files with 22 additions and 2 deletions

View File

@ -174,6 +174,8 @@ gimp_enums_init (void)
g_type_set_qdata (GIMP_TYPE_LAYER_MODE, quark,
(gpointer) gimp_layer_mode_effects_get_type ());
gimp_base_compat_enum_init ();
enums_initialized = TRUE;
}

View File

@ -27,6 +27,7 @@
#include "gimpbase-private.h"
#include "gimpcompatenums.h"
#include "gimputils.h"
GimpUnitVtable _gimp_unit_vtable = { NULL, };
@ -36,7 +37,6 @@ void
gimp_base_init (GimpUnitVtable *vtable)
{
static gboolean gimp_base_initialized = FALSE;
GQuark quark;
g_return_if_fail (vtable != NULL);
@ -45,6 +45,20 @@ gimp_base_init (GimpUnitVtable *vtable)
_gimp_unit_vtable = *vtable;
gimp_base_compat_enum_init ();
gimp_base_initialized = TRUE;
}
void
gimp_base_compat_enum_init (void)
{
static gboolean gimp_base_compat_initialized = FALSE;
GQuark quark;
if (gimp_base_compat_initialized)
return;
quark = g_quark_from_static_string ("gimp-compat-enum");
g_type_set_qdata (GIMP_TYPE_ADD_MASK_TYPE, quark,
@ -76,5 +90,5 @@ gimp_base_init (GimpUnitVtable *vtable)
g_type_set_qdata (GIMP_TYPE_TRANSFER_MODE, quark,
(gpointer) GIMP_TYPE_TRANSFER_MODE_COMPAT);
gimp_base_initialized = TRUE;
gimp_base_compat_initialized = TRUE;
}

View File

@ -70,6 +70,8 @@ const gchar * gimp_flags_value_get_desc (GFlagsClass *flags_class,
GFlagsValue *flags_value);
const gchar * gimp_flags_value_get_help (GFlagsClass *flags_class,
GFlagsValue *flags_value);
void gimp_base_compat_enum_init (void);
G_END_DECLS

View File

@ -201,6 +201,8 @@ gimp_enums_init (void)
g_type_set_qdata (GIMP_TYPE_LAYER_MODE, quark,
(gpointer) gimp_layer_mode_effects_get_type ());
gimp_base_compat_enum_init ();
enums_initialized = TRUE;
}