aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-03-31 02:05:48 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-03-31 02:05:48 +0800
commit2067796514a4273959cc478a252932f6db1b2d2d (patch)
tree3fecced618ee8e85f6f742145f46d2b5eb46ab7c /mail
parentc2f952971ba1362587fa6b9ed5e4b916e14d13ab (diff)
downloadgsoc2013-evolution-2067796514a4273959cc478a252932f6db1b2d2d.tar.gz
gsoc2013-evolution-2067796514a4273959cc478a252932f6db1b2d2d.tar.zst
gsoc2013-evolution-2067796514a4273959cc478a252932f6db1b2d2d.zip
Add support for converting e-mail addresses to links. (is_email_address):
2001-03-30 Jon Trowbridge <trow@ximian.com> * e-html-utils.c (e_text_to_html_full): Add support for converting e-mail addresses to links. (is_email_address): Added. Identifies e-mail addresses. (email_address_extract): Added. Extracts a copy of the e-mail address from the text. * e-html-utils.h (E_TEXT_TO_HTML_CONVERT_ADDRESSES): Added. * e-url.c (e_url_shroud): Added. Copy a url, replacing any plaintext passwords with a single *. (e_url_equal): Compare two urls, taking into account that they may or may not be shrouded. 2001-03-30 Jon Trowbridge <trow@ximian.com> * camel-mime-message.c (camel_mime_message_set_source): Shrould our source URL before putting it into X-Evolution-Source. 2001-03-30 Jon Trowbridge <trow@ximian.com> * mail-display.c (mail_text_write): Add (commented-out) E_TEXT_TO_HTML_CONVERT_ADDRESSES. * mail-config.c (mail_config_get_account_by_source_url): Call e_url_equal to compare URLs. svn path=/trunk/; revision=9050
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-config.c12
-rw-r--r--mail/mail-display.c1
3 files changed, 11 insertions, 10 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3a755a64ac..c25e088ed8 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2001-03-30 Jon Trowbridge <trow@ximian.com>
+
+ * mail-display.c (mail_text_write): Add (commented-out)
+ E_TEXT_TO_HTML_CONVERT_ADDRESSES.
+
+ * mail-config.c (mail_config_get_account_by_source_url):
+ Call e_url_equal to compare URLs.
+
2001-03-30 Dan Winship <danw@ximian.com>
* component-factory.c (debug_cb): If the EvolutionShellComponent
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 38d84fc0e7..a58ecaaf02 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -35,6 +35,7 @@
#include <gal/util/e-util.h>
#include <e-util/e-html-utils.h>
+#include <e-util/e-url.h>
#include "mail.h"
#include "mail-config.h"
#include "mail-ops.h"
@@ -772,30 +773,21 @@ mail_config_get_account_by_name (const char *account_name)
return NULL;
}
-/*
- We do a strncmp on the MIN of the url lengths rather than a straight strcmp because
- I've observed extra stuff getting stuck on the end of urls in camel. Hopefully
- this work-around won't lead to any weirdness.
-*/
-
const MailConfigAccount *
mail_config_get_account_by_source_url (const char *source_url)
{
const MailConfigAccount *account;
GSList *l;
- gint src_len;
g_return_val_if_fail (source_url != NULL, NULL);
- src_len = strlen (source_url);
-
l = config->accounts;
while (l) {
account = l->data;
if (account
&& account->source
&& account->source->url
- && !strncmp (account->source->url, source_url, MIN (src_len, strlen (account->source->url))))
+ && e_url_equal (account->source->url, source_url))
return account;
l = l->next;
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 307408fb88..822a870bf4 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -920,6 +920,7 @@ mail_text_write (GtkHTML *html, GtkHTMLStream *stream,
htmltext = e_text_to_html_full (buf,
E_TEXT_TO_HTML_CONVERT_URLS |
+ /* E_TEXT_TO_HTML_CONVERT_ADDRESSES | */
E_TEXT_TO_HTML_CONVERT_NL |
E_TEXT_TO_HTML_CONVERT_SPACES |
(mail_config_get_citation_highlight () ? E_TEXT_TO_HTML_MARK_CITATION : 0),