Fix a11y/keynav issues in the sound panel

Add mnemonic to the 'Test Speaker' button, and add labelled-by
relations to the 'Test' buttons in the speaker test dialog.
This commit is contained in:
Matthias Clasen 2011-05-15 22:40:26 -04:00
parent ebe174f51c
commit c6ed45a0dc
3 changed files with 7 additions and 1 deletions

View file

@ -340,6 +340,7 @@ gvc_combo_box_init (GvcComboBox *combo_box)
gtk_box_pack_start (GTK_BOX (box), combo_box->priv->combobox, TRUE, TRUE, 0);
combo_box->priv->button = gtk_button_new_with_label ("APPLICATION BUG");
gtk_button_set_use_underline (GTK_BUTTON (combo_box->priv->button), TRUE);
gtk_widget_set_no_show_all (combo_box->priv->button, TRUE);
gtk_box_pack_start (GTK_BOX (box), combo_box->priv->button, FALSE, FALSE, 0);

View file

@ -1643,7 +1643,7 @@ on_card_selection_changed (GtkTreeSelection *selection,
current_profile = gvc_mixer_card_get_profile (card);
profiles = gvc_mixer_card_get_profiles (card);
dialog->priv->hw_profile_combo = gvc_combo_box_new (_("_Profile:"));
g_object_set (G_OBJECT (dialog->priv->hw_profile_combo), "button-label", _("Test Speakers"), NULL);
g_object_set (G_OBJECT (dialog->priv->hw_profile_combo), "button-label", _("_Test Speakers"), NULL);
gvc_combo_box_set_profiles (GVC_COMBO_BOX (dialog->priv->hw_profile_combo), profiles);
gvc_combo_box_set_active (GVC_COMBO_BOX (dialog->priv->hw_profile_combo), current_profile->profile);

View file

@ -331,10 +331,15 @@ channel_control_new (ca_context *canberra, pa_channel_position_t position)
gtk_box_pack_start (GTK_BOX (control), label, FALSE, FALSE, 0);
test_button = gtk_button_new_with_label (_("Test"));
g_signal_connect (G_OBJECT (test_button), "clicked",
G_CALLBACK (on_test_button_clicked), control);
g_object_set_data (G_OBJECT (control), "button", test_button);
atk_object_add_relationship (gtk_widget_get_accessible (test_button),
ATK_RELATION_LABELLED_BY,
gtk_widget_get_accessible (label));
box = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (box), test_button, TRUE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (control), box, FALSE, FALSE, 0);