[Fwd: [evolution-patches] patch for a11y bug of contact selector UI]



Hi,
Attached patch was committed into CVS HEAD for module evolution-data-server. It includes some string changes.
   Thanks!
      Harry
--- Begin Message ---
hi hpj

Attach is an a11y patch for evolution contact selector UI.
I have changed as your requirement.

Please help me to review it.
Thanks very much.

Best regards
hao.sheng



? e-name-selector-dialog.gladep
? gui2.diff
? gui2222.diff
? test-contact-store
? test-name-selector
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/ChangeLog,v
retrieving revision 1.20
diff -u -p -r1.20 ChangeLog
--- ChangeLog	24 Jan 2005 06:38:21 -0000	1.20
+++ ChangeLog	27 Jan 2005 10:03:02 -0000
@@ -1,3 +1,14 @@
+2005-01-27  Hao Sheng <hao sheng sun com>
+
+	* e-name-selector-dialog.c:
+	(e_name_selector_dialog_init): set label mnemonic widget.
+	(add_section): set a11y name for button and section.
+
+	* e-name-selector.c:
+	(e_name_selector_peek_section_entry): set a11y name to the mail entry
+	
+	* e-name-selector-dialog.glade: add access name and access key.
+
 2005-01-24  Hans Petter Jansson  <hpj novell com>
 
 	* e-name-selector-entry.c (user_delete_text): If all destinations are
Index: e-name-selector-dialog.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/e-name-selector-dialog.c,v
retrieving revision 1.5
diff -u -p -r1.5 e-name-selector-dialog.c
--- e-name-selector-dialog.c	22 Jan 2005 09:59:42 -0000	1.5
+++ e-name-selector-dialog.c	27 Jan 2005 10:03:40 -0000
@@ -84,6 +84,7 @@ e_name_selector_dialog_init (ENameSelect
 	GtkCellRenderer   *cell_renderer;
 	GtkWidget         *widget;
 	GtkWidget         *container;
+	GtkWidget	  *label;
 	ESourceList       *source_list;
 
 	/* Get Glade GUI */
@@ -158,6 +159,10 @@ e_name_selector_dialog_init (ENameSelect
 
 	widget = e_source_option_menu_new (name_selector_dialog->source_list);
 	g_signal_connect_swapped (widget, "source_selected", G_CALLBACK (source_selected), name_selector_dialog);
+
+	label = glade_xml_get_widget (name_selector_dialog->gui, "AddressBookLabel");
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
+
 	gtk_widget_show (widget);
 
 	container = glade_xml_get_widget (name_selector_dialog->gui, "source-menu-box");
@@ -392,6 +397,7 @@ add_section (ENameSelectorDialog *name_s
 	GtkTreeViewColumn *column;
 	GtkCellRenderer   *cell_renderer;
 	GtkWidget         *widget;
+	gchar		  *text;
 
 	g_assert (name != NULL);
 	g_assert (pretty_name != NULL);
@@ -401,8 +407,14 @@ add_section (ENameSelectorDialog *name_s
 
 	section.name = g_strdup (name);
 	section.section_box      = GTK_BOX (gtk_hbox_new (FALSE, 12));
-	section.transfer_button  = GTK_BUTTON (gtk_button_new_with_label (pretty_name));
+	section.transfer_button  = GTK_BUTTON (gtk_button_new_with_mnemonic (pretty_name));
 	section.destination_view = GTK_TREE_VIEW (gtk_tree_view_new ());
+
+	if (pango_parse_markup (pretty_name, -1, '_', NULL,
+				&text, NULL, NULL))  {
+		atk_object_set_name (gtk_widget_get_accessible (section.destination_view), text);
+		g_free (text);
+	}
 
 	/* Set up transfer button */
 	g_signal_connect_swapped (section.transfer_button, "clicked",
Index: e-name-selector-dialog.glade
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/e-name-selector-dialog.glade,v
retrieving revision 1.2
diff -u -p -r1.2 e-name-selector-dialog.glade
--- e-name-selector-dialog.glade	17 Dec 2004 21:40:25 -0000	1.2
+++ e-name-selector-dialog.glade	27 Jan 2005 10:03:48 -0000
@@ -81,7 +81,7 @@
 	      <property name="column_spacing">12</property>
 
 	      <child>
-		<widget class="GtkLabel" id="label30">
+		<widget class="GtkLabel" id="AddressBookLabel">
 		  <property name="visible">True</property>
 		  <property name="label" translatable="yes">Address _Book:</property>
 		  <property name="use_underline">True</property>
@@ -93,6 +93,7 @@
 		  <property name="yalign">0.5</property>
 		  <property name="xpad">0</property>
 		  <property name="ypad">0</property>
+		  <property name="mnemonic_widget">source-menu-box</property>
 		</widget>
 		<packing>
 		  <property name="left_attach">0</property>
@@ -109,6 +110,9 @@
 		  <property name="visible">True</property>
 		  <property name="homogeneous">False</property>
 		  <property name="spacing">12</property>
+		  <accessibility>
+		    <atkproperty name="AtkObject::accessible_description" translatable="yes">						</atkproperty>
+		  </accessibility>
 
 		  <child>
 		    <widget class="GtkEntry" id="search">
@@ -121,6 +125,9 @@
 		      <property name="has_frame">True</property>
 		      <property name="invisible_char" translatable="yes">*</property>
 		      <property name="activates_default">False</property>
+		      <accessibility>
+			<atkproperty name="AtkObject::accessible_name" translatable="yes">Search</atkproperty>
+		      </accessibility>
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
@@ -150,6 +157,7 @@
 		  <property name="yalign">0.5</property>
 		  <property name="xpad">0</property>
 		  <property name="ypad">0</property>
+		  <property name="mnemonic_widget">search</property>
 		</widget>
 		<packing>
 		  <property name="left_attach">0</property>
@@ -166,6 +174,9 @@
 		  <property name="visible">True</property>
 		  <property name="homogeneous">False</property>
 		  <property name="spacing">0</property>
+		  <accessibility>
+		    <atkproperty name="AtkObject::accessible_name" translatable="yes">Address Book</atkproperty>
+		  </accessibility>
 
 		  <child>
 		    <placeholder/>
@@ -219,8 +230,8 @@
       <child>
 	<widget class="GtkLabel" id="label36">
 	  <property name="visible">True</property>
-	  <property name="label" translatable="yes">&lt;b&gt;Contacts&lt;/b&gt;</property>
-	  <property name="use_underline">False</property>
+	  <property name="label" translatable="yes">&lt;b&gt;_Contacts&lt;/b&gt;</property>
+	  <property name="use_underline">True</property>
 	  <property name="use_markup">True</property>
 	  <property name="justify">GTK_JUSTIFY_LEFT</property>
 	  <property name="wrap">False</property>
@@ -229,6 +240,7 @@
 	  <property name="yalign">0.5</property>
 	  <property name="xpad">0</property>
 	  <property name="ypad">0</property>
+	  <property name="mnemonic_widget">source-tree-view</property>
 	</widget>
 	<packing>
 	  <property name="padding">0</property>
@@ -272,6 +284,10 @@
 	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
 	      <property name="shadow_type">GTK_SHADOW_IN</property>
 	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+	      <accessibility>
+		<atkproperty name="AtkObject::accessible_name" translatable="yes">Contacts</atkproperty>
+		<atkrelation target="label36" type="labelled-by"/>
+	      </accessibility>
 
 	      <child>
 		<widget class="GtkTreeView" id="source-tree-view">
Index: e-name-selector.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserverui/e-name-selector.c,v
retrieving revision 1.2
diff -u -p -r1.2 e-name-selector.c
--- e-name-selector.c	23 Dec 2004 02:06:41 -0000	1.2
+++ e-name-selector.c	27 Jan 2005 10:03:49 -0000
@@ -183,7 +183,13 @@ e_name_selector_peek_section_entry (ENam
 	section = &g_array_index (name_selector->sections, Section, n);
 
 	if (!section->entry) {
+		gchar *text;
 		section->entry = e_name_selector_entry_new ();
+		if (pango_parse_markup (name, -1, '_', NULL,
+				&text, NULL, NULL))  {
+			atk_object_set_name (gtk_widget_get_accessible (GTK_WIDGET (section->entry)), text);
+			g_free (text);
+		}
 		e_name_selector_entry_set_destination_store (section->entry, destination_store);
 	}
 
begin:vcard
fn:hao sheng
n:sheng;hao
org:Sun Microsystems China Engineering & Research Institute;Desktop Group
adr:;;10/F Chuangxin Plaza, Tsinghua Science Park;Beijing;;100083;P.R.China
email;internet:hao sheng sun com
title:Software Engineer Intern
tel;work:+8610-82618200-82111
tel;cell:+86-13520134555
version:2.1
end:vcard


--- End Message ---


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