[evolution-patches] patch for a11y bug of contact selector UI
- From: "hao.sheng" <hao sheng sun com>
- To: Hans Petter Jansson <hpj ximian com>
- Cc: evolution-patches ximian com
- Subject: [evolution-patches] patch for a11y bug of contact selector UI
- Date: Wed, 26 Jan 2005 18:14:09 +0800
hi hpj
Attach is an a11y patch for evolution contact selector UI, include
adding accesskey and making gok work correctly.
Please help me to review it.
Thanks very much.
Best regards
hao.sheng
? UI_a11y_key.diff
? a11y_contact_editor.diff
? gui1.diff
? gui1111.diff
? tele-a11y.diff
? gui/contact-list-editor/contact-list-editor.gladep
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1902
diff -u -p -r1.1902 ChangeLog
--- ChangeLog 22 Jan 2005 04:03:51 -0000 1.1902
+++ ChangeLog 26 Jan 2005 09:51:13 -0000
@@ -1,3 +1,8 @@
+2005-01-26 Hao Sheng <hao sheng sun com>
+
+ * gui/contact-list-editor/e-contact-list-editor.c:
+ (setup_name_selector): add access key to 'Member' Button.
+
2005-01-21 Sivaiah Nallagatla <snallagatla novell com>
* gui/widgets/e-addressbook-model.[ch]
Index: gui/contact-list-editor/e-contact-list-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/contact-list-editor/e-contact-list-editor.c,v
retrieving revision 1.65
diff -u -p -r1.65 e-contact-list-editor.c
--- gui/contact-list-editor/e-contact-list-editor.c 23 Dec 2004 02:42:11 -0000 1.65
+++ gui/contact-list-editor/e-contact-list-editor.c 26 Jan 2005 09:55:20 -0000
@@ -706,7 +706,7 @@ setup_name_selector (EContactListEditor
editor->name_selector = e_name_selector_new ();
name_selector_model = e_name_selector_peek_model (editor->name_selector);
- e_name_selector_model_add_section (name_selector_model, "Members", gettext ("Members"), NULL);
+ e_name_selector_model_add_section (name_selector_model, "Members", gettext ("_Members"), NULL);
name_selector_dialog = e_name_selector_peek_dialog (editor->name_selector);
gtk_window_set_title (GTK_WINDOW (name_selector_dialog), _("Contact List Members"));
? .gui2222.diff.swp
? 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 26 Jan 2005 10:00:59 -0000
@@ -1,3 +1,14 @@
+2005-01-26 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 26 Jan 2005 10:01:15 -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;
+ AtkObject *a11y;
g_assert (name != NULL);
g_assert (pretty_name != NULL);
@@ -401,8 +407,19 @@ 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 ());
+
+ a11y = gtk_widget_get_accessible (section.destination_view);
+ if (a11y != NULL) {
+ gchar *text;
+ if (pango_parse_markup (pretty_name, -1, '_', NULL,
+ &text, NULL, NULL)) {
+ atk_object_set_name (a11y, 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 26 Jan 2005 10:01:20 -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"><b>Contacts</b></property>
- <property name="use_underline">False</property>
+ <property name="label" translatable="yes"><b>_Contacts</b></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 26 Jan 2005 10:01:26 -0000
@@ -168,6 +168,7 @@ e_name_selector_peek_section_entry (ENam
EDestinationStore *destination_store;
Section *section;
gint n;
+ AtkObject *a11y;
g_return_val_if_fail (E_IS_NAME_SELECTOR (name_selector), NULL);
g_return_val_if_fail (name != NULL, NULL);
@@ -184,6 +185,17 @@ e_name_selector_peek_section_entry (ENam
if (!section->entry) {
section->entry = e_name_selector_entry_new ();
+ a11y = gtk_widget_get_accessible (GTK_WIDGET (§ion->entry->parent));
+
+ if (a11y != NULL) {
+ gchar *text;
+ if (pango_parse_markup (name, -1, '_', NULL,
+ &text, NULL, NULL)) {
+ atk_object_set_name (a11y, 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]