diff options
author | Tor Lillqvist <tml@novell.com> | 2005-12-18 01:52:32 +0800 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2005-12-18 01:52:32 +0800 |
commit | 88a30eea1d70a3cc1ec18c0f074cb2e997b874f6 (patch) | |
tree | bea260383a637e62f7eff50928a84b09d7565e92 /mail | |
parent | e8b060a9d4c63cee772403c04a4285e309bc5fd7 (diff) | |
download | gsoc2013-evolution-88a30eea1d70a3cc1ec18c0f074cb2e997b874f6.tar.gz gsoc2013-evolution-88a30eea1d70a3cc1ec18c0f074cb2e997b874f6.tar.zst gsoc2013-evolution-88a30eea1d70a3cc1ec18c0f074cb2e997b874f6.zip |
Harmonize #include order and syntax. Use pthread_equal() to compare
2005-12-17 Tor Lillqvist <tml@novell.com>
* mail-vfolder.c: Harmonize #include order and syntax. Use
pthread_equal() to compare pthread_t values.
* mail-vfolder.c: Use gstdio wrappers. Construct XML file pathname
at run-time.
svn path=/trunk/; revision=30840
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/mail-vfolder.c | 44 |
2 files changed, 30 insertions, 24 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index d9489a11c7..2f89500b4f 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,11 +1,12 @@ -2005-12-13 Tor Lillqvist <tml@novell.com> +2005-12-17 Tor Lillqvist <tml@novell.com> * 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 + * mail-session.c + * mail-vfolder.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. @@ -17,8 +18,9 @@ * mail-ops.c: Use gstdio wrappers. Open file in binary mode. - * mail-signature-editor.c: Use gstdio wrappers. Construct UI XML - file pathname at run-time. + * mail-signature-editor.c + * mail-vfolder.c: Use gstdio wrappers. Construct XML file pathname + at run-time. * mail-tools.c: Use gstdio wrappers. Beautify #include order and syntax. diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index 32411513c8..1f06bd121c 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -20,34 +20,34 @@ * */ -#ifdef HAVE_CONFIG_H #include <config.h> -#endif -#include <glib.h> #include <string.h> + +#include <glib.h> + #include <libgnome/gnome-i18n.h> -#include "mail-component.h" -#include "mail-config.h" -#include "mail-vfolder.h" -#include "mail-tools.h" -#include "mail-autofilter.h" -#include "mail-folder-cache.h" -#include "mail-ops.h" -#include "mail-mt.h" -#include "em-utils.h" +#include <camel/camel-vee-folder.h> +#include <camel/camel-vee-store.h> +#include <camel/camel-vtrash-folder.h> #include "e-util/e-account-list.h" #include "e-util/e-error.h" +#include "e-util/e-util-private.h" -#include "camel/camel-vee-folder.h" -#include "camel/camel-vee-store.h" -#include "camel/camel-vtrash-folder.h" - +#include "em-utils.h" #include "em-vfolder-context.h" #include "em-vfolder-editor.h" #include "em-vfolder-rule.h" +#include "mail-autofilter.h" +#include "mail-component.h" +#include "mail-config.h" +#include "mail-folder-cache.h" +#include "mail-mt.h" +#include "mail-ops.h" +#include "mail-tools.h" +#include "mail-vfolder.h" #define d(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__), (x))*/ @@ -447,7 +447,7 @@ mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove) return; } - g_assert(pthread_self() == mail_gui_thread); + g_assert(pthread_equal(pthread_self(), mail_gui_thread)); is_ignore = uri_is_ignore(store, curi); @@ -542,7 +542,7 @@ mail_vfolder_delete_uri(CamelStore *store, const char *curi) d(printf ("Deleting uri to check: %s\n", uri)); - g_assert (pthread_self() == mail_gui_thread); + g_assert (pthread_equal(pthread_self(), mail_gui_thread)); changed = g_string_new (""); @@ -617,7 +617,7 @@ mail_vfolder_rename_uri(CamelStore *store, const char *cfrom, const char *cto) if (context == NULL || uri_is_spethal(store, cfrom) || uri_is_spethal(store, cto)) return; - g_assert(pthread_self() == mail_gui_thread); + g_assert(pthread_equal(pthread_self(), mail_gui_thread)); from = em_uri_from_camel(cfrom); to = em_uri_from_camel(cto); @@ -915,6 +915,7 @@ vfolder_load_storage(void) { char *user, *storeuri; FilterRule *rule; + char *xmlfile; vfolder_hash = g_hash_table_new(g_str_hash, g_str_equal); @@ -939,10 +940,13 @@ vfolder_load_storage(void) /* load our rules */ user = g_strdup_printf ("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ())); context = em_vfolder_context_new (); + + xmlfile = g_build_filename (EVOLUTION_PRIVDATADIR, "vfoldertypes.xml", NULL); if (rule_context_load ((RuleContext *)context, - EVOLUTION_PRIVDATADIR "/vfoldertypes.xml", user) != 0) { + xmlfile, user) != 0) { g_warning("cannot load vfolders: %s\n", ((RuleContext *)context)->error); } + g_free (xmlfile); g_free (user); g_signal_connect(context, "rule_added", G_CALLBACK(context_rule_added), context); |