2003-03-07 Padraig O'Briain <padraig.obriain@sun.com>
* atk/atkobject.c (atk_object_set_role): Add check that role is
actually being changed. Do not emit notification for initial
role setting. (bug #107710)
+2003-03-07 Padraig O'Briain <padraig.obriain@sun.com>
+
+ * atk/atkobject.c (atk_object_set_role): Add check that role is
+ actually being changed. Do not emit notification for initial
+ role setting. (bug #107710)
+
2003-03-06 Padraig O'Briain <padraig.obriain@sun.com>
* atk/atkrelationset.c: Current returning of FALSE to 0 in function
AtkRole role)
{
AtkObjectClass *klass;
+ AtkRole old_role;
g_return_if_fail (ATK_IS_OBJECT (accessible));
klass = ATK_OBJECT_GET_CLASS (accessible);
if (klass->set_role)
{
- (klass->set_role) (accessible, role);
- g_object_notify (G_OBJECT (accessible), atk_object_name_property_role);
+ old_role = atk_object_get_role (accessible);
+ if (old_role != role)
+ {
+ (klass->set_role) (accessible, role);
+ if (old_role != ATK_ROLE_UNKNOWN)
+ /* Do not notify for initial role setting */
+ g_object_notify (G_OBJECT (accessible), atk_object_name_property_role);
+ }
}
}