From: Alejandro PiƱeiro Date: Wed, 14 Dec 2011 22:32:53 +0000 (+0100) Subject: Do not notify accessible-name/description for initial setting X-Git-Tag: ATK_2_3_3~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6edbd24abeb1dd340f450ddaa562de56fbd912b;p=platform%2Fupstream%2Fatk.git Do not notify accessible-name/description for initial setting BGO#665870: About reducing accessible-name, accessible-description change notifications --- 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); } }