2006-12-05 [paul] 2.6.1cvs4
authorPaul Mangan <paul@claws-mail.org>
Tue, 5 Dec 2006 09:22:12 +0000 (09:22 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 5 Dec 2006 09:22:12 +0000 (09:22 +0000)
* src/wizard.c
encode headers
Thanks to Colin

ChangeLog
PATCHSETS
configure.ac
src/wizard.c

index 2024f72730f0ad0685dec0356b2c2e5ed1495c60..9f05252e76d9704683c8ff4036f6986995da5218 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-12-05 [paul]      2.6.1cvs4
+
+       * src/wizard.c
+               encode headers
+               Thanks to Colin
+
 2006-12-05 [paul]      2.6.1cvs3
 
        * tools/README
index 777d175592f4de6bd341af4972100e1e0fc03006..6dbbdd891f8c3302f3be2691a4f16e613034bd29 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.42.2.23 -r 1.42.2.24 NEWS;  cvs diff -u -r 1.8.2.27 -r 1.8.2.28 README;  cvs diff -u -r 1.1.2.12 -r 1.1.2.13 RELEASE_NOTES;  cvs diff -u -r 1.654.2.2163 -r 1.654.2.2164 configure.ac;  cvs diff -u -r 1.30.2.13 -r 1.30.2.14 tools/README;  ) > 2.6.1cvs1.patchset
 ( cvs diff -u -r 1.382.2.338 -r 1.382.2.339 src/compose.c;  ) > 2.6.1cvs2.patchset
 ( cvs diff -u -r 1.30.2.14 -r 1.30.2.15 tools/README;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 tools/textviewer.pl;  ) > 2.6.1cvs3.patchset
+( cvs diff -u -r 1.1.2.39 -r 1.1.2.40 src/wizard.c;  ) > 2.6.1cvs4.patchset
index 4a77054c5569664fae04adef5d096b582070dead..fd0eefa90141f1b70053b61e6bb360bdb0ec84c3 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=6
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=3
+EXTRA_VERSION=4
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 9bd95c241f1265db5e7bc0c21927673e402e846b..7468110350b9ca4f62895f1dbcddbd7caf4db9e2 100644 (file)
@@ -447,15 +447,23 @@ static void write_welcome_email(WizardWindow *wizard)
        gchar *head=NULL;
        gchar *body=NULL;
        gchar *msg=NULL;
-       gchar *subj=NULL;
        const gchar *mailbox = gtk_entry_get_text(GTK_ENTRY(wizard->mailbox_name));
        Folder *folder = folder_find_from_path(mailbox);
        FolderItem *inbox = folder ? folder->inbox:NULL;
        gchar *file = get_tmp_file();
+       gchar enc_from_name[BUFFSIZE], enc_to_name[BUFFSIZE], enc_subject[BUFFSIZE];
        
        get_rfc822_date(buf_date, sizeof(buf_date));
 
-       subj = g_strdup_printf(_("Welcome to Claws Mail "));
+       conv_encode_header_full(enc_subject, sizeof(enc_subject), 
+                       _("Welcome to Claws Mail "),
+                       strlen("Subject: "), FALSE, CS_INTERNAL);
+       conv_encode_header_full(enc_to_name, sizeof(enc_to_name), 
+                       gtk_entry_get_text(GTK_ENTRY(wizard->full_name)),
+                       strlen("To: "), TRUE, CS_INTERNAL);
+       conv_encode_header_full(enc_from_name, sizeof(enc_from_name), 
+                       _("Claws Mail Team"),
+                       strlen("From: "), TRUE, CS_INTERNAL);
 
        head = g_strdup_printf(
                "From: %s <%s>\n"
@@ -465,11 +473,11 @@ static void write_welcome_email(WizardWindow *wizard)
                "X-Face: %s\n"
                "Face: %s\n"
                "Content-Type: text/plain; charset=UTF-8\n",
-               _("Claws Mail Team"),
+               enc_from_name,
                USERS_ML_ADDR,
-               gtk_entry_get_text(GTK_ENTRY(wizard->full_name)),
+               enc_to_name,
                gtk_entry_get_text(GTK_ENTRY(wizard->email)),
-               buf_date, subj, XFACE, FACE);
+               buf_date, enc_subject, XFACE, FACE);
        body = g_strdup_printf(
                _("\n"
                "Welcome to Claws Mail\n"
@@ -524,7 +532,6 @@ static void write_welcome_email(WizardWindow *wizard)
                MsgFlags flags = { MSG_UNREAD|MSG_NEW, 0};
                folder_item_add_msg(inbox, file, &flags, FALSE);
        }
-       g_free(subj);
        g_free(head);
        g_free(body);
        g_free(msg);