[gnome-contacts] App: add accesibility name to buttons without label



commit f1b9d4a017d16229287e00b79248b376d82b7434
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Tue Apr 1 16:31:58 2014 -0400

    App: add accesibility name to buttons without label
    
    Fixed: https://bugzilla.gnome.org/show_bug.cgi?id=720718

 src/contacts-contact-editor.vala |    5 +++++
 src/contacts-contact-frame.vala  |    1 +
 src/contacts-window.ui           |   10 ++++++++++
 3 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-contact-editor.vala b/src/contacts-contact-editor.vala
index ac120c7..14ec871 100644
--- a/src/contacts-contact-editor.vala
+++ b/src/contacts-contact-editor.vala
@@ -245,6 +245,7 @@ public class Contacts.ContactEditor : Grid {
     attach (value_entry, 1, row, 1, 1);
 
     var delete_button = new Button ();
+    delete_button.get_accessible ().set_name (_("Delete field"));
     var image = new Image.from_icon_name ("user-trash-symbolic", IconSize.MENU);
     delete_button.add (image);
     attach (delete_button, 3, row, 1, 1);
@@ -279,6 +280,7 @@ public class Contacts.ContactEditor : Grid {
     attach (value_entry, 1, row, 1, 1);
 
     var delete_button = new Button ();
+    delete_button.get_accessible ().set_name (_("Delete field"));
     var image = new Image.from_icon_name ("user-trash-symbolic", IconSize.MENU);
     delete_button.add (image);
     attach (delete_button, 3, row, 1, 1);
@@ -317,6 +319,7 @@ public class Contacts.ContactEditor : Grid {
     attach (sw, 1, row, 1, 1);
 
     var delete_button = new Button ();
+    delete_button.get_accessible ().set_name (_("Delete field"));
     var image = new Image.from_icon_name ("user-trash-symbolic", IconSize.MENU);
     delete_button.add (image);
     delete_button.set_valign (Align.START);
@@ -375,6 +378,7 @@ public class Contacts.ContactEditor : Grid {
     attach (box, 1, row, 1, 1);
 
     var delete_button = new Button ();
+    delete_button.get_accessible ().set_name (_("Delete field"));
     var image = new Image.from_icon_name ("user-trash-symbolic", IconSize.MENU);
     delete_button.add (image);
     attach (delete_button, 3, row, 1, 1);
@@ -403,6 +407,7 @@ public class Contacts.ContactEditor : Grid {
     attach (value_address, 1, row, 1, 1);
 
     var delete_button = new Button ();
+    delete_button.get_accessible ().set_name (_("Delete field"));
     var image = new Image.from_icon_name ("user-trash-symbolic", IconSize.MENU);
     delete_button.add (image);
     delete_button.set_valign (Align.START);
diff --git a/src/contacts-contact-frame.vala b/src/contacts-contact-frame.vala
index 9ee626b..7e2352a 100644
--- a/src/contacts-contact-frame.vala
+++ b/src/contacts-contact-frame.vala
@@ -37,6 +37,7 @@ public class Contacts.ContactFrame : Frame {
 
     if (with_button) {
       var button = new Button ();
+      button.get_accessible ().set_name (_("Change avatar"));
       button.get_style_context ().add_class ("contacts-square");
       button.set_relief (ReliefStyle.NONE);
       button.set_focus_on_click (false);
diff --git a/src/contacts-window.ui b/src/contacts-window.ui
index 3ccffa9..5a31b35 100644
--- a/src/contacts-window.ui
+++ b/src/contacts-window.ui
@@ -27,6 +27,11 @@
                 <property name="can_focus">True</property>
                 <property name="halign">center</property>
                 <property name="valign">center</property>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="add_button_atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Add contact</property>
+                  </object>
+                </child>
                 <style>
                   <class name="image-button"/>
                 </style>
@@ -50,6 +55,11 @@
                 <property name="focus_on_click">False</property>
                 <property name="halign">center</property>
                 <property name="valign">center</property>
+                <child internal-child="accessible">
+                  <object class="AtkObject" id="select_button_atkobject">
+                    <property name="AtkObject::accessible-name" translatable="yes">Selection mode</property>
+                  </object>
+                </child>
                 <style>
                   <class name="image-button"/>
                 </style>


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