aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-display.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-03-08 02:34:14 +0800
committerDan Winship <danw@src.gnome.org>2002-03-08 02:34:14 +0800
commitd6f174ad5110ce2b86f5a4eb45d658b13735b26d (patch)
tree6ab0a115dfbf42e2b7a7c606d0fbcf47038da7b1 /mail/mail-display.c
parent127d736b662ef0015bdc6591bbc3bfe99037b413 (diff)
downloadgsoc2013-evolution-d6f174ad5110ce2b86f5a4eb45d658b13735b26d.tar
gsoc2013-evolution-d6f174ad5110ce2b86f5a4eb45d658b13735b26d.tar.gz
gsoc2013-evolution-d6f174ad5110ce2b86f5a4eb45d658b13735b26d.tar.bz2
gsoc2013-evolution-d6f174ad5110ce2b86f5a4eb45d658b13735b26d.tar.lz
gsoc2013-evolution-d6f174ad5110ce2b86f5a4eb45d658b13735b26d.tar.xz
gsoc2013-evolution-d6f174ad5110ce2b86f5a4eb45d658b13735b26d.tar.zst
gsoc2013-evolution-d6f174ad5110ce2b86f5a4eb45d658b13735b26d.zip
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
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r--mail/mail-display.c19
1 files changed, 9 insertions, 10 deletions
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,
"<!doctype html public \"-//W3C//DTD HTML 4.0 TRANSITIONAL//EN\">\n"
"<html>\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);
}