Avoid more compiler warnings

Turns out link is a shadow-happy name, too.
This commit is contained in:
Matthias Clasen 2011-07-10 00:16:53 -04:00
parent 1803e1b57c
commit 88312319c4

View File

@ -45,19 +45,19 @@ G_DEFINE_TYPE_WITH_CODE (GtkLinkButtonAccessibleLink, _gtk_link_button_accessibl
static AtkHyperlink *
gtk_link_button_accessible_link_new (GtkLinkButtonAccessible *button)
{
GtkLinkButtonAccessibleLink *link;
GtkLinkButtonAccessibleLink *l;
link = g_object_new (_gtk_link_button_accessible_link_get_type (), NULL);
link->button = button;
l = g_object_new (_gtk_link_button_accessible_link_get_type (), NULL);
l->button = button;
return ATK_HYPERLINK (link);
return ATK_HYPERLINK (l);
}
static gchar *
gtk_link_button_accessible_link_get_uri (AtkHyperlink *link,
gtk_link_button_accessible_link_get_uri (AtkHyperlink *atk_link,
gint i)
{
GtkLinkButtonAccessibleLink *l = (GtkLinkButtonAccessibleLink *)link;
GtkLinkButtonAccessibleLink *l = (GtkLinkButtonAccessibleLink *)atk_link;
GtkWidget *widget;
const gchar *uri;
@ -68,66 +68,66 @@ gtk_link_button_accessible_link_get_uri (AtkHyperlink *link,
}
static gint
gtk_link_button_accessible_link_get_n_anchors (AtkHyperlink *link)
gtk_link_button_accessible_link_get_n_anchors (AtkHyperlink *atk_link)
{
return 1;
}
static gboolean
gtk_link_button_accessible_link_is_valid (AtkHyperlink *link)
gtk_link_button_accessible_link_is_valid (AtkHyperlink *atk_link)
{
return TRUE;
}
static AtkObject *
gtk_link_button_accessible_link_get_object (AtkHyperlink *link,
gtk_link_button_accessible_link_get_object (AtkHyperlink *atk_link,
gint i)
{
GtkLinkButtonAccessibleLink *l = (GtkLinkButtonAccessibleLink *)link;
GtkLinkButtonAccessibleLink *l = (GtkLinkButtonAccessibleLink *)atk_link;
return ATK_OBJECT (l->button);
}
static gint
gtk_link_button_accessible_link_get_start_index (AtkHyperlink *link)
gtk_link_button_accessible_link_get_start_index (AtkHyperlink *atk_link)
{
return 0;
}
static gint
gtk_link_button_accessible_link_get_end_index (AtkHyperlink *link)
gtk_link_button_accessible_link_get_end_index (AtkHyperlink *atk_link)
{
GtkLinkButtonAccessibleLink *l = (GtkLinkButtonAccessibleLink *)link;
GtkLinkButtonAccessibleLink *l = (GtkLinkButtonAccessibleLink *)atk_link;
return atk_text_get_character_count (ATK_TEXT (l->button));
}
static void
_gtk_link_button_accessible_link_init (GtkLinkButtonAccessibleLink *link)
_gtk_link_button_accessible_link_init (GtkLinkButtonAccessibleLink *l)
{
}
static void
_gtk_link_button_accessible_link_class_init (GtkLinkButtonAccessibleLinkClass *class)
{
AtkHyperlinkClass *hyperlink_class = ATK_HYPERLINK_CLASS (class);
AtkHyperlinkClass *atk_link_class = ATK_HYPERLINK_CLASS (class);
hyperlink_class->get_uri = gtk_link_button_accessible_link_get_uri;
hyperlink_class->get_n_anchors = gtk_link_button_accessible_link_get_n_anchors;
hyperlink_class->is_valid = gtk_link_button_accessible_link_is_valid;
hyperlink_class->get_object = gtk_link_button_accessible_link_get_object;
hyperlink_class->get_start_index = gtk_link_button_accessible_link_get_start_index;
hyperlink_class->get_end_index = gtk_link_button_accessible_link_get_end_index;
atk_link_class->get_uri = gtk_link_button_accessible_link_get_uri;
atk_link_class->get_n_anchors = gtk_link_button_accessible_link_get_n_anchors;
atk_link_class->is_valid = gtk_link_button_accessible_link_is_valid;
atk_link_class->get_object = gtk_link_button_accessible_link_get_object;
atk_link_class->get_start_index = gtk_link_button_accessible_link_get_start_index;
atk_link_class->get_end_index = gtk_link_button_accessible_link_get_end_index;
}
static gboolean
gtk_link_button_accessible_link_do_action (AtkAction *action,
gint i)
{
GtkLinkButtonAccessibleLink *link = (GtkLinkButtonAccessibleLink *)action;
GtkLinkButtonAccessibleLink *l = (GtkLinkButtonAccessibleLink *)action;
GtkWidget *widget;
widget = GTK_WIDGET (link->button);
widget = GTK_WIDGET (l->button);
if (widget == NULL)
return FALSE;
@ -168,9 +168,9 @@ atk_action_interface_init (AtkActionIface *iface)
static gboolean
activate_link (GtkLinkButton *button,
AtkHyperlink *link)
AtkHyperlink *atk_link)
{
g_signal_emit_by_name (link, "link-activated");
g_signal_emit_by_name (atk_link, "link-activated");
return FALSE;
}