[evolution-patches] two patches about gtkhtml, fixed two bugs (patch a11y-image.diff)



hi,rodo

Thank you very much for your hard work!!

There are two new patches about gtkhtml, will you please review it ?

a11y-70629.diff : this fixed #70629. Addition, it fixed another two trivial bugs.

a11y-image.diff : this fixed an a11y bug. It set the atk name of an a11y image object. Thus when mail part didn't load an image, gnopernicus could speak out the ALT text of the image.

PS.
rodo, Now there are four patches waiting for your review.

src-84.diff : I sent it to you on Dec 14th.
src-87.diff : I sent it to you on Dec 14th either.

a11y-70629.diff and a11y-image.diff: here they are.

Yours,
Mengjie Yu
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/a11y/ChangeLog,v
retrieving revision 1.14
diff -u -p -r1.14 ChangeLog
--- ChangeLog	17 Dec 2004 02:30:45 -0000	1.14
+++ ChangeLog	17 Dec 2004 09:10:06 -0000
@@ -1,3 +1,9 @@
+2004-12-17  Mengjie Yu  <meng-jie yu sun com>
+
+	* image.c: (html_a11y_image_get_name),
+	(html_a11y_image_get_image_description):
+	change image name/description, make gnopernicus happy.
+
 2004-12-15  Mengjie Yu  <meng-jie yu sun com>
 
 	* object.c: (get_n_actions), (get_description), (action_get_name),
Index: image.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/a11y/image.c,v
retrieving revision 1.2
diff -u -p -r1.2 image.c
--- image.c	1 Nov 2002 15:34:27 -0000	1.2
+++ image.c	17 Dec 2004 09:10:07 -0000
@@ -29,6 +29,8 @@
 #include "html.h"
 #include "image.h"
 
+#include <glib/gi18n.h>
+
 static void html_a11y_image_class_init    (HTMLA11YImageClass *klass);
 static void html_a11y_image_init          (HTMLA11YImage *a11y_image);
 static void atk_image_interface_init      (AtkImageIface *iface);
@@ -139,8 +141,23 @@ static G_CONST_RETURN gchar *
 html_a11y_image_get_name (AtkObject *accessible)
 {
 	HTMLImage *img = HTML_IMAGE (HTML_A11Y_HTML (accessible));
+	gchar *name, *tmpName;
+
+	if (accessible->name)
+		return accessible->name;
+
+	tmpName = g_strconcat (_("URL is "), img->image_ptr->url, NULL);
+
+	if (img->alt) {
+		name = g_strconcat (tmpName, _(", Alternative Text is "), img->alt, NULL);
+		g_free (tmpName);
+	} else
+		name = tmpName;
 
-	return g_strdup (img->image_ptr->url);
+	atk_object_set_name (accessible, name);
+	g_free (name);
+
+	return accessible->name;
 }
 
 /*
@@ -172,7 +189,5 @@ html_a11y_image_get_image_size (AtkImage
 static G_CONST_RETURN gchar *
 html_a11y_image_get_image_description (AtkImage *image)
 {
-	HTMLImage *img = HTML_IMAGE (HTML_A11Y_HTML (image));
-
-	return g_strdup (img->alt);
+	return  html_a11y_image_get_name (ATK_OBJECT (image));
 }


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