From 9093a7c17246117f5c71176d2018e740462cdea0 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 17 Dec 2005 17:43:19 +0000 Subject: Include just and not a handful of individual gtk headers. 2005-12-13 Tor Lillqvist * mail-session.c: Include just and not a handful of individual gtk headers. Harmonize #include order and syntax. Use pthread_equal() to compare pthread_t values. svn path=/trunk/; revision=30837 --- mail/ChangeLog | 13 ++++++++----- mail/mail-session.c | 36 +++++++++++++++++------------------- 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 - * mail-mt.c: Add copyright blurb. Include just 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 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 -#endif #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include + +#include #include #include #include +#include +#include + #include /* FIXME: this is where camel_init is defined, it shouldn't include everything else */ -#include "camel/camel-filter-driver.h" +#include #include +#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 -#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); } } -- cgit