aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja5
-rw-r--r--src/compose.c22
3 files changed, 31 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 83c19fbf..0586f8e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;