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
This commit is contained in:
@@ -26,9 +26,21 @@ static void atk_action_interface_init (AtkActionIface *iface);
|
|||||||
G_DEFINE_TYPE_WITH_CODE (GtkColorSwatchAccessible, _gtk_color_swatch_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
|
G_DEFINE_TYPE_WITH_CODE (GtkColorSwatchAccessible, _gtk_color_swatch_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
|
||||||
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init))
|
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
|
static void
|
||||||
_gtk_color_swatch_accessible_class_init (GtkColorSwatchAccessibleClass *klass)
|
_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
|
static void
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.0 -->
|
<!-- interface-requires gtk+ 3.0 -->
|
||||||
<object class="GtkColorSelectionDialog" id="window1">
|
<object class="GtkColorChooserDialog" id="window1">
|
||||||
</object>
|
</object>
|
||||||
</interface>
|
</interface>
|
||||||
|
|||||||
Reference in New Issue
Block a user