diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-12-20 08:41:23 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-12-20 08:41:23 +0000 |
commit | 3f7a1411acb0cbb6b2df06134e42e596257c3051 (patch) | |
tree | 3e0c82750240fd8b72efb650136391110b09dd36 | |
parent | 8945c06437dca9a40882ccd7a768c63c47a70366 (diff) |
compose_is_itemized(): also check for enumerated lines such as (1), (2), ...
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@846 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | src/compose.c | 22 |
3 files changed, 31 insertions, 1 deletions
@@ -1,5 +1,10 @@ 2005-12-20 + * src/compose.c: compose_is_itemized(): also check for enumerated + lines such as (1), (2), ... + +2005-12-20 + * libsylph/account.[ch]: account_address_exist(): new. src/account_dialog.c src/summaryview.c: look for all accounts when the option "Display diff --git a/ChangeLog.ja b/ChangeLog.ja index 6fb8134b..1f832e9e 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,10 @@ 2005-12-20 + * src/compose.c: compose_is_itemized(): (1), (2), ... のように列挙 + された行もチェックするようにした。 + +2005-12-20 + * libsylph/account.[ch]: account_address_exist(): 新規。 src/account_dialog.c src/summaryview.c: 「差出人が自分の場合は `差出人' カラムに宛先を diff --git a/src/compose.c b/src/compose.c index ed44889e..b62b50ec 100644 --- a/src/compose.c +++ b/src/compose.c @@ -2119,9 +2119,29 @@ static gboolean compose_is_itemized(GtkTextBuffer *buffer, } clen = g_unichar_to_utf8(wc, ch); + + /* (1), 2) etc. */ + if ((clen == 1 && ch[0] == '(') || g_unichar_isdigit(wc)) { + if (ch[0] == '(') + gtk_text_iter_forward_char(&iter); + + while (1) { + wc = gtk_text_iter_get_char(&iter); + clen = g_unichar_to_utf8(wc, ch); + if (g_unichar_isdigit(wc)) + gtk_text_iter_forward_char(&iter); + else if (clen == 1 && ch[0] == ')') { + gtk_text_iter_forward_char(&iter); + wc = gtk_text_iter_get_char(&iter); + if (g_unichar_isspace(wc)) + return TRUE; + } else + return FALSE; + } + } + if (clen != 1) return FALSE; - if (!strchr("*-+", ch[0])) return FALSE; |