GtkColorChooserWidget: Set accessible names

As pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=721053
we should set the accessible name on the color swatch widgets,
not the descriptions.
This commit is contained in:
Matthias Clasen 2014-01-04 23:30:28 -05:00
parent b4d9ea1878
commit c6175bbe68

View File

@ -354,8 +354,8 @@ add_palette (GtkColorChooserWidget *cc,
atk_obj = gtk_widget_get_accessible (p); atk_obj = gtk_widget_get_accessible (p);
if (names) if (names)
{ {
atk_object_set_description (atk_obj, atk_object_set_name (atk_obj,
g_dpgettext2 (GETTEXT_PACKAGE, "Color name", names[i])); g_dpgettext2 (GETTEXT_PACKAGE, "Color name", names[i]));
} }
else else
{ {
@ -363,7 +363,7 @@ add_palette (GtkColorChooserWidget *cc,
name = accessible_color_name (&colors[i]); name = accessible_color_name (&colors[i]);
text = g_strdup_printf (_("Color: %s"), name); text = g_strdup_printf (_("Color: %s"), name);
atk_object_set_description (atk_obj, text); atk_object_set_name (atk_obj, text);
g_free (text); g_free (text);
g_free (name); g_free (name);
} }