Add GObjectClass flag CLASS_HAS_PROPS_FLAG

This is set if a class or any of its parents have installed any
properties.

https://bugzilla.gnome.org/show_bug.cgi?id=557100
This commit is contained in:
Alexander Larsson 2009-08-19 17:21:18 +02:00
parent 301d52d858
commit 39a1fe5782

View File

@ -113,6 +113,9 @@
((G_DATALIST_GET_FLAGS (&(object)->qdata) & OBJECT_HAS_TOGGLE_REF_FLAG) != 0)
#define OBJECT_FLOATING_FLAG 0x2
#define CLASS_HAS_PROPS_FLAG 0x1
#define CLASS_HAS_PROPS(class) \
((class)->flags & CLASS_HAS_PROPS_FLAG)
/* --- signals --- */
enum {
@ -409,6 +412,9 @@ g_object_class_install_property (GObjectClass *class,
{
g_return_if_fail (G_IS_OBJECT_CLASS (class));
g_return_if_fail (G_IS_PARAM_SPEC (pspec));
class->flags |= CLASS_HAS_PROPS_FLAG;
if (pspec->flags & G_PARAM_WRITABLE)
g_return_if_fail (class->set_property != NULL);
if (pspec->flags & G_PARAM_READABLE)