Commit cd305c19 authored by Alban Browaeys's avatar Alban Browaeys Committed by Matthias Clasen

widget: fix GtkLabelAccessible NULL links.

Fix testsuite/a11y/about.ui GtkAboutDialog :
"CRITICAL **: atk_hyperlink_get_start_index: assertion 'ATK_IS_HYPERLINK (link)' failed"
That is set widget->priv->accessible as soon as accessible object is generated.

When accessible object is created accessible->priv->widget is set,
if widget->priv->accessible is not , then _gtk_label_accessible_update_links
exits early, thus without creating the links on the accessible side.
(This as it checks for the widget to have the accessible set before proceeding).

https://bugzilla.gnome.org/show_bug.cgi?id=766458
parent ddcf4702
......@@ -13417,6 +13417,8 @@ gtk_widget_real_get_accessible (GtkWidget *widget)
if (priv->accessible_role != ATK_ROLE_INVALID)
atk_object_set_role (accessible, priv->accessible_role);
widget->priv->accessible = accessible;
}
else
{
......@@ -13426,6 +13428,8 @@ gtk_widget_real_get_accessible (GtkWidget *widget)
if (priv->accessible_role != ATK_ROLE_INVALID)
atk_object_set_role (accessible, priv->accessible_role);
widget->priv->accessible = accessible;
atk_object_initialize (accessible, widget);
/* Set the role again, since we don't want a role set
......@@ -13436,7 +13440,6 @@ gtk_widget_real_get_accessible (GtkWidget *widget)
atk_object_set_role (accessible, priv->accessible_role);
}
widget->priv->accessible = accessible;
}
return accessible;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment