2008-09-18 [colin] 3.5.0cvs113
authorColin Leroy <colin@colino.net>
Thu, 18 Sep 2008 15:58:01 +0000 (15:58 +0000)
committerColin Leroy <colin@colino.net>
Thu, 18 Sep 2008 15:58:01 +0000 (15:58 +0000)
* 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

ChangeLog
PATCHSETS
configure.ac
src/gtk/logwindow.c
src/gtk/logwindow.h
src/messageview.c
src/procmime.c
src/textview.c

index 4534d25..6a17687 100644 (file)
--- 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
index 49f2eb6..5455390 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( 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
index a38eda7..076ae8d 100644 (file)
@@ -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=
 
index fb0becb..349f3b1 100644 (file)
@@ -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;
+                       }
+               }
        }
 }
 
index e08dd76..6fb108d 100644 (file)
@@ -50,6 +50,7 @@ struct _LogWindow
        GtkTextMark *end_mark;
        gboolean hidden;
        gboolean never_shown;
+       gboolean has_error;
 };
 
 LogWindow *log_window_create(LogInstance instance);
index b2ed47b..762541b 100644 (file)
@@ -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;
+                                       }
                                }
                        }
 
index a23b95f..bfdf084 100644 (file)
@@ -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;
index fc3657e..cdc8499 100644 (file)
@@ -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);