From d6f174ad5110ce2b86f5a4eb45d658b13735b26d Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 7 Mar 2002 18:34:14 +0000 Subject: Update for storage changes: explicitly create a root folder. * component-factory.c (add_storage): Update for storage changes: explicitly create a root folder. * mail-display.c (mail_display_render): Fix the "don't scroll back to the top of the HTML widget when opening an attachment" hack again by moving it here from mail_display_redisplay(). (It has to happen after the gtk_html_begin.) (mail_display_redisplay): Pass reset_scroll arg to mail_display_render. * mail-callbacks.c (do_mail_print): Pass reset_scroll (TRUE) to mail_display_render. svn path=/trunk/; revision=15967 --- mail/mail-display.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'mail/mail-display.c') diff --git a/mail/mail-display.c b/mail/mail-display.c index 69656c5d0f..3b82856107 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -1450,7 +1450,7 @@ clear_data (CamelObject *object, gpointer event_data, gpointer user_data) } void -mail_display_render (MailDisplay *md, GtkHTML *html) +mail_display_render (MailDisplay *md, GtkHTML *html, gboolean reset_scroll) { GtkHTMLStream *stream; @@ -1458,7 +1458,11 @@ mail_display_render (MailDisplay *md, GtkHTML *html) g_return_if_fail (GTK_IS_HTML (html)); stream = gtk_html_begin (html); - + if (!reset_scroll) { + /* This is a hack until there's a clean way to do this. */ + GTK_HTML (md->html)->engine->newPage = FALSE; + } + mail_html_write (html, stream, "\n" "\n" @@ -1479,12 +1483,12 @@ mail_display_render (MailDisplay *md, GtkHTML *html) /** * mail_display_redisplay: * @mail_display: the mail display object - * @unscroll: specifies whether or not to lose current scroll + * @reset_scroll: specifies whether or not to reset current scroll * * Force a redraw of the message display. **/ void -mail_display_redisplay (MailDisplay *md, gboolean unscroll) +mail_display_redisplay (MailDisplay *md, gboolean reset_scroll) { if (GTK_OBJECT_DESTROYED (md)) return; @@ -1493,12 +1497,7 @@ mail_display_redisplay (MailDisplay *md, gboolean unscroll) md->redisplay_counter++; /* printf ("md %p redisplay %d\n", md, md->redisplay_counter); */ - if (!unscroll) { - /* This is a hack until there's a clean way to do this. */ - GTK_HTML (md->html)->engine->newPage = FALSE; - } - - mail_display_render (md, md->html); + mail_display_render (md, md->html, reset_scroll); } -- cgit