From: Colin Leroy Date: Thu, 18 Sep 2008 15:58:01 +0000 (+0000) Subject: 2008-09-18 [colin] 3.5.0cvs113 X-Git-Tag: rel_3_6_0~37 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=f68ae062172ff04e3b0fcb32fb855d0fb46a0e1b;hp=5a073c5d2035636bcf96fe02cfd97599444f6cf8 2008-09-18 [colin] 3.5.0cvs113 * src/messageview.c * src/procmime.c * src/textview.c Handle html parts in multipart/related Decode ISO-8859-1 as Windows-1252 (the former is a subset of the latter) in order to workaround Outlook mails misencoding * src/gtk/logwindow.c * src/gtk/logwindow.h Clear mainwindow's error pixmap when the error scrolls out of the log --- diff --git a/ChangeLog b/ChangeLog index 4534d25e0..6a1768788 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2008-09-18 [colin] 3.5.0cvs113 + + * src/messageview.c + * src/procmime.c + * src/textview.c + Handle html parts in multipart/related + Decode ISO-8859-1 as Windows-1252 (the former + is a subset of the latter) in order to + workaround Outlook mails misencoding + * src/gtk/logwindow.c + * src/gtk/logwindow.h + Clear mainwindow's error pixmap when the + error scrolls out of the log + 2008-09-17 [colin] 3.5.0cvs112 * src/image_viewer.c diff --git a/PATCHSETS b/PATCHSETS index 49f2eb67d..54553902b 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -3524,3 +3524,4 @@ ( cvs diff -u -r 1.105.2.145 -r 1.105.2.146 src/prefs_account.c; cvs diff -u -r 1.52.2.67 -r 1.52.2.68 src/prefs_folder_item.c; cvs diff -u -r 1.5.2.37 -r 1.5.2.38 src/prefs_spelling.c; cvs diff -u -r 1.9.2.61 -r 1.9.2.62 src/gtk/gtkaspell.c; ) > 3.5.0cvs110.patchset ( cvs diff -u -r 1.36.2.145 -r 1.36.2.146 src/common/utils.c; ) > 3.5.0cvs111.patchset ( cvs diff -u -r 1.61.2.86 -r 1.61.2.87 src/account.c; cvs diff -u -r 1.1.2.25 -r 1.1.2.26 src/image_viewer.c; cvs diff -u -r 1.52.2.68 -r 1.52.2.69 src/prefs_folder_item.c; cvs diff -u -r 1.5.2.38 -r 1.5.2.39 src/prefs_spelling.c; cvs diff -u -r 1.9.2.62 -r 1.9.2.63 src/gtk/gtkaspell.c; ) > 3.5.0cvs112.patchset +( cvs diff -u -r 1.94.2.186 -r 1.94.2.187 src/messageview.c; cvs diff -u -r 1.49.2.115 -r 1.49.2.116 src/procmime.c; cvs diff -u -r 1.96.2.206 -r 1.96.2.207 src/textview.c; cvs diff -u -r 1.1.4.32 -r 1.1.4.33 src/gtk/logwindow.c; cvs diff -u -r 1.1.4.15 -r 1.1.4.16 src/gtk/logwindow.h; ) > 3.5.0cvs113.patchset diff --git a/configure.ac b/configure.ac index a38eda725..076ae8d19 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=5 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=112 +EXTRA_VERSION=113 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/gtk/logwindow.c b/src/gtk/logwindow.c index fb0becb00..349f3b12f 100644 --- a/src/gtk/logwindow.c +++ b/src/gtk/logwindow.c @@ -310,6 +310,7 @@ static gboolean log_window_append(gpointer source, gpointer data) case LOG_ERROR: tag = "error"; head = "*** "; + logwindow->has_error = TRUE; break; case LOG_STATUS_OK: tag = "status_ok"; @@ -410,6 +411,13 @@ static void log_window_clip(LogWindow *logwin, guint clip_length) return; gtk_text_buffer_get_start_iter(textbuf, &start_iter); gtk_text_buffer_delete(textbuf, &start_iter, &end_iter); + if (logwin->has_error) { + gtk_text_buffer_get_start_iter(textbuf, &start_iter); + if (mainwindow_get_mainwindow() && !gtk_text_iter_forward_to_tag_toggle(&start_iter, logwin->error_tag)) { + mainwindow_clear_error(mainwindow_get_mainwindow()); + logwin->has_error = FALSE; + } + } } } diff --git a/src/gtk/logwindow.h b/src/gtk/logwindow.h index e08dd767b..6fb108d26 100644 --- a/src/gtk/logwindow.h +++ b/src/gtk/logwindow.h @@ -50,6 +50,7 @@ struct _LogWindow GtkTextMark *end_mark; gboolean hidden; gboolean never_shown; + gboolean has_error; }; LogWindow *log_window_create(LogInstance instance); diff --git a/src/messageview.c b/src/messageview.c index b2ed47b1c..762541b26 100644 --- a/src/messageview.c +++ b/src/messageview.c @@ -1287,6 +1287,12 @@ gint messageview_show(MessageView *messageview, MsgInfo *msginfo, alt_parent = mimeinfo; break; } + if (mimeinfo->type == MIMETYPE_TEXT && + !strcasecmp(mimeinfo->subtype, "html")) { + /* we got it */ + mimeview_select_mimepart_icon(messageview->mimeview, mimeinfo); + goto done; + } } } diff --git a/src/procmime.c b/src/procmime.c index a23b95f94..bfdf08427 100644 --- a/src/procmime.c +++ b/src/procmime.c @@ -691,6 +691,9 @@ static FILE *procmime_get_text_content(MimeInfo *mimeinfo) ? forced_charset : procmime_mimeinfo_get_parameter(mimeinfo, "charset"); + if (!forced_charset && !strcasecmp(src_codeset, CS_ISO_8859_1)) + src_codeset = CS_WINDOWS_1252; + if (mimeinfo->type == MIMETYPE_TEXT && !g_ascii_strcasecmp(mimeinfo->subtype, "html")) { SC_HTMLParser *parser; CodeConverter *conv; diff --git a/src/textview.c b/src/textview.c index fc3657e35..cdc849992 100644 --- a/src/textview.c +++ b/src/textview.c @@ -930,8 +930,11 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo) if (textview->messageview->forced_charset) charset = textview->messageview->forced_charset; - else + else { charset = procmime_mimeinfo_get_parameter(mimeinfo, "charset"); + if (!strcasecmp(charset, CS_ISO_8859_1)) + charset = CS_WINDOWS_1252; + } textview_set_font(textview, charset);