summaryrefslogtreecommitdiff
path: root/gtk/a11y
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-01-04 18:51:23 -0500
committerMatthias Clasen <mclasen@redhat.com>2014-01-04 18:52:46 -0500
commit9137b4ed8e97d400a6bbb9ec8379a2d235cdde62 (patch)
treee8e1ed04b6033b2f02e0f85f6efc0660794eff3f /gtk/a11y
parentc45057c88a3ab2a05a1c2392b89b0112f22deed2 (diff)
downloadgtk+-9137b4ed8e97d400a6bbb9ec8379a2d235cdde62.tar.gz
GtkColorSwatch: Set an accessible role
And update the colorchooser a11y test to a) use GtkColorChooser instead of the deprecated GtkColorSelection and b) match this change. Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=721045
Diffstat (limited to 'gtk/a11y')
-rw-r--r--gtk/a11y/gtkcolorswatchaccessible.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/a11y/gtkcolorswatchaccessible.c b/gtk/a11y/gtkcolorswatchaccessible.c
index 6ad4138e5f..afa753a725 100644
--- a/gtk/a11y/gtkcolorswatchaccessible.c
+++ b/gtk/a11y/gtkcolorswatchaccessible.c
@@ -27,8 +27,20 @@ G_DEFINE_TYPE_WITH_CODE (GtkColorSwatchAccessible, _gtk_color_swatch_accessible,
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init))
static void
+gtk_color_swatch_accessible_initialize (AtkObject *obj,
+ gpointer data)
+{
+ ATK_OBJECT_CLASS (_gtk_color_swatch_accessible_parent_class)->initialize (obj, data);
+
+ atk_object_set_role (obj, ATK_ROLE_RADIO_BUTTON);
+}
+
+static void
_gtk_color_swatch_accessible_class_init (GtkColorSwatchAccessibleClass *klass)
{
+ AtkObjectClass *atk_class = ATK_OBJECT_CLASS (klass);
+
+ atk_class->initialize = gtk_color_swatch_accessible_initialize;
}
static void