From: Paul Mangan Date: Sun, 21 Oct 2001 09:39:46 +0000 (+0000) Subject: insert file with DOS line endings X-Git-Tag: Release_0_6_4claws12~21 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=82199143df200009f78616e6f79f9aefcab024de insert file with DOS line endings --- diff --git a/AUTHORS b/AUTHORS index a729532ec..4a170c612 100644 --- a/AUTHORS +++ b/AUTHORS @@ -85,3 +85,4 @@ contributors (beside the above; based on Changelog) Jeroen Versteeg Ravemax Jens Jahnke + Thierry Godefroy diff --git a/ChangeLog.claws b/ChangeLog.claws index 2167c6f13..9575878fd 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,4 +1,17 @@ -2001-10-18 [hoa] 0.6.3claws29 +2001-10-21 [paul] 0.6.3claws30 + + * src/compose.c + insert a DOS text file from the compose window + into the composed message text (removes CRs characters) + Submitted by Thierry Godefroy + + * tools/filter_conv.pl, tools/README + automatically use ~/.sylpheed as working directory + print out confirmation message on completion + + * correct Hoa's last ChangeLog.claws entry + +2001-10-20 [hoa] 0.6.3claws29 * src/grouplistdialog.c bugfix (another ?) to give the right diff --git a/configure.in b/configure.in index ffbd6bd8a..12d5415d5 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ MINOR_VERSION=6 MICRO_VERSION=3 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws29 +EXTRA_VERSION=claws30 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl diff --git a/src/compose.c b/src/compose.c index 9976a14d8..191c3f0a3 100644 --- a/src/compose.c +++ b/src/compose.c @@ -1864,8 +1864,13 @@ static void compose_insert_file(Compose *compose, const gchar *file) gtk_stext_freeze(text); - while (fgets(buf, sizeof(buf), fp) != NULL) - gtk_stext_insert(text, NULL, NULL, NULL, buf, -1); + while (fgets(buf, sizeof(buf), fp) != NULL) { + if (strlen(buf) > 1 && buf[strlen(buf) - 2] == '\r' && buf[strlen(buf) - 1] == '\n') { + buf[strlen(buf) - 2] = '\n'; + buf[strlen(buf) - 1] = 0; + } + gtk_stext_insert(text, NULL, NULL, NULL, buf, -1); + } gtk_stext_thaw(text);