2005-08-03 [paul] 1.9.13cvs10
authorPaul Mangan <paul@claws-mail.org>
Wed, 3 Aug 2005 08:31:53 +0000 (08:31 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 3 Aug 2005 08:31:53 +0000 (08:31 +0000)
sync with main

* src/addr_compl.c
* src/compose.c
* src/main.c
* src/pop.c
* src/prefs_account.c
* src/procmime.c
* src/procmsg.c
* src/quote_fmt_parse.y
* src/textview.c
* src/common/quoted-printable.c
* src/common/utils.c
* src/common/utils.h
* src/common/xml.c
replaced incorrect locale-independent
ctype functions with GLib's. Corrected
signedness mismatch.
* src/headerview.c
headerview_create(): added spacing for vbox.
* src/gtk/about.c
set focus to the OK button.

18 files changed:
ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/addr_compl.c
src/common/quoted-printable.c
src/common/utils.c
src/common/utils.h
src/common/xml.c
src/compose.c
src/gtk/about.c
src/headerview.c
src/main.c
src/pop.c
src/prefs_account.c
src/procmime.c
src/procmsg.c
src/quote_fmt_parse.y
src/textview.c

index 5ae2dcc764b43a42c47f4068242eda2080fc89fd..988b59001496886214b15e1e9d08058f1fb02577 100644 (file)
@@ -1,3 +1,28 @@
+2005-08-03 [paul]      1.9.13cvs10
+
+       sync with main
+
+       * src/addr_compl.c
+       * src/compose.c
+       * src/main.c
+       * src/pop.c
+       * src/prefs_account.c
+       * src/procmime.c
+       * src/procmsg.c
+       * src/quote_fmt_parse.y
+       * src/textview.c
+       * src/common/quoted-printable.c
+       * src/common/utils.c
+       * src/common/utils.h
+       * src/common/xml.c
+               replaced incorrect locale-independent
+               ctype functions with GLib's. Corrected
+               signedness mismatch.
+       * src/headerview.c
+               headerview_create(): added spacing for vbox.
+       * src/gtk/about.c
+               set focus to the OK button.
+
 2005-08-03 [colin]     1.9.13cvs9
 
        * src/folderview.c
index 945c134821e1bbe4c5d4d6933e5863590e42b808..3f0271e9a11e43f68d8b43d88c0b1308e8ce1046 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.87.2.13 -r 1.87.2.14 src/folder.h;  ) > 1.9.13cvs7.patchset
 ( cvs diff -u -r 1.60.2.21 -r 1.60.2.22 src/addressbook.c;  cvs diff -u -r 1.5.2.1 -r 1.5.2.2 src/addressitem.h;  cvs diff -u -r 1.274.2.47 -r 1.274.2.48 src/mainwindow.c;  ) > 1.9.13cvs8.patchset
 ( cvs diff -u -r 1.207.2.49 -r 1.207.2.50 src/folderview.c;  ) > 1.9.13cvs9.patchset
+( cvs diff -u -r 1.27.2.11 -r 1.27.2.12 src/addr_compl.c;  cvs diff -u -r 1.382.2.144 -r 1.382.2.145 src/compose.c;  cvs diff -u -r 1.8.2.7 -r 1.8.2.8 src/headerview.c;  cvs diff -u -r 1.115.2.47 -r 1.115.2.48 src/main.c;  cvs diff -u -r 1.56.2.36 -r 1.56.2.37 src/pop.c;  cvs diff -u -r 1.105.2.28 -r 1.105.2.29 src/prefs_account.c;  cvs diff -u -r 1.49.2.51 -r 1.49.2.52 src/procmime.c;  cvs diff -u -r 1.150.2.32 -r 1.150.2.33 src/procmsg.c;  cvs diff -u -r 1.22.2.10 -r 1.22.2.11 src/quote_fmt_parse.y;  cvs diff -u -r 1.96.2.66 -r 1.96.2.67 src/textview.c;  cvs diff -u -r 1.3.2.2 -r 1.3.2.3 src/common/quoted-printable.c;  cvs diff -u -r 1.36.2.37 -r 1.36.2.38 src/common/utils.c;  cvs diff -u -r 1.20.2.19 -r 1.20.2.20 src/common/utils.h;  cvs diff -u -r 1.1.4.8 -r 1.1.4.9 src/common/xml.c;  cvs diff -u -r 1.4.2.14 -r 1.4.2.15 src/gtk/about.c;  ) > 1.9.13cvs10.patchset
index f3bc9602a0742872000321c50149fab18c51bccf..73ecddb4488b85f8b296fff895402f2f7d723eac 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=13
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=9
+EXTRA_VERSION=10
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 9bfa7c6e5210f9a1615670a0b4717770d13de45a..04d9b6c2d82e8fd07c67a15728641b28d82a3857 100644 (file)
@@ -359,7 +359,7 @@ static gchar *get_address_from_edit(GtkEntry *entry, gint *start_pos)
                return NULL;
 
 #define IS_VALID_CHAR(x) \
-       (isalnum(x) || (x) == '"' || (x) == '<' || (((unsigned char)(x)) > 0x7f))
+       (g_ascii_isalnum(x) || (x) == '"' || (x) == '<' || (((unsigned char)(x)) > 0x7f))
 
        /* now scan back until we hit a valid character */
        for (; *p && !IS_VALID_CHAR(*p); p = g_utf8_next_char(p))
index fd652bc2358f4955c314bbd663ca7a76c3d3e278..6eb3abcfe6e59de3cb407d20d3ecc247eaa66cae 100644 (file)
@@ -91,9 +91,10 @@ gint qp_decode_line(gchar *str)
        while (*inp != '\0') {
                if (*inp == '=') {
                        if (inp[1] && inp[2] &&
-                           get_hex_value(outp, inp[1], inp[2]) == TRUE) {
+                           get_hex_value((guchar *)outp, inp[1], inp[2])
+                           == TRUE) {
                                inp += 3;
-                       } else if (inp[1] == '\0' || isspace((guchar)inp[1])) {
+                       } else if (inp[1] == '\0' || g_ascii_isspace(inp[1])) {
                                /* soft line break */
                                break;
                        } else {
@@ -149,7 +150,7 @@ gint qp_get_q_encoding_len(const guchar *str)
                if (*inp == 0x20)
                        len++;
                else if (*inp == '=' || *inp == '?' || *inp == '_' ||
-                        *inp < 32 || *inp > 127 || isspace(*inp))
+                        *inp < 32 || *inp > 127 || g_ascii_isspace(*inp))
                        len += 3;
                else
                        len++;
@@ -169,7 +170,7 @@ void qp_q_encode(gchar *out, const guchar *in)
                if (*inp == 0x20)
                        *outp++ = '_';
                else if (*inp == '=' || *inp == '?' || *inp == '_' ||
-                        *inp < 32 || *inp > 127 || isspace(*inp)) {
+                        *inp < 32 || *inp > 127 || g_ascii_isspace(*inp)) {
                        *outp++ = '=';
                        get_hex_str(outp, *inp);
                        outp += 2;
index 66e63d78eb3a453d064064708a232ebfcc6480c9..c9f6d79db711f1f1b8ed361baa95609dc646be00 100644 (file)
@@ -161,17 +161,17 @@ gboolean str_find_equal(const gchar *haystack, const gchar *needle)
 
 gboolean str_case_find_equal(const gchar *haystack, const gchar *needle)
 {
-       return strcasecmp(haystack, needle) == 0;
+       return g_ascii_strcasecmp(haystack, needle) == 0;
 }
 
 gint to_number(const gchar *nstr)
 {
-       register const guchar *p;
+       register const gchar *p;
 
        if (*nstr == '\0') return -1;
 
        for (p = nstr; *p != '\0'; p++)
-               if (!isdigit(*p)) return -1;
+               if (!g_ascii_isdigit(*p)) return -1;
 
        return atoi(nstr);
 }
@@ -348,14 +348,14 @@ gchar *strncpy2(gchar *dest, const gchar *src, size_t n)
 #if !HAVE_ISWALNUM
 int iswalnum(wint_t wc)
 {
-       return isalnum((int)wc);
+       return g_ascii_isalnum((int)wc);
 }
 #endif
 
 #if !HAVE_ISWSPACE
 int iswspace(wint_t wc)
 {
-       return isspace((int)wc);
+       return g_ascii_isspace((int)wc);
 }
 #endif
 
@@ -551,26 +551,26 @@ gint get_mbs_len(const gchar *s)
 }
 
 /* Examine if next block is non-ASCII string */
-gboolean is_next_nonascii(const guchar *s)
+gboolean is_next_nonascii(const gchar *s)
 {
-       const guchar *p;
+       const gchar *p;
 
        /* skip head space */
-       for (p = s; *p != '\0' && isspace(*p); p++)
+       for (p = s; *p != '\0' && g_ascii_isspace(*p); p++)
                ;
-       for (; *p != '\0' && !isspace(*p); p++) {
-               if (*p > 127 || *p < 32)
+       for (; *p != '\0' && !g_ascii_isspace(*p); p++) {
+               if (*(guchar *)p > 127 || *(guchar *)p < 32)
                        return TRUE;
        }
 
        return FALSE;
 }
 
-gint get_next_word_len(const guchar *s)
+gint get_next_word_len(const gchar *s)
 {
        gint len = 0;
 
-       for (; *s != '\0' && !isspace(*s); s++, len++)
+       for (; *s != '\0' && !g_ascii_isspace(*s); s++, len++)
                ;
 
        return len;
@@ -636,7 +636,7 @@ void trim_subject_for_sort(gchar *str)
 
 void trim_subject(gchar *str)
 {
-       register guchar *srcp;
+       register gchar *srcp;
        gchar op, cl;
        gint in_brace;
        
@@ -666,13 +666,13 @@ void trim_subject(gchar *str)
                                break;
                }
        }
-       while (isspace(*srcp)) srcp++;
+       while (g_ascii_isspace(*srcp)) srcp++;
        memmove(str, srcp, strlen(srcp) + 1);
 }
 
 void eliminate_parenthesis(gchar *str, gchar op, gchar cl)
 {
-       register guchar *srcp, *destp;
+       register gchar *srcp, *destp;
        gint in_brace;
 
        srcp = destp = str;
@@ -689,7 +689,7 @@ void eliminate_parenthesis(gchar *str, gchar op, gchar cl)
                        if (in_brace == 0)
                                break;
                }
-               while (isspace(*srcp)) srcp++;
+               while (g_ascii_isspace(*srcp)) srcp++;
                memmove(destp, srcp, strlen(srcp) + 1);
        }
 }
@@ -754,14 +754,14 @@ void extract_parenthesis_with_skip_quote(gchar *str, gchar quote_chr,
 
 void eliminate_quote(gchar *str, gchar quote_chr)
 {
-       register guchar *srcp, *destp;
+       register gchar *srcp, *destp;
 
        srcp = destp = str;
 
        while ((destp = strchr(destp, quote_chr))) {
                if ((srcp = strchr(destp + 1, quote_chr))) {
                        srcp++;
-                       while (isspace(*srcp)) srcp++;
+                       while (g_ascii_isspace(*srcp)) srcp++;
                        memmove(destp, srcp, strlen(srcp) + 1);
                } else {
                        *destp = '\0';
@@ -789,7 +789,7 @@ void extract_quote(gchar *str, gchar quote_chr)
 
 void eliminate_address_comment(gchar *str)
 {
-       register guchar *srcp, *destp;
+       register gchar *srcp, *destp;
        gint in_brace;
 
        srcp = destp = str;
@@ -800,7 +800,7 @@ void eliminate_address_comment(gchar *str)
                        if (*srcp == '@') {
                                destp = srcp + 1;
                        } else {
-                               while (isspace(*srcp)) srcp++;
+                               while (g_ascii_isspace(*srcp)) srcp++;
                                memmove(destp, srcp, strlen(srcp) + 1);
                        }
                } else {
@@ -823,7 +823,7 @@ void eliminate_address_comment(gchar *str)
                        if (in_brace == 0)
                                break;
                }
-               while (isspace(*srcp)) srcp++;
+               while (g_ascii_isspace(*srcp)) srcp++;
                memmove(destp, srcp, strlen(srcp) + 1);
        }
 }
@@ -1032,12 +1032,12 @@ void remove_return(gchar *str)
 
 void remove_space(gchar *str)
 {
-       register guchar *p = str;
+       register gchar *p = str;
        register gint spc;
 
        while (*p) {
                spc = 0;
-               while (isspace(*(p + spc)))
+               while (g_ascii_isspace(*(p + spc)))
                        spc++;
                if (spc)
                        memmove(p, p + spc, strlen(p + spc) + 1);
@@ -1048,14 +1048,14 @@ void remove_space(gchar *str)
 
 void unfold_line(gchar *str)
 {
-       register guchar *p = str;
+       register gchar *p = str;
        register gint spc;
 
        while (*p) {
                if (*p == '\n' || *p == '\r') {
                        *p++ = ' ';
                        spc = 0;
-                       while (isspace(*(p + spc)))
+                       while (g_ascii_isspace(*(p + spc)))
                                spc++;
                        if (spc)
                                memmove(p, p + spc, strlen(p + spc) + 1);
@@ -1114,16 +1114,16 @@ gboolean is_header_line(const gchar *str)
        return FALSE;
 }
 
-gboolean is_ascii_str(const guchar *str)
+gboolean is_ascii_str(const gchar *str)
 {
-       g_return_val_if_fail(str, FALSE);
+       const guchar *p = (const guchar *)str;
 
-       while (*str != '\0') {
-               if (*str != '\t' && *str != ' ' &&
-                   *str != '\r' && *str != '\n' &&
-                   (*str < 32 || *str >= 127))
+       while (*p != '\0') {
+               if (*p != '\t' && *p != ' ' &&
+                   *p != '\r' && *p != '\n' &&
+                   (*p < 32 || *p >= 127))
                        return FALSE;
-               str++;
+               p++;
        }
 
        return TRUE;
@@ -1131,15 +1131,15 @@ gboolean is_ascii_str(const guchar *str)
 
 gint get_quote_level(const gchar *str, const gchar *quote_chars)
 {
-       const guchar *first_pos;
-       const guchar *last_pos;
-       const guchar *p = str;
+       const gchar *first_pos;
+       const gchar *last_pos;
+       const gchar *p = str;
        gint quote_level = -1;
 
        /* speed up line processing by only searching to the last '>' */
        if ((first_pos = line_has_quote_char(str, quote_chars)) != NULL) {
                /* skip a line if it contains a '<' before the initial '>' */
-               if (memchr(str, '<', first_pos - (const guchar *)str) != NULL)
+               if (memchr(str, '<', first_pos - str) != NULL)
                        return -1;
                last_pos = line_has_quote_char_last(first_pos, quote_chars);
        } else
@@ -1147,7 +1147,7 @@ gint get_quote_level(const gchar *str, const gchar *quote_chars)
 
        while (p <= last_pos) {
                while (p < last_pos) {
-                       if (isspace(*p))
+                       if (g_ascii_isspace(*p))
                                p++;
                        else
                                break;
@@ -1155,11 +1155,11 @@ gint get_quote_level(const gchar *str, const gchar *quote_chars)
 
                if (strchr(quote_chars, *p))
                        quote_level++;
-               else if (*p != '-' && !isspace(*p) && p <= last_pos) {
+               else if (*p != '-' && !g_ascii_isspace(*p) && p <= last_pos) {
                        /* any characters are allowed except '-' and space */
                        while (*p != '-' 
                               && !strchr(quote_chars, *p) 
-                              && !isspace(*p) 
+                              && !g_ascii_isspace(*p) 
                               && p < last_pos)
                                p++;
                        if (strchr(quote_chars, *p))
@@ -1334,7 +1334,7 @@ gchar **strsplit_parenthesis(const gchar *str, gchar op, gchar cl,
                        n++;
                        str = s_cl + 1;
 
-                       while (*str && isspace(*(guchar *)str)) str++;
+                       while (*str && g_ascii_isspace(*str)) str++;
                        if (*str != op) {
                                string_list = g_slist_prepend(string_list,
                                                              g_strdup(""));
@@ -1487,7 +1487,7 @@ GList *uri_list_extract_filenames(const gchar *uri_list)
 
        while (p) {
                if (*p != '#') {
-                       while (isspace(*p)) p++;
+                       while (g_ascii_isspace(*p)) p++;
                        if (!strncmp(p, "file:", 5)) {
                                q = p;
                                q += 5;
@@ -1496,7 +1496,8 @@ GList *uri_list_extract_filenames(const gchar *uri_list)
                                if (q > p) {
                                        gchar *file, *locale_file = NULL;
                                        q--;
-                                       while (q > p && isspace(*q)) q--;
+                                       while (q > p && g_ascii_isspace(*q))
+                                               q--;
                                        Xalloca(escaped_utf8uri, q - p + 2,
                                                return result);
                                        Xalloca(file, q - p + 2,
@@ -3077,7 +3078,7 @@ gchar *file_read_to_str(const gchar *file)
 gchar *file_read_stream_to_str(FILE *fp)
 {
        GByteArray *array;
-       gchar buf[BUFSIZ];
+       guchar buf[BUFSIZ];
        gint n_read;
        gchar *str;
 
index 39065b72db9d861f59bd57049cc0bd9d333f32f0..1300f4d40a720a1eba582553f8df2757e9db8736 100644 (file)
@@ -252,8 +252,8 @@ wchar_t *wcscasestr         (const wchar_t *haystack,
                                 const wchar_t *needle);
 gint get_mbs_len               (const gchar    *s);
 
-gboolean is_next_nonascii      (const guchar *s);
-gint get_next_word_len         (const guchar *s);
+gboolean is_next_nonascii      (const gchar *s);
+gint get_next_word_len         (const gchar *s);
 
 /* functions for string parsing */
 gint subject_compare                   (const gchar    *s1,
@@ -317,7 +317,7 @@ void subst_chars                    (gchar          *str,
 void subst_for_filename                        (gchar          *str);
 void subst_for_shellsafe_filename      (gchar          *str);
 gboolean is_header_line                        (const gchar    *str);
-gboolean is_ascii_str                  (const guchar   *str);
+gboolean is_ascii_str                  (const gchar    *str);
 gint get_quote_level                   (const gchar    *str,
                                         const gchar    *quote_chars);
 gint check_line_length                 (const gchar    *str,
index 614e2a8d01b6d57a835f6c56ce6fa884c1bb8690..b561bd5f9968b215550926d9510d7042b17fa9c6 100644 (file)
@@ -188,7 +188,7 @@ gint xml_get_dtd(XMLFile *file)
 gint xml_parse_next_tag(XMLFile *file)
 {
        gchar buf[XMLBUFSIZE];
-       guchar *bufp = buf;
+       gchar *bufp = buf;
        gchar *tag_str;
        XMLTag *tag;
        gint len;
@@ -228,7 +228,7 @@ gint xml_parse_next_tag(XMLFile *file)
                return -1;
        }
 
-       while (*bufp != '\0' && !isspace(*bufp)) bufp++;
+       while (*bufp != '\0' && !g_ascii_isspace(*bufp)) bufp++;
        if (*bufp == '\0') {
                tag_str = conv_codeset_strdup(buf, file->encoding, CS_INTERNAL);
                if (tag_str) {
@@ -257,7 +257,7 @@ gint xml_parse_next_tag(XMLFile *file)
                gchar *p;
                gchar quote;
 
-               while (isspace(*bufp)) bufp++;
+               while (g_ascii_isspace(*bufp)) bufp++;
                attr_name = bufp;
                if ((p = strchr(attr_name, '=')) == NULL) {
                        g_warning("xml_parse_next_tag(): Syntax error in tag\n");
@@ -265,7 +265,7 @@ gint xml_parse_next_tag(XMLFile *file)
                }
                bufp = p;
                *bufp++ = '\0';
-               while (isspace(*bufp)) bufp++;
+               while (g_ascii_isspace(*bufp)) bufp++;
 
                if (*bufp != '"' && *bufp != '\'') {
                        g_warning("xml_parse_next_tag(): Syntax error in tag\n");
index 9785cb0bd82e05dd6f319da38d364f11879f2761..dea84c25562f46c89185f5e641cd76d94a385c7f 100644 (file)
@@ -2737,7 +2737,7 @@ static gboolean compose_get_line_break_pos(GtkTextBuffer *buffer,
        gboolean can_break = FALSE;
        gboolean do_break = FALSE;
        gboolean was_white = FALSE;
-       gboolean prev_hyphen = FALSE;
+       gboolean prev_dont_break = FALSE;
 
        gtk_text_iter_forward_to_line_end(&line_end);
        str = gtk_text_buffer_get_text(buffer, &iter, &line_end, FALSE);
@@ -2771,7 +2771,7 @@ static gboolean compose_get_line_break_pos(GtkTextBuffer *buffer,
                gunichar wc;
                gint uri_len;
 
-               if (attr->is_line_break && can_break && was_white && !prev_hyphen)
+               if (attr->is_line_break && can_break && was_white && !prev_dont_break)
                        pos = i;
                
                was_white = attr->is_white;
@@ -2792,7 +2792,7 @@ static gboolean compose_get_line_break_pos(GtkTextBuffer *buffer,
                wc = g_utf8_get_char(p);
                if (g_unichar_iswide(wc)) {
                        col += 2;
-                       if (prev_hyphen && can_break && attr->is_line_break)
+                       if (prev_dont_break && can_break && attr->is_line_break)
                                pos = i;
                } else if (*p == '\t')
                        col += 8;
@@ -2803,10 +2803,10 @@ static gboolean compose_get_line_break_pos(GtkTextBuffer *buffer,
                        break;
                }
 
-               if (*p == '-')
-                       prev_hyphen = TRUE;
+               if (*p == '-' || *p == '/')
+                       prev_dont_break = TRUE;
                else
-                       prev_hyphen = FALSE;
+                       prev_dont_break = FALSE;
 
                p = g_utf8_next_char(p);
                can_break = TRUE;
index 2a7ba5b0c40049d5eb0ab9dd687444168556b3e8..7861ae16b3009717f3b7c27da4f929b6f2eaf38b 100644 (file)
@@ -254,6 +254,7 @@ static void about_create(void)
                                      NULL, NULL, NULL, NULL);
        gtk_box_pack_end(GTK_BOX(vbox1), confirm_area, FALSE, FALSE, 4);
        gtk_widget_grab_default(close_button);
+       gtk_widget_grab_focus(close_button);
        g_signal_connect_closure
                (G_OBJECT(close_button), "clicked",
                 g_cclosure_new_swap(G_CALLBACK(gtk_widget_hide_on_delete),
index 24c5ef543a7b610460d618884632666f00838009..51b3d05a013635a4d92619ca17c2870bea9b6750 100644 (file)
@@ -87,7 +87,7 @@ HeaderView *headerview_create(void)
 
        hbox = gtk_hbox_new(FALSE, 0);
        gtk_container_set_border_width(GTK_CONTAINER(hbox), 2);
-       vbox = gtk_vbox_new(FALSE, 0);
+       vbox = gtk_vbox_new(FALSE, 2);
        gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0);
 
        hbox1 = gtk_hbox_new(FALSE, 4);
@@ -104,6 +104,16 @@ HeaderView *headerview_create(void)
        subject_header_label = gtk_label_new(TR("Subject:"));
        subject_body_label   = gtk_label_new("");
 
+       gtk_label_set_selectable(GTK_LABEL(from_body_label), TRUE);
+       gtk_label_set_selectable(GTK_LABEL(to_body_label), TRUE);
+       gtk_label_set_selectable(GTK_LABEL(ng_body_label), TRUE);
+       gtk_label_set_selectable(GTK_LABEL(subject_body_label), TRUE);
+
+       GTK_WIDGET_UNSET_FLAGS(from_body_label, GTK_CAN_FOCUS);
+       GTK_WIDGET_UNSET_FLAGS(to_body_label, GTK_CAN_FOCUS);
+       GTK_WIDGET_UNSET_FLAGS(ng_body_label, GTK_CAN_FOCUS);
+       GTK_WIDGET_UNSET_FLAGS(subject_body_label, GTK_CAN_FOCUS);
+
        gtk_box_pack_start(GTK_BOX(hbox1), from_header_label, FALSE, FALSE, 0);
        gtk_box_pack_start(GTK_BOX(hbox1), from_body_label, FALSE, FALSE, 0);
        gtk_box_pack_start(GTK_BOX(hbox1), to_header_label, FALSE, FALSE, 0);
@@ -116,7 +126,7 @@ HeaderView *headerview_create(void)
        gtk_misc_set_alignment(GTK_MISC(to_body_label), 0, 0.5);
        gtk_misc_set_alignment(GTK_MISC(ng_body_label), 0, 0.5);
        gtk_misc_set_alignment(GTK_MISC(subject_body_label), 0, 0.5);
-#if (GTK_MAJOR_VERSION > 2 || (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 6))
+#if GTK_CHECK_VERSION(2, 6, 0)
        gtk_label_set_ellipsize(GTK_LABEL(to_body_label), PANGO_ELLIPSIZE_END);
        gtk_label_set_ellipsize(GTK_LABEL(ng_body_label), PANGO_ELLIPSIZE_END);
        gtk_label_set_ellipsize(GTK_LABEL(subject_body_label), PANGO_ELLIPSIZE_END);
index 14c1bb1b4de29c8b6988ddae38a910c51d0fde4a..68aaceef850ff56dc394e343e73849dd5c971e65 100644 (file)
@@ -314,6 +314,15 @@ int main(int argc, char *argv[])
        MAKE_DIR_IF_NOT_EXIST(get_tmp_dir());
        MAKE_DIR_IF_NOT_EXIST(RC_DIR G_DIR_SEPARATOR_S "uidl");
 
+       /* remove temporary files */
+       remove_all_files(get_tmp_dir());
+       remove_all_files(get_mime_tmp_dir());
+
+       if (is_file_exist(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log")) {
+               if (rename(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log",
+                          RC_DIR G_DIR_SEPARATOR_S "sylpheed.log.bak") < 0)
+                       FILE_OP_ERROR("sylpheed.log", "rename");
+       }
        set_log_file(RC_DIR G_DIR_SEPARATOR_S "sylpheed.log");
 
        folder_system_init();
index 51d9019c3b63c555a7dfbd26883d2e2a792398f4..d0b962976b7386ab26c3388b696fe1303c1b4f32 100644 (file)
--- a/src/pop.c
+++ b/src/pop.c
@@ -867,7 +867,7 @@ static gint pop3_session_recv_msg(Session *session, const gchar *msg)
 {
        Pop3Session *pop3_session = POP3_SESSION(session);
        Pop3ErrorValue val = PS_SUCCESS;
-       const guchar *body;
+       const gchar *body;
 
        body = msg;
        if (pop3_session->state != POP3_GETRANGE_UIDL_RECV &&
@@ -882,9 +882,9 @@ static gint pop3_session_recv_msg(Session *session, const gchar *msg)
 
                if (*body == '+' || *body == '-')
                        body++;
-               while (isalpha(*body))
+               while (g_ascii_isalpha(*body))
                        body++;
-               while (isspace(*body))
+               while (g_ascii_isspace(*body))
                        body++;
        }
 
index 6b830c8ca0dfd2fb0d9dad09e7aa5190493843a1..5ca9f0cf868514eb7be4802f7bd0878798637f41 100644 (file)
@@ -374,8 +374,8 @@ static PrefParam param[] = {
         &compose.sigfile_radiobtn,
         prefs_account_enum_set_data_from_radiobtn,
         prefs_account_enum_set_radiobtn},
-       {"signature_path", "~/"DEFAULT_SIGNATURE, &tmp_ac_prefs.sig_path, P_STRING,
-        &compose.entry_sigpath,
+       {"signature_path", "~" G_DIR_SEPARATOR_S DEFAULT_SIGNATURE,
+        &tmp_ac_prefs.sig_path, P_STRING,
         prefs_set_data_from_entry, prefs_set_entry},
 
        {"auto_signature", "TRUE", &tmp_ac_prefs.auto_sig, P_BOOL,
@@ -733,7 +733,7 @@ PrefsAccount *prefs_account_new(void)
 
 void prefs_account_read_config(PrefsAccount *ac_prefs, const gchar *label)
 {
-       const guchar *p = label;
+       const gchar *p = label;
        gchar *rcpath;
        gint id;
        gchar **strv, **cur;
@@ -749,7 +749,7 @@ void prefs_account_read_config(PrefsAccount *ac_prefs, const gchar *label)
        g_free(rcpath);
 
        *ac_prefs = tmp_ac_prefs;
-       while (*p && !isdigit(*p)) p++;
+       while (*p && !g_ascii_isdigit(*p)) p++;
        id = atoi(p);
        if (id < 0) g_warning("wrong account id: %d\n", id);
        ac_prefs->account_id = id;
index 3a40553d293f5cda1908f3cdc80456982a6470cd..d4da691f34de88b05fe3e1fd31639c561d536f30 100644 (file)
@@ -1089,7 +1089,7 @@ GList *procmime_get_mime_type_list(void)
        GList *list = NULL;
        FILE *fp;
        gchar buf[BUFFSIZE];
-       guchar *p;
+       gchar *p;
        gchar *delim;
        MimeType *mime_type;
        gboolean fp_is_glob_file = TRUE;
@@ -1117,9 +1117,9 @@ GList *procmime_get_mime_type_list(void)
                p = buf;
                
                if (fp_is_glob_file) {
-                       while (*p && !isspace(*p) && (*p!=':')) p++;
+                       while (*p && !g_ascii_isspace(*p) && (*p!=':')) p++;
                } else {
-                       while (*p && !isspace(*p)) p++;
+                       while (*p && !g_ascii_isspace(*p)) p++;
                }
 
                if (*p) {
@@ -1135,9 +1135,9 @@ GList *procmime_get_mime_type_list(void)
                mime_type->sub_type = g_strdup(delim + 1);
 
                if (fp_is_glob_file) {
-                       while (*p && (isspace(*p)||(*p=='*')||(*p=='.'))) p++;
+                       while (*p && (g_ascii_isspace(*p)||(*p=='*')||(*p=='.'))) p++;
                } else {
-                       while (*p && isspace(*p)) p++;
+                       while (*p && g_ascii_isspace(*p)) p++;
                }
 
                if (*p)
index 48ca1934e0fcece6a647288236298b62deebdd5f..45f85c8cee6b3d1c83dbe8ee12099c53cd5a6bba 100644 (file)
@@ -595,14 +595,14 @@ void procmsg_get_filter_keyword(MsgInfo *msginfo, gchar **header, gchar **key,
                        SET_FILTER_KEY("header \"List-Id\"", H_LIST_ID);
                        extract_list_id_str(*key);
                } else if (hentry[H_X_SEQUENCE].body != NULL) {
-                       guchar *p;
+                       gchar *p;
 
                        SET_FILTER_KEY("X-Sequence", H_X_SEQUENCE);
                        p = *key;
                        while (*p != '\0') {
-                               while (*p != '\0' && !isspace(*p)) p++;
-                               while (isspace(*p)) p++;
-                               if (isdigit(*p)) {
+                               while (*p != '\0' && !g_ascii_isspace(*p)) p++;
+                               while (g_ascii_isspace(*p)) p++;
+                               if (g_ascii_isdigit(*p)) {
                                        *p = '\0';
                                        break;
                                }
index 2998fdc74546cb054963d943f33a65b241e88872..00282ba78905d5b9cc06434081f22cd6670ef6c6 100644 (file)
@@ -147,7 +147,7 @@ int quote_fmtwrap(void)
 
 static int isseparator(int ch)
 {
-       return isspace(ch) || ch == '.' || ch == '-';
+       return g_ascii_isspace(ch) || ch == '.' || ch == '-';
 }
 
 static void quote_fmt_show_date(const MsgInfo *msginfo, const gchar *format)
index 6bbe95817faa0a0c8a8f4a5761685415f3424c38..99fb3a030c4323f1c1409bbe077b201797296d00 100644 (file)
@@ -880,11 +880,11 @@ static gchar *make_uri_string(const gchar *bp, const gchar *ep)
        (IS_ASCII(ch) && \
         (ch) > 32   && \
         (ch) != 127 && \
-        !isspace(ch) && \
+        !g_ascii_isspace(ch) && \
         !strchr("(),;<>\"", (ch)))
 
 /* alphabet and number within 7bit ASCII */
-#define IS_ASCII_ALNUM(ch)     (IS_ASCII(ch) && isalnum(ch))
+#define IS_ASCII_ALNUM(ch)     (IS_ASCII(ch) && g_ascii_isalnum(ch))
 #define IS_QUOTE(ch) ((ch) == '\'' || (ch) == '"')
 
 static GHashTable *create_domain_tab(void)