aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog13
-rw-r--r--mail/mail-session.c36
2 files changed, 25 insertions, 24 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 76bdeef232..bbd5e8293b 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,10 +1,13 @@
2005-12-13 Tor Lillqvist <tml@novell.com>
- * mail-mt.c: Add copyright blurb. Include just <gtk/gtk.h> and not
- a handful of individual gtk headers. Harmonize #include order and
- syntax. Use pthread_equal() to compare pthread_t values. Use
- separate flag field to indicate whether a pthread_t field is valid
- or not. Use e_util_pthread_id() in debugging output.
+ * mail-mt.c: Add copyright blurb. Use separate flag field to
+ indicate whether a pthread_t field is valid or not. Use
+ e_util_pthread_id() in debugging output.
+
+ * mail-mt.c
+ * mail-session.c: Include just <gtk/gtk.h> and not a handful of
+ individual gtk headers. Harmonize #include order and syntax. Use
+ pthread_equal() to compare pthread_t values.
(em_channel_setup): Call g_io_channel_win32_new_socket() on Win32
instead of g_io_channel_unix_new(). This avoids the occasional
diff --git a/mail/mail-session.c b/mail/mail-session.c
index f38fcd98fd..b132130616 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -19,42 +19,39 @@
*
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <stdlib.h>
#include <string.h>
-#include <gtk/gtkdialog.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkmessagedialog.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkbox.h>
-#include <gtk/gtkvbox.h>
-#include <gtk/gtkcheckbutton.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+
+#include <gtk/gtk.h>
#include <gconf/gconf-client.h>
#include <libgnome/gnome-config.h>
#include <libgnome/gnome-sound.h>
+#include <libedataserverui/e-passwords.h>
+#include <libedataserver/e-msgport.h>
+
#include <camel/camel.h> /* FIXME: this is where camel_init is defined, it shouldn't include everything else */
-#include "camel/camel-filter-driver.h"
+#include <camel/camel-filter-driver.h>
#include <camel/camel-i18n.h>
+#include "e-util/e-error.h"
+#include "e-util/e-util-private.h"
+
#include "em-filter-context.h"
#include "em-filter-rule.h"
#include "mail-component.h"
#include "mail-config.h"
-#include "mail-session.h"
-#include "mail-tools.h"
#include "mail-mt.h"
#include "mail-ops.h"
-#include <libedataserverui/e-passwords.h>
-#include "libedataserver/e-msgport.h"
-#include "e-util/e-error.h"
+#include "mail-session.h"
+#include "mail-tools.h"
#define d(x)
@@ -375,7 +372,7 @@ alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt
if (cancel)
user_message_reply = e_msgport_new ();
m = mail_msg_new (&user_message_op, user_message_reply, sizeof (*m));
- m->ismain = pthread_self() == mail_gui_thread;
+ m->ismain = pthread_equal(pthread_self(), mail_gui_thread);
m->type = type;
m->prompt = g_strdup(prompt);
m->allow_cancel = cancel;
@@ -460,9 +457,10 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException
gconf = mail_config_get_gconf_client ();
user = g_strdup_printf ("%s/mail/filters.xml", mail_component_peek_base_directory (mail_component_peek ()));
- system = EVOLUTION_PRIVDATADIR "/filtertypes.xml";
+ system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
fc = (RuleContext *) em_filter_context_new ();
rule_context_load (fc, system, user);
+ g_free (system);
g_free (user);
driver = camel_filter_driver_new (session);
@@ -476,7 +474,7 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException
filename = gconf_client_get_string (gconf, "/apps/evolution/mail/filters/logfile", NULL);
if (filename) {
- ms->filter_logfile = fopen (filename, "a+");
+ ms->filter_logfile = g_fopen (filename, "a+");
g_free (filename);
}
}