diff --git a/gtk/a11y/gtkwindowaccessible.c b/gtk/a11y/gtkwindowaccessible.c index d0a6588bbb..47743288ad 100644 --- a/gtk/a11y/gtkwindowaccessible.c +++ b/gtk/a11y/gtkwindowaccessible.c @@ -109,9 +109,7 @@ gtk_window_accessible_initialize (AtkObject *obj, g_signal_connect (data, "window-state-event", G_CALLBACK (window_state_event_cb), NULL); GTK_WIDGET_ACCESSIBLE (obj)->layer = ATK_LAYER_WINDOW; - if (GTK_IS_COLOR_SELECTION_DIALOG (widget)) - obj->role = ATK_ROLE_COLOR_CHOOSER; - else if (GTK_IS_FONT_SELECTION_DIALOG (widget)) + if (GTK_IS_FONT_SELECTION_DIALOG (widget)) obj->role = ATK_ROLE_FONT_CHOOSER; else if (GTK_IS_MESSAGE_DIALOG (widget)) obj->role = ATK_ROLE_ALERT; diff --git a/gtk/gtkcolorseldialog.c b/gtk/gtkcolorseldialog.c index 2d31111081..627efa97c3 100644 --- a/gtk/gtkcolorseldialog.c +++ b/gtk/gtkcolorseldialog.c @@ -126,6 +126,8 @@ static void gtk_color_selection_dialog_class_init (GtkColorSelectionDialogClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + gobject_class->get_property = gtk_color_selection_dialog_get_property; g_object_class_install_property (gobject_class, @@ -157,6 +159,8 @@ gtk_color_selection_dialog_class_init (GtkColorSelectionDialogClass *klass) GTK_TYPE_WIDGET, G_PARAM_READABLE)); + gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_COLOR_CHOOSER); + g_type_class_add_private (klass, sizeof (GtkColorSelectionDialogPrivate)); }