diff options
author | Gustavo J. A. M. Carneiro <gcarneiro@src.gnome.org> | 2004-03-08 23:11:38 +0000 |
---|---|---|
committer | Gustavo J. A. M. Carneiro <gcarneiro@src.gnome.org> | 2004-03-08 23:11:38 +0000 |
commit | 59ebacbe8eba4d29fa963128a045625e15e84b3a (patch) | |
tree | c4e0820bd473ba0ee18478240a2e16b315731db0 | |
parent | 312a94f41a11802edcac19ecc44bf73ac1c7adba (diff) | |
download | pygobject-59ebacbe8eba4d29fa963128a045625e15e84b3a.tar.gz pygobject-59ebacbe8eba4d29fa963128a045625e15e84b3a.tar.xz pygobject-59ebacbe8eba4d29fa963128a045625e15e84b3a.zip |
Fix again #136204 (GtkTextSearchFlags warning)PYGTK_2_2_0
-rw-r--r-- | gobject/gobjectmodule.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index d91d81b..d780923 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -28,6 +28,9 @@ static PyObject *gerror_exc = NULL; +static void pyg_flags_add_constants(PyObject *module, GType flags_type, + const gchar *strip_prefix); + /* -------------- GDK threading hooks ---------------------------- */ /** @@ -1787,9 +1790,11 @@ pyg_enum_add_constants(PyObject *module, GType enum_type, GEnumClass *eclass; guint i; - /* a more useful warning */ if (!G_TYPE_IS_ENUM(enum_type)) { - g_warning("`%s' is not an enum type", g_type_name(enum_type)); + if (G_TYPE_IS_FLAGS(enum_type)) /* See bug #136204 */ + pyg_flags_add_constants(module, enum_type, strip_prefix); + else + g_warning("`%s' is not an enum type", g_type_name(enum_type)); return; } g_return_if_fail (strip_prefix != NULL); @@ -1824,9 +1829,11 @@ pyg_flags_add_constants(PyObject *module, GType flags_type, GFlagsClass *fclass; guint i; - /* a more useful warning */ if (!G_TYPE_IS_FLAGS(flags_type)) { - g_warning("`%s' is not an flags type", g_type_name(flags_type)); + if (G_TYPE_IS_ENUM(flags_type)) /* See bug #136204 */ + pyg_enum_add_constants(module, flags_type, strip_prefix); + else + g_warning("`%s' is not an flags type", g_type_name(flags_type)); return; } g_return_if_fail (strip_prefix != NULL); |