sync with 0.8.10cvs2
authorPaul Mangan <paul@claws-mail.org>
Wed, 5 Feb 2003 09:23:13 +0000 (09:23 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 5 Feb 2003 09:23:13 +0000 (09:23 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
NEWS
configure.ac
src/codeconv.c
src/compose.c
src/gtk/gtkutils.c
src/gtk/gtkutils.h
src/summary_search.c

index 233faf8..fd10dc0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2003-02-05
+
+       * src/gtkutils.[ch]: gtkut_ctree_node_prev(): new.
+       * src/summary_search.c: summary_search_execute(): search collapsed
+         nodes, too.
+
+2003-02-05
+
+       * src/codeconv.c:
+         conv_unreadable_latin(): include 0x7f as an unreadable character.
+         conv_localetodisp(): don't remove 8bit characters by default.
+         conv_get_current_charset()
+         conv_get_outgoing_charset(): return ISO-8859-15 if "@euro" is
+         appended at the last of locale name.
+       * src/compose.c: compose_write_to_file(): show from and to encoding
+         when code conversion failed.
+
+2003-02-04
+
+       * version 0.8.10
+
 2003-02-04
 
        * src/procmsg.h: WRITE_CACHE_DATA(): little speed improvement
index a658f71..aec9b79 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-05 [paul]      0.8.9claws42
+
+       * sync with 0.8.10cvs2
+               see ChangeLog 2003-02-05
+
 2003-02-04 [colin]     0.8.9claws41
 
        * src/prefs_common.[ch]
index 25da8d8..0e660d5 100644 (file)
@@ -1,3 +1,24 @@
+2003-02-05
+
+       * src/gtkutils.[ch]: gtkut_ctree_node_prev(): ¿·µ¬¡£
+       * src/summary_search.c: summary_search_execute(): ÊĤ¸¤¿¥Î¡¼¥É¤â
+         ¸¡º÷¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
+2003-02-05
+
+       * src/codeconv.c:
+         conv_unreadable_latin(): 0x7f ¤òɽ¼¨ÉÔ²Äʸ»ú¤Ë´Þ¤á¤¿¡£
+         conv_localetodisp(): ¥Ç¥Õ¥©¥ë¥È¤Ç 8bit Ê¸»ú¤òºï½ü¤·¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£
+         conv_get_current_charset()
+         conv_get_outgoing_charset(): locale Ì¾¤ÎËöÈø¤Ë "@euro" ¤¬Äɲ䵤ì
+         ¤Æ¤¤¤ì¤Ð ISO-8859-15 ¤òÊÖ¤¹¤è¤¦¤Ë¤·¤¿¡£
+       * src/compose.c: compose_write_to_file(): ¥³¡¼¥ÉÊÑ´¹¤Ë¼ºÇÔ¤·¤¿¤È¤­
+         ÊÑ´¹¸µ¤ÈÊÑ´¹Àè¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤òɽ¼¨¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
+2003-02-04
+
+       * version 0.8.10
+
 2003-02-04
 
        * src/procmsg.h: WRITE_CACHE_DATA(): Â®ÅÙ¤ò¾¯¤·¸þ¾å(Colin Leroy
diff --git a/NEWS b/NEWS
index 4929982..f7850ba 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,11 @@
 Changes of Sylpheed
 
+* 0.8.10
+
+    * The validity check of EUC-JP code became more strict.
+    * The handling of strings which failed to be converted has been modified.
+    * Minor bugfixes and a speed improvement have been made.
+
 * 0.8.9
 
     * Transition from libjconv to direct use of iconv() API has been made.
index b419028..7d027e5 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=9
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws41
+EXTRA_VERSION=claws42
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 4d4a0a1..3d7fd9e 100644 (file)
@@ -456,7 +456,7 @@ void conv_unreadable_latin(gchar *str)
                /* convert CR+LF -> LF */
                if (*p == '\r' && *(p + 1) == '\n')
                        memmove(p, p + 1, strlen(p));
-               else if ((*p & 0xff) >= 0x80 && (*p & 0xff) <= 0x9f)
+               else if ((*p & 0xff) >= 0x7f && (*p & 0xff) <= 0x9f)
                        *p = SUBST_CHAR;
                p++;
        }
@@ -633,7 +633,6 @@ void conv_localetodisp(gchar *outbuf, gint outlen, const gchar *inbuf)
                conv_unreadable_eucjp(outbuf);
                break;
        default:
-               conv_unreadable_8bit(outbuf);
                break;
        }
 }
@@ -991,6 +990,7 @@ CharSet conv_get_current_charset(void)
 {
        static CharSet cur_charset = -1;
        const gchar *cur_locale;
+       const gchar *p;
        gint i;
 
        if (cur_charset != -1)
@@ -1007,6 +1007,11 @@ CharSet conv_get_current_charset(void)
                return cur_charset;
        }
 
+       if ((p = strcasestr(cur_locale, "@euro")) && p[5] == '\0') {
+               cur_charset = C_ISO_8859_15;
+               return cur_charset;
+       }
+
        for (i = 0; i < sizeof(locale_table) / sizeof(locale_table[0]); i++) {
                const gchar *p;
 
@@ -1037,13 +1042,14 @@ const gchar *conv_get_current_charset_str(void)
        if (!codeset)
                codeset = conv_get_charset_str(conv_get_current_charset());
 
-       return codeset ? codeset : "US-ASCII";
+       return codeset ? codeset : CS_US_ASCII;
 }
 
 CharSet conv_get_outgoing_charset(void)
 {
        static CharSet out_charset = -1;
        const gchar *cur_locale;
+       const gchar *p;
        gint i;
 
        if (out_charset != -1)
@@ -1055,6 +1061,11 @@ CharSet conv_get_outgoing_charset(void)
                return out_charset;
        }
 
+       if ((p = strcasestr(cur_locale, "@euro")) && p[5] == '\0') {
+               out_charset = C_ISO_8859_15;
+               return out_charset;
+       }
+
        for (i = 0; i < sizeof(locale_table) / sizeof(locale_table[0]); i++) {
                const gchar *p;
 
@@ -1100,7 +1111,7 @@ const gchar *conv_get_outgoing_charset_str(void)
        out_charset = conv_get_outgoing_charset();
        str = conv_get_charset_str(out_charset);
 
-       return str ? str : "US-ASCII";
+       return str ? str : CS_US_ASCII;
 }
 
 const gchar *conv_get_current_locale(void)
@@ -1205,11 +1216,11 @@ void conv_encode_header(gchar *dest, gint len, const gchar *src,
        }
 
        cur_encoding = conv_get_current_charset_str();
-       if (!strcmp(cur_encoding, "US-ASCII"))
-               cur_encoding = "ISO-8859-1";
+       if (!strcmp(cur_encoding, CS_US_ASCII))
+               cur_encoding = CS_ISO_8859_1;
        out_encoding = conv_get_outgoing_charset_str();
-       if (!strcmp(out_encoding, "US-ASCII"))
-               out_encoding = "ISO-8859-1";
+       if (!strcmp(out_encoding, CS_US_ASCII))
+               out_encoding = CS_ISO_8859_1;
 
        mimestr_len = strlen(MIMESEP_BEGIN) + strlen(out_encoding) +
                strlen(mimesep_enc) + strlen(MIMESEP_END);
index 0fe95e2..0f38b34 100644 (file)
@@ -3271,11 +3271,15 @@ static gint compose_write_to_file(Compose *compose, const gchar *file,
                buf = conv_codeset_strdup(chars, src_codeset, out_codeset);
                if (!buf) {
                        AlertValue aval;
+                       gchar *msg;
 
+                       msg = g_strdup_printf(_("Can't convert the character encoding of the message from\n"
+                                               "%s to %s.\n"
+                                               "Send it anyway?"), src_codeset, out_codeset);
                        aval = alertpanel
-                               (_("Error"),
-                                _("Can't convert the character encoding of the message.\n"
-                                  "Send it anyway?"), _("Yes"), _("+No"), NULL);
+                               (_("Error"), msg, _("Yes"), _("+No"), NULL);
+                       g_free(msg);
+
                        if (aval != G_ALERTDEFAULT) {
                                g_free(chars);
                                fclose(fp);
index 9f6ee3e..6f04f9a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2002 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2003 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
@@ -236,6 +236,28 @@ GtkCTreeNode *gtkut_ctree_node_next(GtkCTree *ctree, GtkCTreeNode *node)
        return NULL;
 }
 
+/* get the previous node, including the invisible one */
+GtkCTreeNode *gtkut_ctree_node_prev(GtkCTree *ctree, GtkCTreeNode *node)
+{
+       GtkCTreeNode *prev;
+       GtkCTreeNode *child;
+
+       if (!node) return NULL;
+
+       prev = GTK_CTREE_NODE_PREV(node);
+       if (prev == GTK_CTREE_ROW(node)->parent)
+               return prev;
+
+       child = prev;
+       while (GTK_CTREE_ROW(child)->children != NULL) {
+               child = GTK_CTREE_ROW(child)->children;
+               while (GTK_CTREE_ROW(child)->sibling != NULL)
+                       child = GTK_CTREE_ROW(child)->sibling;
+       }
+
+       return child;
+}
+
 gboolean gtkut_ctree_node_is_selected(GtkCTree *ctree, GtkCTreeNode *node)
 {
        GtkCList *clist = GTK_CLIST(ctree);
index 2d484d0..3c97a57 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2002 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2003 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
@@ -101,6 +101,8 @@ gint gtkut_ctree_get_nth_from_node  (GtkCTree       *ctree,
                                         GtkCTreeNode   *node);
 GtkCTreeNode *gtkut_ctree_node_next    (GtkCTree       *ctree,
                                         GtkCTreeNode   *node);
+GtkCTreeNode *gtkut_ctree_node_prev    (GtkCTree       *ctree,
+                                        GtkCTreeNode   *node);
 gboolean gtkut_ctree_node_is_selected  (GtkCTree       *ctree,
                                         GtkCTreeNode   *node);
 GtkCTreeNode *gtkut_ctree_find_collapsed_parent
index 565ace7..240e040 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2002 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2003 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
@@ -288,9 +288,11 @@ static void summary_search_execute(GtkButton *button, gpointer data)
                }
        } else {
                if (backward)
-                       node = GTK_CTREE_NODE_PREV(summaryview->selected);
+                       node = gtkut_ctree_node_prev
+                               (ctree, summaryview->selected);
                else
-                       node = GTK_CTREE_NODE_NEXT(summaryview->selected);
+                       node = gtkut_ctree_node_next
+                               (ctree, summaryview->selected);
        }
 
        if (*body_str)
@@ -395,8 +397,8 @@ static void summary_search_execute(GtkButton *button, gpointer data)
                        }
                }
 
-               node = backward ? GTK_CTREE_NODE_PREV(node)
-                               : GTK_CTREE_NODE_NEXT(node);
+               node = backward ? gtkut_ctree_node_prev(ctree, node)
+                               : gtkut_ctree_node_next(ctree, node);
        }
 
        if (*body_str)