On Fri, 2003-10-31 at 00:44, Bolian Yin wrote:
> Hi,
>
> provide more a11y implementation for e-table.
> http://bugzilla.ximian.com/show_bug.cgi?id=50392
> - GalA11yETableItem *a11y = GAL_A11Y_E_TABLE_ITEM (accessible);
> + AtkGObjectAccessible *atk_gobj;
> + GObject *g_obj;
> + GalA11yETableItem *a11y;
> +
> + g_return_val_if_fail (GAL_A11Y_IS_E_TABLE_ITEM (accessible), NULL);
> + atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
> + g_obj = atk_gobject_accessible_get_object (atk_gobj);
> + if (g_obj == NULL)
> + /* Object is defunct */
> + return NULL;
> +
> + a11y = GAL_A11Y_E_TABLE_ITEM (accessible);
This code repeats constantly throughout the patch. Please put this is a
function. Something like:
static GObject *
get_gobject (AtkObject accessible)
{
return atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE
(accessible));
}
So you can just do:
GObject *g_obj = get_gobject (accessible);
Otherwise, it looks fine. Please update the patch to include the above
and commit to trunk. Thanks for the patch.