aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-05-07 05:39:10 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-05-07 05:39:10 +0800
commit65431a334743819884c494cc05ac2d8a43efff2f (patch)
tree4307467b08896a93dd6b460ac2d402e184c717af /mail
parent0425bffaf1c34bb5a547ceacc64ba6b71a005ac0 (diff)
downloadgsoc2013-evolution-65431a334743819884c494cc05ac2d8a43efff2f.tar
gsoc2013-evolution-65431a334743819884c494cc05ac2d8a43efff2f.tar.gz
gsoc2013-evolution-65431a334743819884c494cc05ac2d8a43efff2f.tar.bz2
gsoc2013-evolution-65431a334743819884c494cc05ac2d8a43efff2f.tar.lz
gsoc2013-evolution-65431a334743819884c494cc05ac2d8a43efff2f.tar.xz
gsoc2013-evolution-65431a334743819884c494cc05ac2d8a43efff2f.tar.zst
gsoc2013-evolution-65431a334743819884c494cc05ac2d8a43efff2f.zip
Flush the filter log to make Tuomas happy :-)
2002-05-06 Jeffrey Stedfast <fejj@ximian.com> * mail-ops.c (filter_folder_free): Flush the filter log to make Tuomas happy :-) * mail-session.c (mail_session_flush_filter_log): New convenience function to flush the session's filter log file. svn path=/trunk/; revision=16696
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-callbacks.c16
-rw-r--r--mail/mail-ops.c3
-rw-r--r--mail/mail-session.c10
-rw-r--r--mail/mail-session.h2
5 files changed, 29 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 61c2891b8a..72fed87028 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,11 @@
2002-05-06 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-ops.c (filter_folder_free): Flush the filter log to make
+ Tuomas happy :-)
+
+ * mail-session.c (mail_session_flush_filter_log): New convenience
+ function to flush the session's filter log file.
+
* mail-callbacks.c (mail_reply): Set the Seen flag as well since
it's safe to assume that if the user has replied to an email
message that he has read it. Not always true, but usually ;-)
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index dc61f7267d..f57a30e7bb 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -2860,13 +2860,13 @@ do_mail_print (FolderBrowser *fb, gboolean preview)
if (printer)
gnome_print_master_set_printer (print_master, printer);
- paper = gnome_paper_with_name (_("US-Letter"));
+ paper = (GnomePaper *) gnome_paper_with_name (_("US-Letter"));
if (!paper)
- paper = gnome_paper_with_name (gnome_paper_name_default ());
+ paper = (GnomePaper *) gnome_paper_with_name (gnome_paper_name_default ());
gnome_print_master_set_paper (print_master, paper);
gnome_print_master_set_copies (print_master, copies, collate);
print_context = gnome_print_master_get_context (print_master);
-
+
html = GTK_HTML (gtk_html_new ());
mail_display_initialize_gtkhtml (fb->mail_display, html);
@@ -2874,16 +2874,16 @@ do_mail_print (FolderBrowser *fb, gboolean preview)
to ignoring any adjustments we made to accomodate the
user's theme. */
fb->mail_display->printing = TRUE;
-
+
mail_display_render (fb->mail_display, html, TRUE);
gtk_html_print_set_master (html, print_master);
-
+
info = footer_info_new (html, print_context, &line);
gtk_html_print_with_header_footer (html, print_context, 0.0, line, NULL, footer_print_cb, info);
footer_info_free (info);
-
+
fb->mail_display->printing = FALSE;
-
+
gnome_print_master_close (print_master);
if (preview){
@@ -2901,7 +2901,7 @@ do_mail_print (FolderBrowser *fb, gboolean preview)
_("Printing of message failed"));
}
}
-
+
/* FIXME: We are leaking the GtkHTML object */
}
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 13cd285f37..ae01d43c9c 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -43,6 +43,7 @@
#include "mail-tools.h"
#include "mail-ops.h"
#include "mail-vfolder.h"
+#include "mail-session.h"
#include "composer/e-msg-composer.h"
#include "folder-browser.h"
#include "e-util/e-html-utils.h"
@@ -167,6 +168,8 @@ filter_folder_free (struct _mail_msg *mm)
if (m->driver)
camel_object_unref (CAMEL_OBJECT (m->driver));
+
+ mail_session_flush_filter_log ();
}
static struct _mail_msg_op filter_folder_op = {
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 20f72762cd..02a67f4ee7 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -1025,3 +1025,13 @@ mail_session_forget_passwords (BonoboUIComponent *uih, void *user_data,
{
e_passwords_forget_passwords ();
}
+
+
+void
+mail_session_flush_filter_log (void)
+{
+ MailSession *ms = (MailSession *) session;
+
+ if (ms->filter_logfile)
+ fflush (ms->filter_logfile);
+}
diff --git a/mail/mail-session.h b/mail/mail-session.h
index 40ff736c87..60779156a7 100644
--- a/mail/mail-session.h
+++ b/mail/mail-session.h
@@ -46,6 +46,8 @@ void mail_session_remember_password (const char *url);
void mail_session_forget_password (const char *key);
+void mail_session_flush_filter_log (void);
+
extern CamelSession *session;
#ifdef __cplusplus