[evolution-patches] Please review my patch for bug #46515



Hello All,
       Could you review my patch for bug #46515? My patch can solve this
problem. I removed some confused text in source code, that will make insert image more clearly

Bug Summary: No sense text in sample area
Bug Link:http://bugzilla.ximian.com/show_bug.cgi?id=46515
Thanks
Antonio Xu




Index: components/html-editor/image.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/image.c,v
retrieving revision 1.51
diff -u -r1.51 image.c
--- components/html-editor/image.c	12 May 2003 20:46:48 -0000	1.51
+++ components/html-editor/image.c	17 Jul 2003 13:49:28 -0000
@@ -202,7 +202,7 @@
 }
 
 static gchar *
-get_sample_html (GtkHTMLEditImageProperties *d, gboolean insert)
+get_sample_html (GtkHTMLEditImageProperties *d)
 {
 	gchar *html, *image, *body, *width, *height, *align, *src, *alt, *border, *padh, *padv, *lbegin, *lend, *location;
 
@@ -250,15 +250,10 @@
 	image   = substitute_string (image, "@link_end@", lend);
 
 	body   = html_engine_save_get_sample_body (d->cd->html->engine, NULL);
-	if (insert) {
+	if (strcasecmp(location, "") != 0) {
 		html   = g_strconcat (body, image, NULL);
 	} else {
-		html   = g_strconcat (body,
-				      _("The quick brown fox jumps over the lazy dog."),
-				      " ",
-				      image,
-				      _("The quick brown fox jumps over the lazy dog."),
-				      NULL);
+		html   = g_strconcat (body, _("No image"), NULL);
 	}
 
 	g_free (location);
@@ -282,7 +277,7 @@
 {
 	gchar *html;
 
-	html = get_sample_html (d, FALSE);
+	html = get_sample_html (d);
 	gtk_html_load_from_string (d->sample, html, -1);
 	g_free (html);
 }
@@ -670,7 +665,7 @@
 	if (insert) {
 		gchar *html;
 
-		html = get_sample_html (d, TRUE);
+		html = get_sample_html (d);
 		gtk_html_append_html (d->cd->html, html);
 	} else {
 		HTMLImage *image = HTML_IMAGE (d->image);


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