[gnome-control-center] Fix a11y/keynav issues in the sound panel



commit c6ed45a0dc889e4bcb327c3c498065d84bfc3442
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun May 15 22:40:26 2011 -0400

    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.

 panels/sound/gvc-combo-box.c    |    1 +
 panels/sound/gvc-mixer-dialog.c |    2 +-
 panels/sound/gvc-speaker-test.c |    5 +++++
 3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/panels/sound/gvc-combo-box.c b/panels/sound/gvc-combo-box.c
index 5a19a44..9cc2a25 100644
--- a/panels/sound/gvc-combo-box.c
+++ b/panels/sound/gvc-combo-box.c
@@ -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);
 
diff --git a/panels/sound/gvc-mixer-dialog.c b/panels/sound/gvc-mixer-dialog.c
index 56d0832..6d269db 100644
--- a/panels/sound/gvc-mixer-dialog.c
+++ b/panels/sound/gvc-mixer-dialog.c
@@ -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);
 
diff --git a/panels/sound/gvc-speaker-test.c b/panels/sound/gvc-speaker-test.c
index 8b56c48..6a31f3c 100644
--- a/panels/sound/gvc-speaker-test.c
+++ b/panels/sound/gvc-speaker-test.c
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]