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 233faf86d15bddd7f151f9684373612ae09eae7b..fd10dc03ab2c3216bef45aeaa336ab5c5b4527d1 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 a658f71eaadf9573bacd49af1f3ac494a7c8892f..aec9b79c1a7422e4a257f03fefa7e61f59f8714a 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 25da8d8758e9ac2e30bf7f62a4e3963fbee31a9c..0e660d5f0c6b62d805382692c18080729d713e61 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 49299827eaa07dc2d65e41006269455fb167f478..f7850baf4523fa3fb8ce1bc8fdce616188038b59 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 b419028437ffee258024f0662dd0a8442b94333c..7d027e5c1bc8ca03d90d2d448cc42b1c1c69f2b9 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 4d4a0a1b4fdef152864950b72a85689fe3fdc779..3d7fd9eec0c419f51ccb11f0723f0cfd9b33c122 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 0fe95e2f274adcf0bfe77b96d301e6d9cbbff69f..0f38b348ae7462d078084c06d71d0293c4cbf591 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 9f6ee3e153d99169271e884b306eb2f2ed516559..6f04f9a47d4b0a5218c587cb75693acd99f3792d 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 2d484d0a82afc8c6713b67dae7642a76b7394aed..3c97a57933a367a2bd9b96759a2716ac73d2269e 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 565ace76f4be8eeab079f11ac5e1914831135ea7..240e04045fb5b988eb33164fc193b04941d36188 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)