moonshot-window: Add accesibility labels to the Add button
authorJavier Jardón <javier.jardon@codethink.co.uk>
Thu, 5 May 2011 16:17:59 +0000 (17:17 +0100)
committerJavier Jardón <javier.jardon@codethink.co.uk>
Thu, 5 May 2011 16:19:35 +0000 (17:19 +0100)
src/moonshot-window.vala

index ecdf0d3..8c8c6ae 100644 (file)
@@ -367,6 +367,7 @@ class MainWindow : Window
 
         var button_add = new ToolButton (null, null);
         button_add.set_icon_name ("list-add-symbolic");
+        set_atk_name_description (button_add, _("Add"), _("Add new ID Card"));
         button_add.clicked.connect (add_identity_cb);
         var button_toolbar = new Toolbar ();
         button_toolbar.insert (button_add, 0);
@@ -450,6 +451,14 @@ class MainWindow : Window
         this.vbox_rigth.hide ();
     }
 
+    private void set_atk_name_description (Widget widget, string name, string description)
+    {
+       var atk_widget = widget.get_accessible ();
+
+       atk_widget.set_name (name);
+       atk_widget.set_description (description);
+    }
+
     private void connect_signals()
     {
         this.destroy.connect (Gtk.main_quit);