empathy r1196 - trunk/libempathy-gtk
- From: xclaesse svn gnome org
 
- To: svn-commits-list gnome org
 
- Subject: empathy r1196 - trunk/libempathy-gtk
 
- Date: Fri,  4 Jul 2008 16:07:02 +0000 (UTC)
 
Author: xclaesse
Date: Fri Jul  4 16:07:02 2008
New Revision: 1196
URL: http://svn.gnome.org/viewvc/empathy?rev=1196&view=rev
Log:
Prepend "mailto:" to urls containing a "@".
Modified:
   trunk/libempathy-gtk/empathy-ui-utils.c
Modified: trunk/libempathy-gtk/empathy-ui-utils.c
==============================================================================
--- trunk/libempathy-gtk/empathy-ui-utils.c	(original)
+++ trunk/libempathy-gtk/empathy-ui-utils.c	Fri Jul  4 16:07:02 2008
@@ -1294,13 +1294,17 @@
 static gchar *
 fixup_url (const gchar *url)
 {
-	if (!g_str_has_prefix (url, "ghelp:") &&
-	    !strstr (url, ":/") &&
-	    !strstr (url, "@")) {
-		return g_strdup_printf ("http://%s", url);
-	} else {
+	if (g_str_has_prefix (url, "ghelp:") ||
+	    g_str_has_prefix (url, "mailto:") ||
+	    strstr (url, ":/")) {
 		return NULL;
 	}
+
+	if (strstr (url, "@")) {
+		return g_strdup_printf ("mailto:%s", url);
+	}
+
+	return g_strdup_printf ("http://%s", url);
 }
 
 void
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]