[glib/g-property: 13/27] gproperty: Implicitly notify with explicit setters
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/g-property: 13/27] gproperty: Implicitly notify with explicit setters
- Date: Fri, 19 Aug 2011 14:33:01 +0000 (UTC)
commit 0a5c0961d38f550d89dae1349599c76fa62bcc84
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Mon Jun 6 16:43:21 2011 +0100
gproperty: Implicitly notify with explicit setters
Do not require the explicit setter function to emit a notification on
change: we should notify by ourselves, especially to avoid holding the
lock on the property while modifying the notify queue.
gobject/gproperty.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/gobject/gproperty.c b/gobject/gproperty.c
index 310849d..b358990 100644
--- a/gobject/gproperty.c
+++ b/gobject/gproperty.c
@@ -670,6 +670,8 @@ g_##g_t##_property_set_value (GProperty *property, \
\
property_unlock_internal (property, gobject); \
\
+ g_object_notify_by_pspec (gobject, (GParamSpec *) property); \
+\
retval = TRUE; \
} \
else if (property->field_offset >= 0) \
@@ -1335,6 +1337,8 @@ g_enum_property_set_value (GProperty *property,
property_unlock_internal (property, gobject);
+ g_object_notify_by_pspec (gobject, (GParamSpec *) property);
+
retval = TRUE;
}
else if (property->field_offset >= 0)
@@ -1592,6 +1596,8 @@ g_flags_property_set_value (GProperty *property,
property_unlock_internal (property, gobject);
+ g_object_notify_by_pspec (gobject, (GParamSpec *) property);
+
retval = TRUE;
}
else if (property->field_offset >= 0)
@@ -1869,6 +1875,8 @@ g_float_property_set_value (GProperty *property,
property_unlock_internal (property, gobject);
+ g_object_notify_by_pspec (gobject, (GParamSpec *) property);
+
retval = TRUE;
}
else if (property->field_offset >= 0)
@@ -2146,6 +2154,8 @@ g_double_property_set_value (GProperty *property,
property_unlock_internal (property, gobject);
+ g_object_notify_by_pspec (gobject, (GParamSpec *) property);
+
retval = TRUE;
}
else if (property->field_offset >= 0)
@@ -2350,6 +2360,8 @@ g_string_property_set_value (GProperty *property,
property_unlock_internal (property, gobject);
+ g_object_notify_by_pspec (gobject, (GParamSpec *) property);
+
retval = TRUE;
}
else if (property->field_offset >= 0)
@@ -2564,6 +2576,8 @@ g_boxed_property_set_value (GProperty *property,
property_unlock_internal (property, gobject);
+ g_object_notify_by_pspec (gobject, (GParamSpec *) property);
+
retval = TRUE;
}
else if (property->field_offset >= 0)
@@ -2779,6 +2793,8 @@ g_object_property_set_value (GProperty *property,
property_unlock_internal (property, gobject);
+ g_object_notify_by_pspec (gobject, (GParamSpec *) property);
+
retval = TRUE;
}
else if (property->field_offset >= 0)
@@ -2998,6 +3014,8 @@ g_pointer_property_set_value (GProperty *property,
property_unlock_internal (property, gobject);
+ g_object_notify_by_pspec (gobject, (GParamSpec *) property);
+
retval = TRUE;
}
else if (property->field_offset >= 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]