2007-08-02 [paul] 2.10.0cvs83
authorPaul Mangan <paul@claws-mail.org>
Thu, 2 Aug 2007 06:49:52 +0000 (06:49 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 2 Aug 2007 06:49:52 +0000 (06:49 +0000)
* src/textview.c
speed up/clean up rendering of larger
msgs
Thanks to Colin

ChangeLog
PATCHSETS
configure.ac
src/textview.c

index ebf048e90caa3cc632f3d4c44673c1fccd35a947..a14c6087f20b288c98611136beeb8de09d70eec7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-08-02 [paul]      2.10.0cvs83
+
+       * src/textview.c
+               speed up/clean up rendering of larger
+               msgs
+               Thanks to Colin
+
 2007-08-01 [paul]      2.10.0cvs82
 
        * src/mainwindow.h
index 108d640f510e5adbc1afff43cf277e09b529bab5..4f556168abd8e3a3be277eed7665490f69d457bf 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.43.2.60 -r 1.43.2.61 src/prefs_matcher.c;  ) > 2.10.0cvs80.patchset
 ( cvs diff -u -r 1.5.2.13 -r 1.5.2.14 src/setup.c;  cvs diff -u -r 1.5.2.62 -r 1.5.2.63 src/gtk/gtkutils.c;  ) > 2.10.0cvs81.patchset
 ( cvs diff -u -r 1.39.2.39 -r 1.39.2.40 src/mainwindow.h;  cvs diff -u -r 1.43.2.80 -r 1.43.2.81 src/toolbar.c;  cvs diff -u -r 1.1.14.1 -r 1.1.14.2 src/pixmaps/close.xpm;  cvs diff -u -r 1.1.16.1 -r 1.1.16.2 src/pixmaps/jpilot.xpm;  ) > 2.10.0cvs82.patchset
+( cvs diff -u -r 1.96.2.179 -r 1.96.2.180 src/textview.c;  ) > 2.10.0cvs83.patchset
index c19b98dbd3931ae6aa9ea8c2cf1c5ff66bd9cb41..f0bc3c8da145c280749f297a619d3f877648fe47 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=10
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=82
+EXTRA_VERSION=83
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 2c581ea9b2f233b2d80186f8c46537cbc5ab9a37..04eef2365d4ffe82ede5a6f402fb0b3057d01973 100644 (file)
@@ -918,7 +918,6 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo)
        CodeConverter *conv;
        const gchar *charset, *p, *cmd;
        GSList *cur;
-       int lines = 0;
        
        if (textview->messageview->forced_charset)
                charset = textview->messageview->forced_charset;
@@ -1007,9 +1006,6 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo)
                while (fgets(buf, sizeof(buf), tmpfp)) {
                        textview_write_line(textview, buf, conv, TRUE);
                        
-                       lines++;
-                       if (lines % 500 == 0)
-                               GTK_EVENTS_FLUSH();
                        if (textview->stop_loading) {
                                fclose(tmpfp);
                                waitpid(pid, pfd, 0);
@@ -1024,16 +1020,12 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo)
 #endif
        } else {
 textview_default:
-               lines = 0;
                tmpfp = g_fopen(mimeinfo->data.filename, "rb");
                fseek(tmpfp, mimeinfo->offset, SEEK_SET);
                debug_print("Viewing text content of type: %s (length: %d)\n", mimeinfo->subtype, mimeinfo->length);
                while ((ftell(tmpfp) < mimeinfo->offset + mimeinfo->length) &&
                       (fgets(buf, sizeof(buf), tmpfp) != NULL)) {
                        textview_write_line(textview, buf, conv, TRUE);
-                       lines++;
-                       if (lines % 500 == 0)
-                               GTK_EVENTS_FLUSH();
                        if (textview->stop_loading) {
                                fclose(tmpfp);
                                return;
@@ -1045,7 +1037,6 @@ textview_default:
        conv_code_converter_destroy(conv);
        procmime_force_encoding(0);
 
-       lines = 0;
        textview->uri_list = g_slist_reverse(textview->uri_list);
        for (cur = textview->uri_list; cur; cur = cur->next) {
                ClickableText *uri = (ClickableText *)cur->data;
@@ -1054,14 +1045,13 @@ textview_default:
                if (!prefs_common.hide_quotes ||
                    uri->quote_level+1 < prefs_common.hide_quotes) {
                        textview_toggle_quote(textview, cur, uri, TRUE);
-                       lines++;
-                       if (lines % 500 == 0)
-                               GTK_EVENTS_FLUSH();
                        if (textview->stop_loading) {
                                return;
                        }
                }
        }
+       
+       GTK_EVENTS_FLUSH();
 }
 
 static void textview_show_html(TextView *textview, FILE *fp,