sync with sylpheed 0.5.1cvs1-3
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Wed, 25 Jul 2001 14:49:48 +0000 (14:49 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Wed, 25 Jul 2001 14:49:48 +0000 (14:49 +0000)
21 files changed:
ChangeLog
ChangeLog.claws
ChangeLog.jp
INSTALL
INSTALL.jp
configure.in
doc/manual/Makefile.am
src/codeconv.c
src/compose.c
src/imap.c
src/inc.c
src/mainwindow.c
src/news.c
src/nntp.c
src/pop.c
src/prefs_customheader.c
src/procmime.c
src/procmime.h
src/progressdialog.c
src/recv.c
src/smtp.c

index 930e01c..5d40510 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,59 @@
+2001-07-25
+
+       * src/progressdialog.c: made the CList scrollable.
+       * src/inc.c: inc_start(): don't abort with non-fatal error.
+
+2001-07-24
+
+       * added English Sylpheed User's Manual by Paul Kater
+         (paul@nlpagan.net) (thanks!).
+       * configure.in
+         manual/Makefile.am
+         src/mainwindow.c: added support for English manual.
+       * manual/en/sylpheed*.html: added English documentation.
+       * AUTHORS: updated.
+
+2001-07-23
+
+       * src/nntp.c: nntp_ok(): fixed the bug that didn't handle a response
+         that didn't have any trailing messages.
+       * src/smtp.c: smtp_ok(): ditto.
+       * src/compose.c: compose_account_option_menu_create(): modified
+         the style of the account option menu.
+
+2001-07-22
+
+       * src/prefs_customheader.c: prefs_custom_header_clist_set_row():
+         remove return code from strings automatically.
+         prefs_custom_header_create(): added "X-Face" to the default
+         option.
+       * src/news.c: news_fetch_msg(), news_get_group_list()
+         src/imap.c: imap_fetch_msg(): create the cache directory before
+         writing.
+       * src/procmime.c:
+         procmime_scan_content_type()
+         procmime_scan_content_disposition(): convert JIS into EUC-JP
+         before parsing.
+       * src/codeconv.c: conv_unmime_header(): cleaned up a bit.
+       * src/compose.c: don't append attachment headers if the attach
+         pane is visible but the list is empty.
+       * src/recv.c: recv_bytes_write(): use g_malloc() instead of alloca().
+
+2001-07-18
+
+       * version 0.5.1
+
+2001-07-18
+
+       * src/compose.c: compose_quote_parse_fmt()
+         src/prefs_common.c: prefs_quote_description_create(): added the
+         symbol `%c' that allows to include Cc in reply format (thanks
+         to Cyril Bellot).
+       * src/base64.[ch]
+         src/procmime.c: procmime_decode_content(): applied the patch
+         from Sergey Vlasov that allows to decode base64 data with
+         unusual line length (not a multiple of 4) (thanks!).
+
 2001-07-17
 
        * src/procmsg.[ch]: separated the permanent flags and temporary
index 5775946..7bce956 100644 (file)
@@ -1,3 +1,10 @@
+2001-07-25 [alfons]
+
+       * configure.in
+               Sylpheed 0.5.1claws1
+
+       * sync with Sylpheed 0.5.1cvs1-3
+
 2001-07-24 [alfons]
 
        Release Sylpheed 0.5.1claws
index 8a6cf8f..6427c4f 100644 (file)
@@ -1,3 +1,59 @@
+2001-07-25
+
+       * src/progressdialog.c: CList ¤ò¥¹¥¯¥í¡¼¥ë²Äǽ¤Ë¤·¤¿¡£
+       * src/inc.c: inc_start(): Ã×̿Ū¤Ç¤Ê¤¤¥¨¥é¡¼¤ÇÃæÃǤ·¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£
+
+2001-07-24
+
+       * Paul Kater ¤µ¤óºî¤Î±Ñ¸ìÈÇ Sylpheed User's Manual (paul@nlpagan.net)
+         ¤òÄɲÃ(thanks!)¡£
+       * configure.in
+         manual/Makefile.am
+         src/mainwindow.c: ±Ñ¸ìÈǥޥ˥奢¥ë¤ËÂбþ¡£
+       * manual/en/sylpheed*.html: ±Ñ¸ì¤Îʸ½ñ¤òÄɲá£
+       * AUTHORS: ¹¹¿·¡£
+
+2001-07-23
+
+       * src/nntp.c: nntp_ok(): ¸å¤Ë³¤¯¥á¥Ã¥»¡¼¥¸¤ò»ý¤¿¤Ê¤¤±þÅú¤ò½èÍý
+         ¤Ç¤­¤Ê¤¤¥Ð¥°¤ò½¤Àµ¡£
+       * src/smtp.c: smtp_ok(): Æ±¾å¡£
+       * src/compose.c: compose_account_option_menu_create(): ¥¢¥«¥¦¥ó¥È
+         ¥ª¥×¥·¥ç¥ó¥á¥Ë¥å¡¼¤Îɽ¼¨·Á¼°¤òÊѹ¹¡£
+
+2001-07-22
+
+       * src/prefs_customheader.c: prefs_custom_header_clist_set_row():
+         Ê¸»úÎ󤫤é²þ¹Ô¥³¡¼¥É¤ò¼«Æ°Åª¤Ë¼è¤ê½ü¤¯¤è¤¦¤Ë¤·¤¿¡£
+         prefs_custom_header_create(): ¥Ç¥Õ¥©¥ë¥È¤ÎÁªÂò»è¤Ë "X-Face" ¤ò
+         Äɲá£
+       * src/news.c: news_fetch_msg(), news_get_group_list()
+         src/imap.c: imap_fetch_msg(): ½ñ¤­¹þ¤ß¤ÎÁ°¤Ë¥­¥ã¥Ã¥·¥å¥Ç¥£¥ì¥¯¥È¥ê
+         ¤òºîÀ®¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+       * src/procmime.c:
+         procmime_scan_content_type()
+         procmime_scan_content_disposition(): ¥Ñ¡¼¥¹Á°¤Ë JIS ¤ò EUC-JP
+         ¤ËÊÑ´¹¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+       * src/codeconv.c: conv_unmime_header(): ¾¯¤·¥³¡¼¥É¤òÀ°Íý¡£
+       * src/compose.c: ÅºÉÕ¥Ú¥¤¥ó¤¬É½¼¨¤µ¤ì¤Æ¤¤¤ë¤¬¥ê¥¹¥È¤¬¶õ¤Î¾ì¹ç¤Ï
+         ÅºÉեإåÀ¤òÉÕ¤±¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£
+       * src/recv.c: recv_bytes_write(): alloca() ¤ÎÂå¤ï¤ê¤Ë g_malloc()
+         ¤ò»ÈÍѤ¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
+2001-07-18
+
+       * version 0.5.1
+
+2001-07-18
+
+       * src/compose.c: compose_quote_parse_fmt()
+         src/prefs_common.c: prefs_quote_description_create(): Cc ¤ò
+         ÊÖ¿®¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë´Þ¤á¤ëµ­¹æ `%c' ¤òÄɲÃ(Cyril Bellot ¤µ¤ó thanks)¡£
+       * src/base64.[ch]
+         src/procmime.c: procmime_decode_content(): Ä̾ï¤Î¹ÔĹ(4¤ÎÇÜ¿ô)¤Ç¤Ï
+         ¤Ê¤¤ base64 ¥Ç¡¼¥¿¤ò¥Ç¥³¡¼¥É¤Ç¤­¤ë¤è¤¦¤Ë¤¹¤ë Sergey Vlasov ¤µ¤ó
+         ¤«¤é¤Î¥Ñ¥Ã¥Á¤òŬÍÑ(thanks!)¡£
+
 2001-07-17
 
        * src/procmsg.[ch]: ±Ê³¥Õ¥é¥°¤È°ì»þ¥Õ¥é¥°¤ò2¤Ä¤ÎÊÑ¿ô¤ËʬΥ¤·¡¢
diff --git a/INSTALL b/INSTALL
index a5ee42d..a150d81 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -45,6 +45,7 @@ o SuSE Linux 6.3 (glibc 2.1.2)
 o SuSE Linux 6.4
 o SuSE Linux 7.0
 o SuSE Linux 7.1
+o SuSE Linux 7.2
 o OpenLinux 2.3 (glibc 2.1.1 -> 2.1.3)
 o Caldera OpenDesktop 2.4
 o Conectiva Linux 4.0
@@ -71,6 +72,7 @@ o IRIX 6.3
 o IRIX 6.5 6.5.8m
 o HP-UX 10.20
 o Tru64 Unix 5.0 (OSF1 V5.0)
+o SCO UnixWare 7
 o Mac OS X (Darwin 1.3) + Xtools (has locale problem)
 o Windows (cygwin + GTK+ for win32) (unstable)
 
index 247eec4..9ab87e8 100644 (file)
@@ -44,6 +44,7 @@ o SuSE Linux 6.3 (glibc 2.1.2)
 o SuSE Linux 6.4
 o SuSE Linux 7.0
 o SuSE Linux 7.1
+o SuSE Linux 7.2
 o OpenLinux 2.3 (glibc 2.1.1 -> 2.1.3)
 o Caldera OpenDesktop 2.4
 o Conectiva Linux 4.0
@@ -70,6 +71,7 @@ o IRIX 6.3
 o IRIX 6.5 6.5.8m
 o HP-UX 10.20
 o Tru64 Unix 5.0 (OSF1 V5.0)
+o SCO UnixWare 7
 o Mac OS X (Darwin 1.3) + Xtools (locale ¤ËÌäÂꤢ¤ê)
 o Windows (cygwin + GTK+ for win32) (unstable)
 
index a649193..ab98460 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=5
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws
+EXTRA_VERSION=claws1
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index cdff105..6b1c7b9 100644 (file)
@@ -1 +1 @@
-SUBDIRS = ja en
+SUBDIRS = en ja
index 9c25e0e..d963d35 100644 (file)
@@ -725,7 +725,7 @@ void conv_unmime_header_overwrite(gchar *str)
                gchar *tmp;
                gint len;
 
-               Xstrdup_a(buf, str, {return;});
+               Xstrdup_a(buf, str, return);
                outlen = strlen(str) + 1;
                UnMimeHeader(buf);
                len = strlen(buf) * 2 + 1;
@@ -743,33 +743,23 @@ void conv_unmime_header(gchar *outbuf, gint outlen, const gchar *str,
        gchar *buf;
        CharSet cur_charset;
 
-       Xstrdup_a(buf, str, return);
        cur_charset = conv_get_current_charset();
+       Xstrdup_a(buf, str, return);
 
 #if HAVE_LIBJCONV
        UnMimeHeaderConv(buf, outbuf, outlen);
-       if (cur_charset == C_EUC_JP) {
-               gchar *tmp;
-               gint len;
-
-               len = strlen(outbuf) * 2 + 1;
-               Xalloca(tmp, len, return);
-               conv_jistodisp(tmp, len, outbuf);
-               strncpy2(outbuf, tmp, outlen);
-       }
 #else
        UnMimeHeader(buf);
+       strncpy2(outbuf, buf, outlen);
+#endif
        if (cur_charset == C_EUC_JP) {
-               gchar *tmp;
                gint len;
 
-               len = strlen(buf) * 2 + 1;
-               Xalloca(tmp, len, {strncpy2(outbuf, buf, outlen); return;});
-               conv_jistodisp(tmp, len, buf);
-               strncpy2(outbuf, tmp, outlen);
-       } else
+               len = strlen(outbuf) * 2 + 1;
+               Xalloca(buf, len, return);
+               conv_jistodisp(buf, len, outbuf);
                strncpy2(outbuf, buf, outlen);
-#endif
+       }
 }
 
 #define MAX_ENCLEN     75
index f3afaea..de39733 100644 (file)
@@ -1432,6 +1432,10 @@ static gchar *compose_quote_parse_fmt(Compose *compose, MsgInfo *msginfo,
                                str = msginfo->to;
                                sp++;
                                break;
+                       case 'c':
+                               str = msginfo->cc;
+                               sp++;
+                               break;
                        case 'i':
                                if (!msginfo->msgid) {sp++; break;}
                                Xalloca(str, strlen(msginfo->msgid) + 3,
@@ -3435,8 +3439,8 @@ static GtkWidget *compose_account_option_menu_create(Compose *compose)
 
                if (ac == compose->account) def_menu = num;
 
-               name = g_strdup_printf("%s <%s> (%s)",
-                                      ac->name, ac->address, ac->account_name);
+               name = g_strdup_printf("%s: %s <%s>",
+                                      ac->account_name, ac->name, ac->address);
                MENUITEM_ADD(menu, menuitem, name, ac);
                g_free(name);
                gtk_signal_connect(GTK_OBJECT(menuitem), "activate",
index 3daad45..02b99ad 100644 (file)
@@ -431,6 +431,8 @@ gchar *imap_fetch_msg(Folder *folder, FolderItem *item, gint uid)
        g_return_val_if_fail(item != NULL, NULL);
 
        path = folder_item_get_path(item);
+       if (!is_dir_exist(path))
+               make_dir_hier(path);
        filename = g_strconcat(path, G_DIR_SEPARATOR_S, itos(uid), NULL);
        g_free(path);
  
index 84da83e..8988d86 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -394,6 +394,7 @@ static void inc_start(IncProgressDialog *inc_dialog)
        Pop3State *pop3_state;
        IncState inc_state;
        gint num = 0;
+       gint error_num = 0;
 
        while (inc_dialog->queue_list != NULL) {
                session = inc_dialog->queue_list->data;
@@ -484,7 +485,8 @@ static void inc_start(IncProgressDialog *inc_dialog)
 
                if (inc_state != INC_SUCCESS) {
                        inc_put_error(inc_state);
-                       break;
+                       error_num++;
+                       if (inc_state == INC_NOSPACE) break;
                }
 
                inc_session_destroy(session);
@@ -494,6 +496,9 @@ static void inc_start(IncProgressDialog *inc_dialog)
                num++;
        }
 
+       if (error_num)
+               alertpanel_error(_("Some errors occured while getting mail."));
+
        while (inc_dialog->queue_list != NULL) {
                session = inc_dialog->queue_list->data;
                inc_session_destroy(session);
index b7ccd1c..765fd48 100644 (file)
@@ -776,7 +776,6 @@ MainWindow *main_window_create(SeparateType type)
        */
        main_window_set_thread_option(mainwin);
 
-       /* menu_set_sensitive(ifactory, "/Help/Manual/English", FALSE); */
 
        /* set account selection menu */
        ac_menu = gtk_item_factory_get_widget
@@ -800,17 +799,6 @@ MainWindow *main_window_create(SeparateType type)
        header_window_init(mainwin->headerwin);
        log_window_init(mainwin->logwin);
 
-       {
-               GtkStyle *newstyle;
-
-               gtk_widget_ensure_style(folderview->ctree);
-               newstyle = gtk_widget_get_style(folderview->ctree);
-               newstyle = gtk_style_copy(newstyle);
-               gtk_widget_set_style(summaryview->ctree, newstyle);
-               gtk_widget_ensure_style(summaryview->ctree);
-               gtk_widget_realize(summaryview->ctree);
-       }
-
        mainwin->cursor_count = 0;
 
        if (!watch_cursor)
index 77db067..a3a8208 100644 (file)
@@ -250,7 +250,6 @@ gchar *news_fetch_msg(Folder *folder, FolderItem *item, gint num)
        path = folder_item_get_path(item);
        if (!is_dir_exist(path))
                make_dir_hier(path);
-
        filename = g_strconcat(path, G_DIR_SEPARATOR_S, itos(num), NULL);
        g_free(path);
 
@@ -302,6 +301,8 @@ GSList *news_get_group_list(Folder *folder)
        g_return_val_if_fail(folder->type == F_NEWS, NULL);
 
        path = folder_item_get_path(FOLDER_ITEM(folder->node->data));
+       if (!is_dir_exist(path))
+               make_dir_hier(path);
        filename = g_strconcat(path, G_DIR_SEPARATOR_S, NEWSGROUP_LIST, NULL);
        g_free(path);
 
@@ -741,8 +742,6 @@ static void news_delete_all_articles(FolderItem *item)
        debug_print(_("\tDeleting all cached articles... "));
 
        dir = folder_item_get_path(item);
-       if (!is_dir_exist(dir))
-               make_dir_hier(dir);
        remove_all_numbered_files(dir);
        g_free(dir);
 
index 5f4fccc..458ffe7 100644 (file)
@@ -269,19 +269,19 @@ gint nntp_ok(NNTPSockInfo *sock, gchar *argbuf)
        gchar buf[NNTPBUFSIZE];
 
        if ((ok = nntp_gen_recv(sock, buf, sizeof(buf))) == NN_SUCCESS) {
-               if (strlen(buf) < 4)
+               if (strlen(buf) < 3)
                        return NN_ERROR;
 
                if ((buf[0] == '1' || buf[0] == '2' || buf[0] == '3') &&
-                   buf[3] == ' ') {
+                   (buf[3] == ' ' || buf[3] == '\0')) {
                        if (argbuf)
                                strcpy(argbuf, buf);
 
-                       if (!strncmp(buf, "381 ", 4))
+                       if (!strncmp(buf, "381", 3))
                                return NN_AUTHCONT;
 
                        return NN_SUCCESS;
-               } else if (!strncmp(buf, "480 ", 4))
+               } else if (!strncmp(buf, "480", 3))
                        return NN_AUTHREQ;
                else
                        return NN_ERROR;
index 79493bf..0bd7d89 100644 (file)
--- a/src/pop.c
+++ b/src/pop.c
@@ -95,7 +95,7 @@ gint pop3_getauth_pass_recv(SockInfo *sock, gpointer data)
        if (pop3_ok(sock, NULL) == PS_SUCCESS)
                return POP3_GETRANGE_STAT_SEND;
        else {
-               log_warning(_("error occurred on authorization\n"));
+               log_warning(_("error occurred on authentication\n"));
                state->error_val = PS_AUTHFAIL;
                return -1;
        }
@@ -142,7 +142,7 @@ gint pop3_getauth_apop_recv(SockInfo *sock, gpointer data)
        if (pop3_ok(sock, NULL) == PS_SUCCESS)
                return POP3_GETRANGE_STAT_SEND;
        else {
-               log_warning(_("error occurred on authorization\n"));
+               log_warning(_("error occurred on authentication\n"));
                state->error_val = PS_AUTHFAIL;
                return -1;
        }
index d6ee3db..dcd362a 100644 (file)
@@ -54,7 +54,7 @@ static struct CustomHdr {
 
        GtkWidget *hdr_combo;
        GtkWidget *hdr_entry;
-       GtkWidget *key_entry;
+       GtkWidget *val_entry;
        GtkWidget *customhdr_clist;
 } customhdr;
 
@@ -99,9 +99,6 @@ static PrefsAccount *cur_ac = NULL;
 
 void prefs_custom_header_open(PrefsAccount *ac)
 {
-       if (prefs_rc_is_readonly(CUSTOM_HEADER_RC))
-               return;
-
        if (!customhdr.window) {
                prefs_custom_header_create();
        }
@@ -131,8 +128,8 @@ static void prefs_custom_header_create(void)
        GtkWidget *table1;
        GtkWidget *hdr_label;
        GtkWidget *hdr_combo;
-       GtkWidget *key_label;
-       GtkWidget *key_entry;
+       GtkWidget *val_label;
+       GtkWidget *val_entry;
 
        GtkWidget *reg_hbox;
        GtkWidget *btn_hbox;
@@ -210,20 +207,22 @@ static void prefs_custom_header_create(void)
                          0, 0, 0);
        gtk_widget_set_usize (hdr_combo, 150, -1);
        gtkut_combo_set_items (GTK_COMBO (hdr_combo),
-                              "User-Agent", "X-Operating-System", NULL);
+                              "User-Agent", "X-Face", "X-Operating-System",
+                              NULL);
 
-       key_label = gtk_label_new (_("Value"));
-       gtk_widget_show (key_label);
-       gtk_table_attach (GTK_TABLE (table1), key_label, 1, 2, 0, 1,
+       val_label = gtk_label_new (_("Value"));
+       gtk_widget_show (val_label);
+       gtk_table_attach (GTK_TABLE (table1), val_label, 1, 2, 0, 1,
                          GTK_EXPAND | GTK_SHRINK | GTK_FILL,
                          0, 0, 0);
-       gtk_misc_set_alignment (GTK_MISC (key_label), 0, 0.5);
+       gtk_misc_set_alignment (GTK_MISC (val_label), 0, 0.5);
        
-       key_entry = gtk_entry_new ();
-       gtk_widget_show (key_entry);
-       gtk_table_attach (GTK_TABLE (table1), key_entry, 1, 2, 1, 2,
+       val_entry = gtk_entry_new ();
+       gtk_widget_show (val_entry);
+       gtk_table_attach (GTK_TABLE (table1), val_entry, 1, 2, 1, 2,
                          GTK_EXPAND | GTK_SHRINK | GTK_FILL,
                          0, 0, 0);
+       gtk_widget_set_usize (val_entry, 200, -1);
 
        /* add / delete */
 
@@ -260,7 +259,7 @@ static void prefs_custom_header_create(void)
        gtk_box_pack_start (GTK_BOX (vbox1), ch_hbox, TRUE, TRUE, 0);
 
        ch_scrolledwin = gtk_scrolled_window_new (NULL, NULL);
-       gtk_widget_set_usize (ch_scrolledwin, -1, 150);
+       gtk_widget_set_usize (ch_scrolledwin, -1, 200);
        gtk_widget_show (ch_scrolledwin);
        gtk_box_pack_start (GTK_BOX (ch_hbox), ch_scrolledwin, TRUE, TRUE, 0);
        gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (ch_scrolledwin),
@@ -308,7 +307,7 @@ static void prefs_custom_header_create(void)
 
        customhdr.hdr_combo  = hdr_combo;
        customhdr.hdr_entry  = GTK_COMBO (hdr_combo)->entry;
-       customhdr.key_entry  = key_entry;
+       customhdr.val_entry  = val_entry;
 
        customhdr.customhdr_clist   = customhdr_clist;
 }
@@ -499,10 +498,13 @@ static gint prefs_custom_header_clist_set_row(PrefsAccount *ac, gint row)
        ch->account_id = ac->account_id;
 
        ch->name = g_strdup(entry_text);
+       unfold_line(ch->name);
 
-       entry_text = gtk_entry_get_text(GTK_ENTRY(customhdr.key_entry));
-       if (entry_text[0] != '\0')
+       entry_text = gtk_entry_get_text(GTK_ENTRY(customhdr.val_entry));
+       if (entry_text[0] != '\0') {
                ch->value = g_strdup(entry_text);
+               unfold_line(ch->value);
+       }
 
        ch_str[0] = g_strdup_printf("%s: %s", ch->name,
                                    ch->value ? ch->value : "");
@@ -589,7 +591,7 @@ static void prefs_custom_header_select(GtkCList *clist, gint row, gint column,
        if (!ch) ch = &default_ch;
 
        ENTRY_SET_TEXT(customhdr.hdr_entry, ch->name);
-       ENTRY_SET_TEXT(customhdr.key_entry, ch->value);
+       ENTRY_SET_TEXT(customhdr.val_entry, ch->value);
 }
 
 #undef ENTRY_SET_TEXT
index 3ae9567..7c9da47 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999,2000 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2001 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -275,8 +275,7 @@ void procmime_scan_encoding(MimeInfo *mimeinfo, const gchar *encoding)
 {
        gchar *buf;
 
-       Xalloca(buf, strlen(encoding) + 1, return);
-       strcpy(buf, encoding);
+       Xstrdup_a(buf, encoding, return);
 
        g_free(mimeinfo->encoding);
 
@@ -301,8 +300,14 @@ void procmime_scan_content_type(MimeInfo *mimeinfo, const gchar *content_type)
        gchar *delim, *p, *cnttype;
        gchar *buf;
 
-       Xalloca(buf, strlen(content_type) + 1, return);
-       strcpy(buf, content_type);
+       if (conv_get_current_charset() == C_EUC_JP &&
+           strchr(content_type, '\007')) {
+               gint len;
+               len = strlen(content_type) * 2 + 1;
+               Xalloca(buf, len, return);
+               conv_jistoeuc(buf, len, content_type);
+       } else
+               Xstrdup_a(buf, content_type, return);
 
        g_free(mimeinfo->content_type);
        g_free(mimeinfo->charset);
@@ -390,8 +395,14 @@ void procmime_scan_content_disposition(MimeInfo *mimeinfo,
        gchar *delim, *p, *dispos;
        gchar *buf;
 
-       Xalloca(buf, strlen(content_disposition) + 1, return);
-       strcpy(buf, content_disposition);
+       if (conv_get_current_charset() == C_EUC_JP &&
+           strchr(content_disposition, '\007')) {
+               gint len;
+               len = strlen(content_disposition) * 2 + 1;
+               Xalloca(buf, len, return);
+               conv_jistoeuc(buf, len, content_disposition);
+       } else
+               Xstrdup_a(buf, content_disposition, return);
 
        if ((delim = strchr(buf, ';'))) *delim = '\0';
        mimeinfo->content_disposition = dispos = g_strdup(g_strstrip(buf));
index 3d6067b..0b333b7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999,2000 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2001 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 8a749ee..b2bc0f3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999,2000 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2001 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #endif
 
 #include <glib.h>
-#include <gtk/gtk.h>
 #include <gtk/gtkwindow.h>
 #include <gtk/gtkvbox.h>
 #include <gtk/gtkhbox.h>
 #include <gtk/gtklabel.h>
 #include <gtk/gtkprogressbar.h>
+#include <gtk/gtkscrolledwindow.h>
 #include <gtk/gtkbutton.h>
 
 #include "intl.h"
@@ -67,7 +67,7 @@ ProgressDialog *progress_dialog_create(void)
        gtk_widget_show(vbox);
 
        hbox = gtk_hbox_new(FALSE, 0);
-       gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 8);
+       gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 8);
        gtk_widget_show(hbox);
 
        label = gtk_label_new("");
@@ -84,12 +84,12 @@ ProgressDialog *progress_dialog_create(void)
        gtk_box_pack_start(GTK_BOX(vbox), progressbar, FALSE, FALSE, 0);
        gtk_widget_show(progressbar);
 
-       scrolledwin = gtk_scrolled_window_new (NULL, NULL);
-       gtk_widget_show (scrolledwin);
-       gtk_box_pack_start (GTK_BOX (vbox), scrolledwin, TRUE, TRUE, 0);
-       gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwin),
-                                       GTK_POLICY_AUTOMATIC,
-                                       GTK_POLICY_AUTOMATIC);
+       scrolledwin = gtk_scrolled_window_new(NULL, NULL);
+       gtk_widget_show(scrolledwin);
+       gtk_box_pack_start(GTK_BOX(vbox), scrolledwin, TRUE, TRUE, 0);
+       gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin),
+                                      GTK_POLICY_AUTOMATIC,
+                                      GTK_POLICY_AUTOMATIC);
 
        clist = gtk_clist_new_with_titles(3, text);
        gtk_widget_show(clist);
index eac5804..8be500a 100644 (file)
@@ -165,14 +165,16 @@ gint recv_bytes_write(SockInfo *sock, glong size, FILE *fp)
        glong count = 0;
        gchar *prev, *cur;
 
-       Xalloca(buf, size, return -1);
+       buf = g_malloc(size);
 
        do {
                gint read_count;
 
                read_count = sock_read(sock, buf + count, size - count);
-               if (read_count < 0)
+               if (read_count < 0) {
+                       g_free(buf);
                        return -1;
+               }
                count += read_count;
        } while (count < size);
 
@@ -187,6 +189,7 @@ gint recv_bytes_write(SockInfo *sock, glong size, FILE *fp)
                    fwrite("\n", sizeof(gchar), 1, fp) == EOF) {
                        perror("fwrite");
                        g_warning(_("Can't write to file.\n"));
+                       g_free(buf);
                        return -1;
                }
 
@@ -202,9 +205,11 @@ gint recv_bytes_write(SockInfo *sock, glong size, FILE *fp)
                                        size - (prev - buf), fp) == EOF) {
                perror("fwrite");
                g_warning(_("Can't write to file.\n"));
+               g_free(buf);
                return -1;
        }
 
+       g_free(buf);
        return 0;
 }
 
index b5888b2..9591755 100644 (file)
@@ -145,7 +145,8 @@ gint smtp_ok(SockInfo *sock)
                        log_print("SMTP< %s\n", smtp_response);
 
                if ((smtp_response[0] == '1' || smtp_response[0] == '2' ||
-                    smtp_response[0] == '3') && smtp_response[3] == ' ')
+                    smtp_response[0] == '3') &&
+                    (smtp_response[3] == ' ' || smtp_response[3] == '\0'))
                        return SM_OK;
                else if (smtp_response[3] != '-')
                        return SM_ERROR;