GtkHSV: set a suitable role for the accessible

The consensus of the accessibility team was that 'color chooser'
fits best for this. Update tests to match.
This commit is contained in:
Matthias Clasen 2011-06-23 18:41:47 -04:00
parent 3edebfb81c
commit 1b8c38f6e1
2 changed files with 16 additions and 1 deletions

View File

@ -124,6 +124,7 @@ static gboolean gtk_hsv_focus (GtkWidget *widget,
GtkDirectionType direction);
static void gtk_hsv_move (GtkHSV *hsv,
GtkDirectionType dir);
static AtkObject *gtk_hsv_get_accessible (GtkWidget *widget);
static guint hsv_signals[LAST_SIGNAL];
@ -154,6 +155,7 @@ gtk_hsv_class_init (GtkHSVClass *class)
widget_class->draw = gtk_hsv_draw;
widget_class->focus = gtk_hsv_focus;
widget_class->grab_broken_event = gtk_hsv_grab_broken;
widget_class->get_accessible = gtk_hsv_get_accessible;
hsv_class->move = gtk_hsv_move;
@ -1618,3 +1620,16 @@ gtk_hsv_move (GtkHSV *hsv,
gtk_hsv_set_color (hsv, hue, sat, val);
}
static AtkObject *
gtk_hsv_get_accessible (GtkWidget *widget)
{
AtkObject *obj;
obj = GTK_WIDGET_CLASS (gtk_hsv_parent_class)->get_accessible (widget);
atk_object_set_role (obj, ATK_ROLE_COLOR_CHOOSER);
return obj;
}

View File

@ -44,7 +44,7 @@ window1
layer: widget
alpha: 1
unnamed-GailWidget-4
"unknown"
"color chooser"
parent: unnamed-GailBox-3
index: 0
name: Color Wheel