[gtk+/a11y] Fix some problems with the GailLinkButton implementation
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/a11y] Fix some problems with the GailLinkButton implementation
- Date: Sun, 19 Jun 2011 22:55:40 +0000 (UTC)
commit 651d4b3816820c206933d6b435ef3915e1cf557f
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jun 19 18:53:24 2011 -0400
Fix some problems with the GailLinkButton implementation
gtk/a11y/gaillinkbutton.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/gtk/a11y/gaillinkbutton.c b/gtk/a11y/gaillinkbutton.c
index 16671f8..ef26107 100644
--- a/gtk/a11y/gaillinkbutton.c
+++ b/gtk/a11y/gaillinkbutton.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]