From b5a7aee5378ae0d233515c06d08718311b2bafbb Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Fri, 29 Jun 2001 21:42:29 +0000 Subject: Put in the hack to stop GtkHTML from returning to the top of the page. svn path=/trunk/; revision=10610 --- my-evolution/ChangeLog | 5 +++++ my-evolution/e-summary.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'my-evolution') diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index c57f6b0449..0bdf41d197 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,8 @@ +2001-06-29 Iain Holmes + + * e-summary.c (e_summary_draw): Resurrect the hack to stop GtkHTML from + returning to the top when it's redrawn. + 2001-06-29 Iain Holmes * e-summary-preferences.c (property_box_destroy_cb): Hook up the saving. diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c index 5a0dcbd0b9..8504fdaf64 100644 --- a/my-evolution/e-summary.c +++ b/my-evolution/e-summary.c @@ -101,6 +101,7 @@ void e_summary_draw (ESummary *summary) { GString *string; + GtkHTMLStream *stream; char *html; char date[256]; time_t t; @@ -136,8 +137,12 @@ e_summary_draw (ESummary *summary) g_string_append (string, html); g_string_append (string, HTML_5); - gtk_html_load_from_string (GTK_HTML (summary->priv->html), string->str, - strlen (string->str)); + + stream = gtk_html_begin (GTK_HTML (summary->priv->html)); + GTK_HTML (summary->priv->html)->engine->newPage = FALSE; + gtk_html_write (GTK_HTML (summary->priv->html), stream, string->str, strlen (string->str)); + gtk_html_end (GTK_HTML (summary->priv->html), stream, GTK_HTML_STREAM_OK); + g_string_free (string, TRUE); } -- cgit v1.2.3