[gnome-control-center] Background: Improve a11y of wallpaper list



commit 4838efab110354e3af853372f343f21fcb241b8e
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon May 16 00:12:44 2011 -0400

    Background: Improve a11y of wallpaper list
    
    Add an invisible text cell renderer to have the text spoken
    by orca.

 panels/background/background.ui          |   10 ++++++++++
 panels/background/bg-colors-source.c     |    1 +
 panels/background/bg-source.c            |    2 +-
 panels/background/bg-wallpapers-source.c |    1 +
 4 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/panels/background/background.ui b/panels/background/background.ui
index 9960c85..43afc41 100644
--- a/panels/background/background.ui
+++ b/panels/background/background.ui
@@ -62,6 +62,16 @@
                     <attribute name="gicon">0</attribute>
                   </attributes>
                 </child>
+                <child>
+                  <!-- this cell renderer is here just to have
+                       the text spoken in orca -->
+                  <object class="GtkCellRendererText" id="text-renderer">
+                    <property name="visible">False</property>
+                  </object>
+                  <attributes>
+                    <attribute name="text">2</attribute>
+                  </attributes>
+                </child>
               </object>
             </child>
           </object>
diff --git a/panels/background/bg-colors-source.c b/panels/background/bg-colors-source.c
index c8299db..dac87ca 100644
--- a/panels/background/bg-colors-source.c
+++ b/panels/background/bg-colors-source.c
@@ -117,6 +117,7 @@ bg_colors_source_init (BgColorsSource *self)
       gtk_list_store_insert_with_values (store, NULL, 0,
                                          0, pixbuf,
                                          1, item,
+                                         2, _(items[i].name),
                                          -1);
 
       g_object_unref (pixbuf);
diff --git a/panels/background/bg-source.c b/panels/background/bg-source.c
index 240a154..50bd350 100644
--- a/panels/background/bg-source.c
+++ b/panels/background/bg-source.c
@@ -118,7 +118,7 @@ bg_source_init (BgSource *self)
 
   priv = self->priv = SOURCE_PRIVATE (self);
 
-  priv->store = gtk_list_store_new (2, G_TYPE_ICON, G_TYPE_OBJECT);
+  priv->store = gtk_list_store_new (3, G_TYPE_ICON, G_TYPE_OBJECT, G_TYPE_STRING);
 }
 
 GtkListStore*
diff --git a/panels/background/bg-wallpapers-source.c b/panels/background/bg-wallpapers-source.c
index b80e2a5..7b1e2ab 100644
--- a/panels/background/bg-wallpapers-source.c
+++ b/panels/background/bg-wallpapers-source.c
@@ -129,6 +129,7 @@ load_wallpapers (gchar              *key,
   gtk_list_store_set (store, &iter,
                       0, pixbuf,
                       1, g_object_ref (item),
+                      2, cc_background_item_get_name (item),
                       -1);
 
   if (pixbuf)



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