From: Colin Leroy Date: Sun, 17 Dec 2006 11:54:09 +0000 (+0000) Subject: 2006-12-17 [colin] 2.6.1cvs45 X-Git-Tag: rel_2_7_0~77 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=e5389bc54865b2892546d775793b8d63fc2f7198 2006-12-17 [colin] 2.6.1cvs45 * src/gtk/logwindow.c Fix bug 1067, 'Claws-Mail uses 100% CPU on an IMAP folder and is blocked on main thread': make sure we put utf8 in the log. --- diff --git a/ChangeLog b/ChangeLog index 16c9c2556..db32b19c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-12-17 [colin] 2.6.1cvs45 + + * src/gtk/logwindow.c + Fix bug 1067, 'Claws-Mail uses 100% CPU on an + IMAP folder and is blocked on main thread': + make sure we put utf8 in the log. + 2006-12-16 [colin] 2.6.1cvs44 * src/toolbar.c diff --git a/PATCHSETS b/PATCHSETS index 393838fed..79e20908d 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -2152,3 +2152,4 @@ ( cvs diff -u -r 1.1.2.12 -r 1.1.2.13 src/plugins/bogofilter/bogofilter_gtk.c; ) > 2.6.1cvs42.patchset ( cvs diff -u -r 1.53.2.20 -r 1.53.2.21 po/POTFILES.in; cvs diff -u -r 1.179.2.139 -r 1.179.2.140 src/imap.c; cvs diff -u -r 1.6.2.10 -r 1.6.2.11 src/common/nntp.c; cvs diff -u -r 1.23.2.10 -r 1.23.2.11 src/common/session.c; ) > 2.6.1cvs43.patchset ( cvs diff -u -r 1.43.2.56 -r 1.43.2.57 src/toolbar.c; cvs diff -u -r 1.19.2.12 -r 1.19.2.13 src/toolbar.h; ) > 2.6.1cvs44.patchset +( cvs diff -u -r 1.1.4.22 -r 1.1.4.23 src/gtk/logwindow.c; ) > 2.6.1cvs45.patchset diff --git a/configure.ac b/configure.ac index f4b948a3a..03df00ef9 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=6 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=44 +EXTRA_VERSION=45 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/gtk/logwindow.c b/src/gtk/logwindow.c index cc4a3b63c..7d4e07c3a 100644 --- a/src/gtk/logwindow.c +++ b/src/gtk/logwindow.c @@ -291,9 +291,17 @@ static gboolean log_window_append(gpointer source, gpointer data) if (head) gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, head, -1, tag, NULL); - gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, logtext->text, -1, - tag, NULL); + if (!g_utf8_validate(logtext->text, -1, NULL)) { + gchar * mybuf = g_malloc(strlen(logtext->text)*2 +1); + conv_localetodisp(mybuf, strlen(logtext->text)*2 +1, logtext->text); + gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, mybuf, -1, + tag, NULL); + g_free(mybuf); + } else { + gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, logtext->text, -1, + tag, NULL); + } gtk_text_buffer_get_start_iter(buffer, &iter); if (logwindow->clip)