[evolution-patches] #53537 The Insert Link function doesn't work



here is the patch for both 1.4 and 1.5
the description of this bug is in
	http://bugzilla.ximian.com/show_bug.cgi?id=53737

performance of this bug?
        * when you add a link with protocol like "http://www.google.com";
	  every thing works ok
        * if you add a link without protocol just like "www.google.com"
          the link wonn't work. And, when you right click the link and 
          select "copy location", you will see that what you copied is 
          "cid:/www.google.com".

chaged files:
	* gtkml/src/gtkml.c

what did I do:
	* when the base url is "cid:"(in 1.4) or "em-no-cid:"(in 1.5),
	  just return url, ignore the base url

result:
	* if you insert a link without protocol, open link and copy
	  location can also work normally.
Index: gtkhtml.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.c,v
retrieving revision 1.520.2.6
diff -u -r1.520.2.6 gtkhtml.c
--- gtkhtml.c	5 Sep 2003 07:52:24 -0000	1.520.2.6
+++ gtkhtml.c	18 Feb 2004 04:35:40 -0000
@@ -1256,7 +1256,7 @@
 	size_t base_len, url_len;
 	gboolean absolute = FALSE;
 
-	if (!base || (url && strstr (url, ":"))) {
+	if (!base || (url && strstr (url, ":")) || !g_strncasecmp (base, "cid:", 4)) {
 		/*
 		  g_warning ("base = %s url = %s new_url = %s",
 		  base, url, new_url);
Index: gtkhtml.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.c,v
retrieving revision 1.548
diff -u -r1.548 gtkhtml.c
--- gtkhtml.c	2 Jan 2004 17:02:36 -0000	1.548
+++ gtkhtml.c	18 Feb 2004 04:37:07 -0000
@@ -1305,7 +1305,7 @@
 	size_t base_len, url_len;
 	gboolean absolute = FALSE;
 
-	if (!base || (url && strstr (url, ":"))) {
+	if (!base || (url && strstr (url, ":")) || !g_strncasecmp (base, "em-no-cid:", 10)) {
 		/*
 		  g_warning ("base = %s url = %s new_url = %s",
 		  base, url, new_url);


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