sync with Hiroyuki's 0.5.0cvs4
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Mon, 16 Jul 2001 18:18:53 +0000 (18:18 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Mon, 16 Jul 2001 18:18:53 +0000 (18:18 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
TODO
TODO.jp
src/codeconv.c
src/folder.c
src/grouplistdialog.c
src/inc.c

index 0bbf504..56217a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2001-07-16
+
+       * src/inc.c: inc_pop3_recv_func(), inc_progress_update():
+         display current size with human-readable format.
+       * src/grouplistdialog.c: grouplist_recv_func(): ditto.
+       * TODO
+         TODO.jp: updated.
+
+2001-07-16
+
+       * src/codeconv.c:
+         conv_unmime_header(), conv_unmime_header_overwrite(): workaround
+         for raw-JIS code in header fields.
+       * src/folder.c:
+         folder_get_default_folder()
+         folder_get_default_inbox()
+         folder_get_default_outbox()
+         folder_get_default_draft()
+         folder_get_default_queue()
+         folder_get_default_trash(): fixed a bug that caused segfault
+         if folder_list is NULL.
+
 2001-07-15
 
        * README
index cee69e0..f5928b7 100644 (file)
@@ -1,3 +1,7 @@
+2001-07-16 [alfons]
+
+       sync with Hiroyuki's 0.5.0cvs4
+
 2001-07-16 [alfons]
 
        0.5.1claws3
index 9bbc26d..ae1cb58 100644 (file)
@@ -1,3 +1,25 @@
+2001-07-16
+
+       * src/inc.c: inc_pop3_recv_func(), inc_progress_update():
+         ¸½ºß¤Î¥µ¥¤¥º¤ò¿Í´Ö¤¬Æɤߤ䤹¤¤·Á¼°¤Çɽ¼¨¡£
+       * src/grouplistdialog.c: grouplist_recv_func(): Æ±¾å¡£
+       * TODO
+         TODO.jp: ¹¹¿·¡£
+
+2001-07-16
+
+       * src/codeconv.c:
+         conv_unmime_header(), conv_unmime_header_overwrite(): ¥Ø¥Ã¥À
+         ¥Õ¥£¡¼¥ë¥É¤ÎÀ¸ JIS ¥³¡¼¥É¤ËÂФ¹¤ëÂн衣
+       * src/folder.c:
+         folder_get_default_folder()
+         folder_get_default_inbox()
+         folder_get_default_outbox()
+         folder_get_default_draft()
+         folder_get_default_queue()
+         folder_get_default_trash(): folder_list ¤¬ NULL ¤Î¤È¤­¤Ë segfault
+         ¤òµ¯¤³¤¹¥Ð¥°¤ò½¤Àµ¡£
+
 2001-07-15
 
        * README
diff --git a/TODO b/TODO
index b3790c5..5edd9d5 100644 (file)
--- a/TODO
+++ b/TODO
@@ -16,6 +16,8 @@ o priority (Priority:, X-Priority:, X-MSMail-Priority:)
 o notification of reception (Disposition-Notification-To:)
 o customization of key bindings
 o customization of toolbar
+o configuration for each folders
+o RFC 2231 (MIME filename encoding) compliant
 o virtual folder
 o SSL support
 o GNOME support
diff --git a/TODO.jp b/TODO.jp
index c2d8adc..bc25168 100644 (file)
--- a/TODO.jp
+++ b/TODO.jp
@@ -16,6 +16,8 @@ o 
 o ¼õ¿®³Îǧ (Disposition-Notification-To:)
 o ¥­¡¼¥Ð¥¤¥ó¥É¤Î¥«¥¹¥¿¥Þ¥¤¥º
 o ¥Ä¡¼¥ë¥Ð¡¼¤Î¥«¥¹¥¿¥Þ¥¤¥º
+o ¥Õ¥©¥ë¥ÀËè¤ÎÀßÄê
+o RFC 2231 (MIME ¥Õ¥¡¥¤¥ë̾¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°) Âбþ
 o ²¾ÁÛ¥Õ¥©¥ë¥À
 o SSLÂбþ
 o GNOMEÂбþ
index 45b5a09..9c25e0e 100644 (file)
@@ -708,11 +708,18 @@ void conv_unmime_header_overwrite(gchar *str)
        cur_charset = conv_get_current_charset();
 
 #if HAVE_LIBJCONV
-       Xstrdup_a(buf, str, {return;});
+       Xstrdup_a(buf, str, return);
        outlen = strlen(str) + 1;
        UnMimeHeaderConv(buf, str, outlen);
-       if (cur_charset == C_EUC_JP)
-               conv_unreadable_eucjp(str);
+       if (cur_charset == C_EUC_JP) {
+               gchar *tmp;
+               gint len;
+
+               len = strlen(str) * 2 + 1;
+               Xalloca(tmp, len, return);
+               conv_jistodisp(tmp, len, str);
+               strncpy2(str, tmp, outlen);
+       }
 #else
        if (cur_charset == C_EUC_JP) {
                gchar *tmp;
@@ -736,13 +743,20 @@ void conv_unmime_header(gchar *outbuf, gint outlen, const gchar *str,
        gchar *buf;
        CharSet cur_charset;
 
-       Xstrdup_a(buf, str, {return;});
+       Xstrdup_a(buf, str, return);
        cur_charset = conv_get_current_charset();
 
 #if HAVE_LIBJCONV
        UnMimeHeaderConv(buf, outbuf, outlen);
-       if (cur_charset == C_EUC_JP)
-               conv_unreadable_eucjp(outbuf);
+       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);
        if (cur_charset == C_EUC_JP) {
index 8f07067..85f07c2 100644 (file)
@@ -400,13 +400,14 @@ FolderItem *folder_find_item_from_path(const gchar *path)
 
 Folder *folder_get_default_folder(void)
 {
-       return FOLDER(folder_list->data);
+       return folder_list ? FOLDER(folder_list->data) : NULL;
 }
 
 FolderItem *folder_get_default_inbox(void)
 {
        Folder *folder;
 
+       if (!folder_list) return NULL;
        folder = FOLDER(folder_list->data);
        g_return_val_if_fail(folder != NULL, NULL);
        return folder->inbox;
@@ -416,6 +417,7 @@ FolderItem *folder_get_default_outbox(void)
 {
        Folder *folder;
 
+       if (!folder_list) return NULL;
        folder = FOLDER(folder_list->data);
        g_return_val_if_fail(folder != NULL, NULL);
        return folder->outbox;
@@ -425,6 +427,7 @@ FolderItem *folder_get_default_draft(void)
 {
        Folder *folder;
 
+       if (!folder_list) return NULL;
        folder = FOLDER(folder_list->data);
        g_return_val_if_fail(folder != NULL, NULL);
        return folder->draft;
@@ -434,6 +437,7 @@ FolderItem *folder_get_default_queue(void)
 {
        Folder *folder;
 
+       if (!folder_list) return NULL;
        folder = FOLDER(folder_list->data);
        g_return_val_if_fail(folder != NULL, NULL);
        return folder->queue;
@@ -443,6 +447,7 @@ FolderItem *folder_get_default_trash(void)
 {
        Folder *folder;
 
+       if (!folder_list) return NULL;
        folder = FOLDER(folder_list->data);
        g_return_val_if_fail(folder != NULL, NULL);
        return folder->trash;
index 4e8ac5a..d608853 100644 (file)
@@ -257,8 +257,8 @@ static void grouplist_recv_func(SockInfo *sock, gint count, gint read_bytes,
        gchar buf[BUFFSIZE];
 
        g_snprintf(buf, sizeof(buf),
-                  _("%d newsgroups received (%d bytes read)"),
-                  count, read_bytes);
+                  _("%d newsgroups received (%s read)"),
+                  count, to_human_readable(read_bytes));
        gtk_label_set_text(GTK_LABEL(status_label), buf);
        GTK_EVENTS_FLUSH();
 }
index 85791ab..5b46361 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -797,15 +797,17 @@ static void inc_pop3_recv_func(SockInfo *sock, gint count, gint read_bytes,
        IncProgressDialog *inc_dialog = session->data;
        ProgressDialog *dialog = inc_dialog->dialog;
        gint cur_total;
+       gchar *total_size;
 
        cur_total = state->cur_total_bytes + read_bytes;
        if (cur_total > state->total_bytes)
                cur_total = state->total_bytes;
 
+       Xstrdup_a(total_size, to_human_readable(state->total_bytes), return);
        g_snprintf(buf, sizeof(buf),
-                  _("Retrieving message (%d / %d) (%d / %d bytes)"),
+                  _("Retrieving message (%d / %d) (%s / %s)"),
                   state->cur_msg, state->count,
-                  cur_total, state->total_bytes);
+                  to_human_readable(cur_total), total_size);
        progress_dialog_set_label(dialog, buf);
 
        progress_dialog_set_percentage
@@ -818,6 +820,7 @@ void inc_progress_update(Pop3State *state, Pop3Phase phase)
        gchar buf[MSGBUFSIZE];
        IncProgressDialog *inc_dialog = state->session->data;
        ProgressDialog *dialog = inc_dialog->dialog;
+       gchar *total_size;
 
        switch (phase) {
        case POP3_GREETING_RECV:
@@ -852,10 +855,16 @@ void inc_progress_update(Pop3State *state, Pop3Phase phase)
                break;
        case POP3_RETR_SEND:
        case POP3_RETR_RECV:
+               Xstrdup_a(total_size, to_human_readable(state->total_bytes), return);
                g_snprintf(buf, sizeof(buf),
-                          _("Retrieving message (%d / %d) (%d / %d bytes)"),
+                          _("Retrieving message (%d / %d) (%s / %s)"),
                           state->cur_msg, state->count,
-                          state->cur_total_bytes, state->total_bytes);
+                          to_human_readable(state->cur_total_bytes),
+                          total_size);
+               //g_snprintf(buf, sizeof(buf),
+               //         _("Retrieving message (%d / %d) (%d / %d bytes)"),
+               //         state->cur_msg, state->count,
+               //         state->cur_total_bytes, state->total_bytes);
                progress_dialog_set_label(dialog, buf);
                progress_dialog_set_percentage
                        (dialog,