a11y: Remove default description from GtkSwitch

https://bugzilla.gnome.org/show_bug.cgi?id=707926
This commit is contained in:
Alejandro Piñeiro 2013-09-11 18:37:26 +02:00
parent 48b05a8556
commit ef41c2a60f
2 changed files with 1 additions and 11 deletions

View File

@ -53,22 +53,11 @@ gtk_switch_accessible_ref_state_set (AtkObject *accessible)
return state_set; return state_set;
} }
static void
gtk_switch_accessible_initialize (AtkObject *accessible,
gpointer widget)
{
ATK_OBJECT_CLASS (gtk_switch_accessible_parent_class)->initialize (accessible, widget);
atk_object_set_role (accessible, ATK_ROLE_TOGGLE_BUTTON);
atk_object_set_description (accessible, _("Switches between on and off states"));
}
static void static void
gtk_switch_accessible_class_init (GtkSwitchAccessibleClass *klass) gtk_switch_accessible_class_init (GtkSwitchAccessibleClass *klass)
{ {
AtkObjectClass *atk_class = ATK_OBJECT_CLASS (klass); AtkObjectClass *atk_class = ATK_OBJECT_CLASS (klass);
atk_class->initialize = gtk_switch_accessible_initialize;
atk_class->ref_state_set = gtk_switch_accessible_ref_state_set; atk_class->ref_state_set = gtk_switch_accessible_ref_state_set;
} }

View File

@ -894,6 +894,7 @@ gtk_switch_class_init (GtkSwitchClass *klass)
g_object_class_override_property (gobject_class, PROP_ACTION_TARGET, "action-target"); g_object_class_override_property (gobject_class, PROP_ACTION_TARGET, "action-target");
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_SWITCH_ACCESSIBLE); gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_SWITCH_ACCESSIBLE);
gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_TOGGLE_BUTTON);
} }
static void static void