aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--mail/ChangeLog17
-rw-r--r--mail/component-factory.c3
-rw-r--r--mail/mail-callbacks.c2
-rw-r--r--mail/mail-display.c19
-rw-r--r--mail/mail-display.h4
5 files changed, 31 insertions, 14 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d97ba77710..576ff81b2e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,20 @@
+2002-03-07 Dan Winship <danw@ximian.com>
+
+ * component-factory.c (add_storage): Update for storage changes:
+ explicitly create a root folder.
+
+2002-03-06 Dan Winship <danw@ximian.com>
+
+ * 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.
+
2002-03-05 Dan Winship <danw@ximian.com>
* folder-browser-ui.c: Don't try to set pixmap for
diff --git a/mail/component-factory.c b/mail/component-factory.c
index aa664ded39..4f5c886e3d 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -1209,7 +1209,8 @@ add_storage (const char *name, const char *uri, CamelService *store,
EvolutionStorage *storage;
EvolutionStorageResult res;
- storage = evolution_storage_new (name, uri, "mailstorage");
+ storage = evolution_storage_new (name);
+ evolution_storage_new_folder (storage, "/", name, "mailstorage", uri, "", 0);
gtk_signal_connect (GTK_OBJECT (storage), "create_folder", storage_create_folder, store);
gtk_signal_connect (GTK_OBJECT (storage), "remove_folder", storage_remove_folder, store);
gtk_signal_connect ((GtkObject *)storage, "xfer_folder", storage_xfer_folder, store);
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 4ffc4e4c78..5cec76bafb 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -2871,7 +2871,7 @@ do_mail_print (FolderBrowser *fb, gboolean preview)
user's theme. */
fb->mail_display->printing = TRUE;
- mail_display_render (fb->mail_display, html);
+ mail_display_render (fb->mail_display, html, TRUE);
gtk_html_print_set_master (html, print_master);
info = footer_info_new (html, print_context, &line);
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);
}
diff --git a/mail/mail-display.h b/mail/mail-display.h
index afdfe8b59b..aa1960fc8d 100644
--- a/mail/mail-display.h
+++ b/mail/mail-display.h
@@ -60,8 +60,8 @@ GtkWidget * mail_display_new (void);
void mail_display_initialize_gtkhtml (MailDisplay *mail_display, GtkHTML *html);
void mail_display_queue_redisplay (MailDisplay *mail_display);
-void mail_display_render (MailDisplay *mail_display, GtkHTML *html);
-void mail_display_redisplay (MailDisplay *mail_display, gboolean unscroll);
+void mail_display_render (MailDisplay *mail_display, GtkHTML *html, gboolean reset_scroll);
+void mail_display_redisplay (MailDisplay *mail_display, gboolean reset_scroll);
void mail_display_redisplay_when_loaded (MailDisplay *md,
gconstpointer key,
void (*callback)(MailDisplay *, gpointer),