aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-tools.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-07-11 23:31:15 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-07-12 10:25:06 +0800
commiteb29179da623f9cf4abd663577395a085452ca18 (patch)
treea7eec4690f254d4cb9048ca87a5e7f401a2e74ae /mail/mail-tools.c
parentbeb8e74577f695d0d3c2efea52dc10c2136f0135 (diff)
downloadgsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.gz
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.bz2
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.lz
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.xz
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.tar.zst
gsoc2013-evolution-eb29179da623f9cf4abd663577395a085452ca18.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r--mail/mail-tools.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 22dfb54e22..25eaac5f44 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -74,7 +74,9 @@ is_local_provider (CamelStore *store)
}
CamelFolder *
-mail_tool_get_trash (const gchar *url, gint connect, GError **error)
+mail_tool_get_trash (const gchar *url,
+ gint connect,
+ GError **error)
{
CamelStore *store;
CamelFolder *trash;
@@ -88,7 +90,9 @@ mail_tool_get_trash (const gchar *url, gint connect, GError **error)
if (!store)
return NULL;
- if (connect || ((CamelService *) store)->status == CAMEL_SERVICE_CONNECTED || is_local_provider (store))
+ if (connect ||
+ (CAMEL_SERVICE (store)->status == CAMEL_SERVICE_CONNECTED ||
+ is_local_provider (store)))
trash = camel_store_get_trash (store, error);
else
trash = NULL;
@@ -101,7 +105,8 @@ mail_tool_get_trash (const gchar *url, gint connect, GError **error)
#ifndef G_OS_WIN32
static gchar *
-mail_tool_get_local_movemail_path (const guchar *uri, GError **error)
+mail_tool_get_local_movemail_path (const guchar *uri,
+ GError **error)
{
guchar *safe_uri, *c;
const gchar *data_dir;
@@ -244,10 +249,15 @@ mail_tool_remove_xevolution_headers (CamelMimeMessage *message)
}
void
-mail_tool_restore_xevolution_headers (CamelMimeMessage *message, struct _camel_header_raw *xev)
+mail_tool_restore_xevolution_headers (CamelMimeMessage *message,
+ struct _camel_header_raw *xev)
{
+ CamelMedium *medium;
+
+ medium = CAMEL_MEDIUM (message);
+
for (;xev;xev=xev->next)
- camel_medium_add_header((CamelMedium *)message, xev->name, xev->value);
+ camel_medium_add_header (medium, xev->name, xev->value);
}
CamelMimePart *
@@ -397,6 +407,7 @@ mail_tools_x_evolution_message_parse (gchar *in, guint inlen, GPtrArray **uids)
gchar *
mail_tools_folder_to_url (CamelFolder *folder)
{
+ CamelService *service;
CamelStore *parent_store;
const gchar *full_name;
CamelURL *url;
@@ -406,9 +417,10 @@ mail_tools_folder_to_url (CamelFolder *folder)
full_name = camel_folder_get_full_name (folder);
parent_store = camel_folder_get_parent_store (folder);
+ service = CAMEL_SERVICE (parent_store);
- url = camel_url_copy(((CamelService *)parent_store)->url);
- if (((CamelService *)parent_store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) {
+ url = camel_url_copy (service->url);
+ if (service->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) {
camel_url_set_fragment(url, full_name);
} else {
gchar *name = g_alloca(strlen(full_name)+2);