2005-06-15 [colin] 1.9.11cvs75
authorColin Leroy <colin@colino.net>
Wed, 15 Jun 2005 19:54:45 +0000 (19:54 +0000)
committerColin Leroy <colin@colino.net>
Wed, 15 Jun 2005 19:54:45 +0000 (19:54 +0000)
* src/compose.c
Finish header encoding fix
* src/summaryview.c
Fix segfault
* src/headerview.c
Fix compilation (Thanks Stephan
Sachse)

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/compose.c
src/headerview.c
src/summaryview.c

index a7e9af2..da5b1e4 100644 (file)
@@ -1,3 +1,13 @@
+2005-06-15 [colin]     1.9.11cvs75
+
+       * src/compose.c
+               Finish header encoding fix
+       * src/summaryview.c
+               Fix segfault
+       * src/headerview.c
+               Fix compilation (Thanks Stephan
+               Sachse)
+
 2005-06-15 [colin]     1.9.11cvs74
 
        * Makefile.am
index 6a62202..25f845a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.59.2.19 -r 1.59.2.20 src/prefs_filtering.c;  ) > 1.9.11cvs72.patchset
 ( cvs diff -u -r 1.9.2.20 -r 1.9.2.21 src/gtk/gtkaspell.c;  cvs diff -u -r 1.5.2.2 -r 1.5.2.3 src/gtk/gtkaspell.h;  ) > 1.9.11cvs73.patchset
 ( cvs diff -u -r 1.24.2.8 -r 1.24.2.9 Makefile.am;  cvs diff -u -r 1.65.2.32 -r 1.65.2.33 src/codeconv.c;  cvs diff -u -r 1.15.2.8 -r 1.15.2.9 src/codeconv.h;  cvs diff -u -r 1.213.2.34 -r 1.213.2.35 src/folder.c;  cvs diff -u -r 1.207.2.41 -r 1.207.2.42 src/folderview.c;  cvs diff -u -r 1.395.2.80 -r 1.395.2.81 src/summaryview.c;  cvs diff -u -r 1.68.2.7 -r 1.68.2.8 src/summaryview.h;  ) > 1.9.11cvs74.patchset
+( cvs diff -u -r 1.382.2.131 -r 1.382.2.132 src/compose.c;  cvs diff -u -r 1.395.2.81 -r 1.395.2.82 src/summaryview.c;  cvs diff -u -r 1.8.2.6 -r 1.8.2.7 src/headerview.c;  ) > 1.9.11cvs75.patchset
index 5a09855..0680ec6 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=74
+EXTRA_VERSION=75
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 30c214f..1152189 100644 (file)
@@ -275,7 +275,8 @@ static void compose_add_attachments         (Compose        *compose,
                                                 MimeInfo       *parent);
 static gchar *compose_get_header               (Compose        *compose);
 
-static void compose_convert_header             (gchar          *dest,
+static void compose_convert_header             (Compose        *compose,
+                                                gchar          *dest,
                                                 gint            len,
                                                 gchar          *src,
                                                 gint            header_len,
@@ -3321,7 +3322,7 @@ static gint compose_redirect_write_headers_from_headerlist(Compose *compose,
                        g_strstrip(str);
                        if (str[0] != '\0') {
                                compose_convert_header
-                                       (buf, sizeof(buf), str,
+                                       (compose, buf, sizeof(buf), str,
                                        strlen("Resent-To") + 2, TRUE);
 
                                if (first_to_address) {
@@ -3349,7 +3350,7 @@ static gint compose_redirect_write_headers_from_headerlist(Compose *compose,
                        g_strstrip(str);
                        if (str[0] != '\0') {
                                compose_convert_header
-                                       (buf, sizeof(buf), str,
+                                       (compose, buf, sizeof(buf), str,
                                        strlen("Resent-Cc") + 2, TRUE);
 
                                 if (first_cc_address) {
@@ -3387,7 +3388,7 @@ static gint compose_redirect_write_headers(Compose *compose, FILE *fp)
        /* Resent-From */
        if (compose->account->name && *compose->account->name) {
                compose_convert_header
-                       (buf, sizeof(buf), compose->account->name,
+                       (compose, buf, sizeof(buf), compose->account->name,
                         strlen("From: "), TRUE);
                fprintf(fp, "Resent-From: %s <%s>\n",
                        buf, compose->account->address);
@@ -3400,7 +3401,7 @@ static gint compose_redirect_write_headers(Compose *compose, FILE *fp)
                Xstrdup_a(str, entstr, return -1);
                g_strstrip(str);
                if (*str != '\0') {
-                       compose_convert_header(buf, sizeof(buf), str,
+                       compose_convert_header(compose, buf, sizeof(buf), str,
                                               strlen("Subject: "), FALSE);
                        fprintf(fp, "Subject: %s\n", buf);
                }
@@ -3456,7 +3457,7 @@ static gint compose_redirect_write_to_file(Compose *compose, FILE *fdest)
                                if (compose->account->name
                                    && *compose->account->name) {
                                        compose_convert_header
-                                               (buf, sizeof(buf),
+                                               (compose, buf, sizeof(buf),
                                                 compose->account->name,
                                                 strlen("From: "),
                                                 FALSE);
@@ -4069,7 +4070,7 @@ static void compose_add_headerfield_from_headerlist(Compose *compose,
 
                buf = g_new0(gchar, fieldstr->len * 4 + 256);
                compose_convert_header
-                       (buf, fieldstr->len * 4  + 256, fieldstr->str,
+                       (compose, buf, fieldstr->len * 4  + 256, fieldstr->str,
                        strlen(fieldname) + 2, TRUE);
                g_string_append_printf(header, "%s: %s\n", fieldname, buf);
                g_free(buf);
@@ -4107,7 +4108,7 @@ static gchar *compose_get_header(Compose *compose)
        /* From */
        if (compose->account->name && *compose->account->name) {
                compose_convert_header
-                       (buf, sizeof(buf), compose->account->name,
+                       (compose, buf, sizeof(buf), compose->account->name,
                         strlen("From: "), TRUE);
                QUOTE_IF_REQUIRED(name, buf);
                g_string_append_printf(header, "From: %s <%s>\n",
@@ -4132,7 +4133,7 @@ static gchar *compose_get_header(Compose *compose)
        if (*str != '\0' && !IS_IN_CUSTOM_HEADER("Subject")) {
                g_strstrip(str);
                if (*str != '\0') {
-                       compose_convert_header(buf, sizeof(buf), str,
+                       compose_convert_header(compose, buf, sizeof(buf), str,
                                               strlen("Subject: "), FALSE);
                        g_string_append_printf(header, "Subject: %s\n", buf);
                }
@@ -4166,7 +4167,7 @@ static gchar *compose_get_header(Compose *compose)
        if (compose->account->organization &&
            strlen(compose->account->organization) &&
            !IS_IN_CUSTOM_HEADER("Organization")) {
-               compose_convert_header(buf, sizeof(buf),
+               compose_convert_header(compose, buf, sizeof(buf),
                                       compose->account->organization,
                                       strlen("Organization: "), FALSE);
                g_string_append_printf(header, "Organization: %s\n", buf);
@@ -4200,7 +4201,7 @@ static gchar *compose_get_header(Compose *compose)
 
                        if (custom_header_is_allowed(chdr->name)) {
                                compose_convert_header
-                                       (buf, sizeof(buf),
+                                       (compose, buf, sizeof(buf),
                                         chdr->value ? chdr->value : "",
                                         strlen(chdr->name) + 2, FALSE);
                                g_string_append_printf(header, "%s: %s\n", chdr->name, buf);
@@ -4232,7 +4233,7 @@ static gchar *compose_get_header(Compose *compose)
                if (compose->return_receipt) {
                        if (compose->account->name
                            && *compose->account->name) {
-                               compose_convert_header(buf, sizeof(buf), 
+                               compose_convert_header(compose, buf, sizeof(buf), 
                                                       compose->account->name, 
                                                       strlen("Disposition-Notification-To: "),
                                                       TRUE);
@@ -4296,7 +4297,7 @@ static gchar *compose_get_header(Compose *compose)
 
 #undef IS_IN_CUSTOM_HEADER
 
-static void compose_convert_header(gchar *dest, gint len, gchar *src,
+static void compose_convert_header(Compose *compose, gchar *dest, gint len, gchar *src,
                                   gint header_len, gboolean addr_field)
 {
        gchar *tmpstr = NULL;
@@ -4312,7 +4313,8 @@ static void compose_convert_header(gchar *dest, gint len, gchar *src,
        subst_char(tmpstr, '\r', ' ');
        g_strchomp(tmpstr);
 
-       conv_encode_header(dest, len, tmpstr, header_len, addr_field);
+       conv_encode_header_full(dest, len, tmpstr, header_len, addr_field, 
+               conv_get_charset_str(compose->out_encoding));
        g_free(tmpstr);
 }
 
index e0f84ce..24c5ef5 100644 (file)
@@ -116,10 +116,11 @@ 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))
        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);
-
+#endif
        headerview->hbox = hbox;
        headerview->from_header_label    = from_header_label;
        headerview->from_body_label      = from_body_label;
index c8e68e5..7ff2078 100644 (file)
@@ -5448,6 +5448,10 @@ void summaryview_export_mbox_list(SummaryView *summaryview)
 
 void summaryview_lock(SummaryView *summaryview, FolderItem *item)
 {
+       if (!summaryview || !summaryview->folder_item || !item) {
+               return;
+       }
+
        if (summaryview->folder_item->folder == item->folder) {
                gtk_widget_set_sensitive(summaryview->ctree, FALSE);
        }