diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-10 09:36:11 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-10 09:36:11 +0000 |
commit | f37506557aedd7c9e0141eb8299214db6c63a046 (patch) | |
tree | 164a94b28347f78ae722ac884c611654d5277284 | |
parent | 4d8cd49f297aa2a9facf5b20f253eb5058533fad (diff) |
Include some trailing punctuations as URI.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@882 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | src/textview.c | 8 |
3 files changed, 13 insertions, 5 deletions
@@ -1,5 +1,10 @@ 2006-01-10 + * src/textview.c: get_uri_part(): use glib functions for isgraph() and + ispunct(). Include some trailing punctuations as URI. + +2006-01-10 + * src/summaryview.c src/mainwindow.c: repositioned the "Delete" menu and added a separator to prevent accidental selection. diff --git a/ChangeLog.ja b/ChangeLog.ja index 33eb53b7..66cd8a80 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,10 @@ 2006-01-10 + * src/textview.c: get_uri_part(): isgraph() と ispunct() の glib 版 + 関数を使用。いくつかの末尾の記号を URI に含めた。 + +2006-01-10 + * src/summaryview.c src/mainwindow.c: 誤って選択するのを防ぐため、「削除」メニューを 再配置し、セパレータを追加。 diff --git a/src/textview.c b/src/textview.c index 5645808e..db604e8a 100644 --- a/src/textview.c +++ b/src/textview.c @@ -834,7 +834,7 @@ static gboolean get_uri_part(const gchar *start, const gchar *scanpos, /* find end point of URI */ for (ep_ = scanpos; *ep_ != '\0'; ep_++) { - if (!isgraph(*(const guchar *)ep_) || + if (!g_ascii_isgraph(*ep_) || !isascii(*(const guchar *)ep_) || strchr("()<>{}[]\"", *ep_)) break; @@ -846,11 +846,9 @@ static gboolean get_uri_part(const gchar *start, const gchar *scanpos, * should pass some URI type to this function and decide on that whether * to perform punctuation stripping */ -#define IS_REAL_PUNCT(ch) (ispunct(ch) && ((ch) != '/')) +#define IS_REAL_PUNCT(ch) (g_ascii_ispunct(ch) && !strchr("/?=", ch)) - for (; ep_ - 1 > scanpos + 1 && - IS_REAL_PUNCT(*(const guchar *)(ep_ - 1)); - ep_--) + for (; ep_ - 1 > scanpos + 1 && IS_REAL_PUNCT(*(ep_ - 1)); ep_--) ; #undef IS_REAL_PUNCT |