Fix some problems with the GailLinkButton implementation

This commit is contained in:
Matthias Clasen 2011-06-19 18:53:24 -04:00
parent 0740876d0e
commit 0311ffe023

View File

@ -43,6 +43,17 @@ static void atk_action_interface_init (AtkActionIface *iface);
G_DEFINE_TYPE_WITH_CODE (GailLinkButtonLink, gail_link_button_link, ATK_TYPE_HYPERLINK,
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init))
static GailLinkButtonLink *
gail_link_button_link_new (GailLinkButton *button)
{
GailLinkButtonLink *link;
link = g_object_new (gail_link_button_link_get_type (), NULL);
link->button = button;
return link;
}
static gchar *
gail_link_button_link_get_uri (AtkHyperlink *link,
gint i)
@ -213,12 +224,12 @@ gail_link_button_get_hyperlink (AtkHyperlinkImpl *impl)
if (!button->link)
{
button->link = g_object_new (gail_link_button_link_get_type (), NULL);
button->link = gail_link_button_link_new (button);
g_signal_connect (gtk_accessible_get_widget (GTK_ACCESSIBLE (button)),
"activate-link", G_CALLBACK (activate_link), button->link);
}
return button->link;
return g_object_ref (button->link);
}
static void atk_hypertext_impl_interface_init (AtkHyperlinkImplIface *iface);