aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-01-05 07:52:01 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-01-05 07:52:01 +0000
commit28ca8fe1e1fc59095d7cc303cae4fc559bc563bf (patch)
treef5a16bc134229dcc74e614dcb4021e43e60c6b01
parent944e507a6f7fda2df98d34ebd771e2cafdb58f7c (diff)
add http:// scheme before implicit URIs begin with 'www.'.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@873 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja5
-rw-r--r--src/textview.c14
3 files changed, 23 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 660cc79e..3b5eeefe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2006-01-05
+ * src/textview.c: textview_make_clickable_parts(): add http:// scheme
+ before implicit URIs begin with 'www.'.
+
+2006-01-05
+
* libsylph/virtual.c
src/folderview.c: fixed a bug that search folders under IMAP4 or
NNTP folders couldn't be removed.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 000a3698..f3dd0612 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,10 @@
2006-01-05
+ * src/textview.c: textview_make_clickable_parts(): 'www.' で始まる
+ 暗黙の URI の前に http:// スキームを追加するようにした。
+
+2006-01-05
+
* libsylph/virtual.c
src/folderview.c: IMAP4 または NNTP フォルダ以下の検索フォルダを
削除できないバグを修正。
diff --git a/src/textview.c b/src/textview.c
index cedc1dc5..5645808e 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -865,6 +865,18 @@ static gchar *make_uri_string(const gchar *bp, const gchar *ep)
return g_strndup(bp, ep - bp);
}
+static gchar *make_http_uri_string(const gchar *bp, const gchar *ep)
+{
+ gchar *tmp;
+ gchar *result;
+
+ tmp = g_strndup(bp, ep - bp);
+ result = g_strconcat("http://", tmp, NULL);
+ g_free(tmp);
+
+ return result;
+}
+
/* valid mail address characters */
#define IS_RFC822_CHAR(ch) \
(isascii(ch) && \
@@ -983,7 +995,7 @@ static void textview_make_clickable_parts(TextView *textview,
{"http://", strcasestr, get_uri_part, make_uri_string},
{"https://", strcasestr, get_uri_part, make_uri_string},
{"ftp://", strcasestr, get_uri_part, make_uri_string},
- {"www.", strcasestr, get_uri_part, make_uri_string},
+ {"www.", strcasestr, get_uri_part, make_http_uri_string},
{"mailto:", strcasestr, get_uri_part, make_uri_string},
{"@", strcasestr, get_email_part, make_email_string}
};