summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Piñeiro <apinheiro@igalia.com>2011-12-14 23:32:53 +0100
committerAlejandro Piñeiro <apinheiro@igalia.com>2011-12-14 23:34:35 +0100
commitd6edbd24abeb1dd340f450ddaa562de56fbd912b (patch)
tree7e86fe3137f47de4cda3d92e3383e2334871a5d5
parent7e276898dcbe6aa80cfc6b58f017e28aa3cea358 (diff)
downloadatk-d6edbd24abeb1dd340f450ddaa562de56fbd912b.tar.gz
Do not notify accessible-name/description for initial setting
BGO#665870: About reducing accessible-name, accessible-description change notifications
-rwxr-xr-xatk/atkobject.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/atk/atkobject.c b/atk/atkobject.c
index 0e5212b..23e4605 100755
--- a/atk/atkobject.c
+++ b/atk/atkobject.c
@@ -1003,6 +1003,7 @@ atk_object_set_name (AtkObject *accessible,
const gchar *name)
{
AtkObjectClass *klass;
+ gboolean notify = FALSE;
g_return_if_fail (ATK_IS_OBJECT (accessible));
g_return_if_fail (name != NULL);
@@ -1010,8 +1011,12 @@ atk_object_set_name (AtkObject *accessible,
klass = ATK_OBJECT_GET_CLASS (accessible);
if (klass->set_name)
{
+ /* Do not notify for initial name setting. See bug 665870 */
+ notify = (accessible->name != NULL);
+
(klass->set_name) (accessible, name);
- g_object_notify (G_OBJECT (accessible), atk_object_name_property_name);
+ if (notify)
+ g_object_notify (G_OBJECT (accessible), atk_object_name_property_name);
}
}
@@ -1027,6 +1032,7 @@ atk_object_set_description (AtkObject *accessible,
const gchar *description)
{
AtkObjectClass *klass;
+ gboolean notify = FALSE;
g_return_if_fail (ATK_IS_OBJECT (accessible));
g_return_if_fail (description != NULL);
@@ -1034,8 +1040,13 @@ atk_object_set_description (AtkObject *accessible,
klass = ATK_OBJECT_GET_CLASS (accessible);
if (klass->set_description)
{
+ /* Do not notify for initial name setting. See bug 665870 */
+ notify = (accessible->description != NULL);
+
(klass->set_description) (accessible, description);
- g_object_notify (G_OBJECT (accessible), atk_object_name_property_description);
+ if (notify)
+ g_object_notify (G_OBJECT (accessible),
+ atk_object_name_property_description);
}
}