[evolution-ews] Coding style and whitespace cleanup.



commit 6d7e6d2abcc7727e0e103fba3f2d344d48f195fd
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Aug 3 19:42:12 2012 -0400

    Coding style and whitespace cleanup.

 src/addressbook/e-book-backend-ews.c               |   97 ++++---
 src/addressbook/ews-book-backend-sqlitedb-test.c   |    6 +-
 src/addressbook/ews-book-backend-sqlitedb.c        |  165 +++++++-----
 src/addressbook/ews-oab-decoder.c                  |   28 +-
 src/calendar/e-cal-backend-ews-utils.c             |  137 +++++-----
 src/calendar/e-cal-backend-ews.c                   |  286 +++++++++++---------
 src/camel/camel-ews-folder.c                       |  148 ++++++-----
 src/camel/camel-ews-store-summary.c                |  179 +++++++-----
 src/camel/camel-ews-store.c                        |  118 +++++----
 src/camel/camel-ews-transport.c                    |   27 ++-
 src/camel/camel-ews-utils.c                        |   89 ++++---
 src/collection/e-ews-backend.c                     |    4 +-
 src/configuration/e-ews-config-ui-extension.c      |    2 +-
 src/configuration/e-ews-config-utils.c             |  155 ++++++-----
 src/configuration/e-ews-edit-folder-permissions.c  |  184 ++++++++-----
 src/configuration/e-ews-search-user.c              |   50 ++--
 .../e-mail-config-ews-delegates-page.c             |  146 ++++++-----
 src/configuration/e-mail-config-ews-ooo-page.c     |    3 +-
 src/server/camel-ews-settings.c                    |    2 +-
 src/server/e-ews-connection.c                      |  212 ++++++++-------
 src/server/e-ews-folder.c                          |    4 +-
 src/server/e-ews-item-change.c                     |   62 +++--
 src/server/e-ews-item-change.h                     |    1 -
 src/server/e-ews-item.c                            |  173 ++++++------
 src/server/e-ews-message.c                         |    4 +-
 src/server/e-soap-message.c                        |   36 ++-
 src/server/e-soap-response.c                       |   10 +-
 src/server/ews-errors.c                            |    7 +-
 src/server/ews-kerberos.c                          |   21 +-
 src/server/tests/test-autocompletion.c             |    5 +-
 src/server/tests/test-connection.c                 |    4 +-
 src/server/tests/test-createfolder.c               |    3 +-
 src/server/tests/test-cuditem.c                    |    6 +-
 src/server/tests/test-deletefolder.c               |    3 +-
 src/server/tests/test-get-oof-settings.c           |    5 +-
 src/server/tests/test-getattachment.c              |    2 +-
 src/server/tests/test-syncfolder.c                 |   16 +-
 src/utils/e-ews-query-to-restriction.c             |   71 +++---
 src/utils/ews-camel-common.c                       |   23 +-
 39 files changed, 1377 insertions(+), 1117 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index 8dd1ec0..a3c534c 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -447,10 +447,10 @@ ebews_set_full_name (ESoapMessage *msg,
 		return;
 
 	if (name->given)
-		e_ews_message_write_string_parameter(msg, "GivenName", NULL, name->given);
+		e_ews_message_write_string_parameter (msg, "GivenName", NULL, name->given);
 
 	if (name->additional && *name->additional)
-		e_ews_message_write_string_parameter(msg, "MiddleName", NULL, name->additional);
+		e_ews_message_write_string_parameter (msg, "MiddleName", NULL, name->additional);
 
 	e_contact_name_free (name);
 }
@@ -468,10 +468,11 @@ ebews_set_birth_date (ESoapMessage *message,
 	if (!date)
 		return;
 
-	birthday = g_strdup_printf("%04d-%02d-%02dT00:00:00",
-			      date->year, date->month, date->day);
+	birthday = g_strdup_printf (
+		"%04d-%02d-%02dT00:00:00",
+		date->year, date->month, date->day);
 
-	e_ews_message_write_string_parameter(message, "Birthday", NULL, birthday);
+	e_ews_message_write_string_parameter (message, "Birthday", NULL, birthday);
 
 	g_free (birthday);
 
@@ -499,7 +500,7 @@ add_entry (ESoapMessage *msg,
 		if (include_hdr)
 			e_soap_message_start_element (msg, include_hdr, NULL, NULL);
 
-		e_ews_message_write_string_parameter_with_attribute(msg, "Entry", NULL, entry_val, "Key", entry_name);
+		e_ews_message_write_string_parameter_with_attribute (msg, "Entry", NULL, entry_val, "Key", entry_name);
 
 		g_free (entry_val);
 		return TRUE;
@@ -619,14 +620,14 @@ convert_indexed_contact_property_to_updatexml (ESoapMessage *message,
 {
 	gboolean delete_field = FALSE;
 
-	if(!value || !g_strcmp0(value, ""))
+	if (!value || !g_strcmp0 (value, ""))
 		delete_field = TRUE;
 	e_ews_message_start_set_indexed_item_field (message, name , prefix, "Contact", key, delete_field);
 
 	if (!delete_field)
 	{
 		e_soap_message_start_element (message, element_name, NULL, NULL);
-		e_ews_message_write_string_parameter_with_attribute(message, "Entry", NULL, value, "Key", key);
+		e_ews_message_write_string_parameter_with_attribute (message, "Entry", NULL, value, "Key", key);
 		e_soap_message_end_element (message);
 	}
 	e_ews_message_end_set_indexed_item_field (message, delete_field);
@@ -645,10 +646,10 @@ ebews_set_full_name_changes (ESoapMessage *message,
 		return;
 
 	if (g_ascii_strcasecmp (name->given, old_name->given))
-		convert_contact_property_to_updatexml(message, "GivenName", name->given, "contacts", NULL, NULL);
+		convert_contact_property_to_updatexml (message, "GivenName", name->given, "contacts", NULL, NULL);
 
 	if (g_ascii_strcasecmp (name->additional, old_name->additional))
-		convert_contact_property_to_updatexml(message, "MiddleName", name->additional, "contacts", NULL, NULL);
+		convert_contact_property_to_updatexml (message, "MiddleName", name->additional, "contacts", NULL, NULL);
 
 	e_contact_name_free (name);
 	e_contact_name_free (old_name);
@@ -669,10 +670,11 @@ ebews_set_birth_date_changes (ESoapMessage *message,
 	if (e_contact_date_equal (new_date, old_date))
 		return;
 
-	birthday = g_strdup_printf("%04d-%02d-%02dT00:00:00",
-			      new_date->year, new_date->month, new_date->day);
+	birthday = g_strdup_printf (
+		"%04d-%02d-%02dT00:00:00",
+		new_date->year, new_date->month, new_date->day);
 
-	convert_contact_property_to_updatexml(message, "Birthday", birthday, "contacts", NULL, NULL);
+	convert_contact_property_to_updatexml (message, "Birthday", birthday, "contacts", NULL, NULL);
 	g_free (birthday);
 }
 
@@ -717,7 +719,7 @@ convert_indexed_contact_property_to_updatexml_physical_address (ESoapMessage *me
 	gchar * fielduri = NULL;
 	gboolean delete_field = FALSE;
 
-	if(!value || !g_strcmp0(value, ""))
+	if (!value || !g_strcmp0 (value, ""))
 		delete_field = TRUE;
 
 	fielduri = g_strconcat (name, ":", uri_element, NULL);
@@ -781,9 +783,9 @@ ebews_set_address_changes (ESoapMessage *message,
                            EContact *new,
                            EContact *old)
 {
-	compare_address(message, new, old, E_CONTACT_ADDRESS_WORK, "Business");
-	compare_address(message, new, old, E_CONTACT_ADDRESS_HOME, "Home");
-	compare_address(message, new, old, E_CONTACT_ADDRESS_OTHER, "Other");
+	compare_address (message, new, old, E_CONTACT_ADDRESS_WORK, "Business");
+	compare_address (message, new, old, E_CONTACT_ADDRESS_HOME, "Home");
+	compare_address (message, new, old, E_CONTACT_ADDRESS_OTHER, "Other");
 }
 
 static void
@@ -884,7 +886,7 @@ convert_contact_to_xml (ESoapMessage *msg,
 	gint i, element_type;
 
 	/* Prepare Contact node in the SOAP message */
-	e_soap_message_start_element(msg, "Contact", NULL, NULL);
+	e_soap_message_start_element (msg, "Contact", NULL, NULL);
 
 	for (i = 0; i < G_N_ELEMENTS (mappings); i++) {
 		element_type = mappings[i].element_type;
@@ -947,7 +949,7 @@ ews_create_contact_cb (GObject *object,
 	}
 
 	if (error) {
-		g_warning("Error while Creating contact: %s", error->message);
+		g_warning ("Error while Creating contact: %s", error->message);
 		e_data_book_respond_create_contacts (create_contact->book, create_contact->opid, EDB_ERROR_EX (OTHER_ERROR, error->message), NULL);
 	}
 
@@ -971,10 +973,11 @@ e_book_backend_ews_create_contacts (EBookBackend *backend,
 	EBookBackendEwsPrivate *priv;
 
 	if (vcards->next != NULL) {
-		e_data_book_respond_create_contacts (book, opid,
-						     EDB_ERROR_EX (NOT_SUPPORTED,
-						     _("The backend does not support bulk additions")),
-						     NULL);
+		e_data_book_respond_create_contacts (
+			book, opid,
+			EDB_ERROR_EX (NOT_SUPPORTED,
+			_("The backend does not support bulk additions")),
+			NULL);
 		return;
 	}
 
@@ -1180,7 +1183,7 @@ ews_modify_contact_cb (GObject *object,
 	}
 
 	if (error) {
-		g_warning("Error while Modifying contact: %s", error->message);
+		g_warning ("Error while Modifying contact: %s", error->message);
 
 		e_data_book_respond_modify_contacts (modify_contact->book, modify_contact->opid, EDB_ERROR_EX (OTHER_ERROR, error->message), NULL);
 	}
@@ -1208,8 +1211,9 @@ convert_contact_to_updatexml (ESoapMessage *msg,
 	id->id = e_contact_get (old_contact, E_CONTACT_UID);
 	id->change_key = e_contact_get (old_contact, E_CONTACT_REV);
 
-	e_ews_message_start_item_change (msg, E_EWS_ITEMCHANGE_TYPE_ITEM,
-					 id->id, id->change_key, 0);
+	e_ews_message_start_item_change (
+		msg, E_EWS_ITEMCHANGE_TYPE_ITEM,
+		id->id, id->change_key, 0);
 
 	/*Iterate for each field in contact*/
 
@@ -1219,7 +1223,7 @@ convert_contact_to_updatexml (ESoapMessage *msg,
 			value =  e_contact_get (new_contact, mappings[i].field_id);
 			old_value =  e_contact_get (old_contact, mappings[i].field_id);
 			if ((value && !old_value) || (!value && old_value) ||(value && old_value && g_ascii_strcasecmp (value, old_value)))
-				convert_contact_property_to_updatexml(msg, mappings[i].element_name, value, "contacts", NULL, NULL);
+				convert_contact_property_to_updatexml (msg, mappings[i].element_name, value, "contacts", NULL, NULL);
 			if (value)
 				g_free (value);
 			if (old_value)
@@ -1250,9 +1254,10 @@ e_book_backend_ews_modify_contacts (EBookBackend *backend,
 
 	if (vcards->next != NULL) {
 		e_data_book_respond_modify_contacts (book, opid,
-						     EDB_ERROR_EX (NOT_SUPPORTED,
-		                                     _("The backend does not support bulk modifications")),
-						     NULL);
+			EDB_ERROR_EX (
+			NOT_SUPPORTED,
+			_("The backend does not support bulk modifications")),
+			NULL);
 		return;
 	}
 
@@ -1295,8 +1300,9 @@ e_book_backend_ews_modify_contacts (EBookBackend *backend,
 		return;
 	}
 
-	old_contact = ews_book_backend_sqlitedb_get_contact ( priv->ebsdb, priv->folder_id,
-				 id->id, NULL, NULL, &error);
+	old_contact = ews_book_backend_sqlitedb_get_contact (
+		priv->ebsdb, priv->folder_id,
+		id->id, NULL, NULL, &error);
 	if (!old_contact) {
 		g_object_unref (contact);
 		e_data_book_respond_modify_contacts (book, opid, EDB_ERROR (NOT_SUPPORTED), NULL);
@@ -1618,9 +1624,10 @@ e_book_backend_ews_build_restriction (const gchar *query,
 	sdata->is_query_handled = TRUE;
 
 	for (i = 0; i < G_N_ELEMENTS (symbols); i++) {
-		e_sexp_add_function (sexp, 0, (gchar *) symbols[i].name,
-				     symbols[i].func,
-				     sdata);
+		e_sexp_add_function (
+			sexp, 0, (gchar *) symbols[i].name,
+			symbols[i].func,
+			sdata);
 	}
 
 	e_sexp_input_text (sexp, query, strlen (query));
@@ -1662,7 +1669,7 @@ ews_gal_needs_update (EBookBackendEws *cbews,
 	if (seq < full->seq)
 		ret = TRUE;
 
-	d(printf ("Gal needs update: %d \n", ret);)
+	d (printf ("Gal needs update: %d \n", ret);)
 exit:
 	g_free (tmp);
 	return ret;
@@ -1708,7 +1715,7 @@ ews_download_full_gal (EBookBackendEws *cbews,
 		goto exit;
 	}
 
-	d(g_print ("OAL file decompressed %s \n", uncompress_file);)
+	d (g_print ("OAL file decompressed %s \n", uncompress_file);)
 
 exit:
 	if (comp_cache_file)
@@ -1768,7 +1775,7 @@ ews_gal_store_contact (EContact *contact,
 		GSList *l;
 		gchar *status_message = NULL;
 
-		d(g_print ("GAL adding contacts, percent complete : %d \n", percent);)
+		d (g_print ("GAL adding contacts, percent complete : %d \n", percent);)
 
 		status_message = g_strdup_printf (_("Downloading contacts in %s %d%% completed... "), priv->folder_name, percent);
 		e_book_backend_foreach_view (E_BOOK_BACKEND (data->cbews), book_view_notify_status, status_message);
@@ -1856,7 +1863,7 @@ ebews_start_gal_sync (gpointer data)
 	e_ews_connection_set_password (oab_cnc, password);
 	g_free (password);
 
-	d(printf ("Ewsgal: Fetching oal full details file \n");)
+	d (printf ("Ewsgal: Fetching oal full details file \n");)
 
 	if (!e_ews_connection_get_oal_detail_sync (
 		oab_cnc, priv->folder_id, "Full", &full_l,
@@ -1877,21 +1884,21 @@ ebews_start_gal_sync (gpointer data)
 	if (!ews_book_backend_sqlitedb_get_is_populated (priv->ebsdb, priv->folder_id, NULL) || ews_gal_needs_update (cbews, full, &error)) {
 		gchar *seq;
 
-		d(printf ("Ewsgal: Downloading full gal \n");)
+		d (printf ("Ewsgal: Downloading full gal \n");)
 		uncompressed_filename = ews_download_full_gal (cbews, full, priv->cancellable, &error);
 		if (error) {
 			ret = FALSE;
 			goto exit;
 		}
 
-		d(printf ("Ewsgal: Removing old gal \n");)
+		d (printf ("Ewsgal: Removing old gal \n");)
 		/* remove old_gal_file */
 		ret = ews_remove_old_gal_file (cbews, &error);
 		if (!ret) {
 			goto exit;
 		}
 
-		d(printf ("Ewsgal: Replacing old gal with new gal contents in db \n");)
+		d (printf ("Ewsgal: Replacing old gal with new gal contents in db \n");)
 		ret = ews_replace_gal_in_db (cbews, uncompressed_filename, priv->cancellable, &error);
 		if (!ret)
 			goto exit;
@@ -1906,7 +1913,7 @@ ebews_start_gal_sync (gpointer data)
 		}
 	}
 
-	d(printf ("Ews gal: sync successfull complete \n");)
+	d (printf ("Ews gal: sync successfull complete \n");)
 
 exit:
 	if (error) {
@@ -2083,7 +2090,7 @@ ebews_store_distribution_list_items (EBookBackendEws *ebews,
 			gint len = strlen (mb->name);
 			gchar *value;
 
-			if (mb->name [0] == '\"' && mb->name [len - 1] == '\"')
+			if (mb->name[0] == '\"' && mb->name[len - 1] == '\"')
 				value = g_strdup_printf ("%s <%s>", mb->name, mb->email);
 			else
 				value = g_strdup_printf ("\"%s\" <%s>", mb->name, mb->email);
@@ -2131,7 +2138,7 @@ ebews_vcards_append_dl (const EwsId *id,
 			gint len = strlen (mb->name);
 			gchar *value;
 
-			if (mb->name [0] == '\"' && mb->name [len - 1] == '\"')
+			if (mb->name[0] == '\"' && mb->name[len - 1] == '\"')
 				value = g_strdup_printf ("%s <%s>", mb->name, mb->email);
 			else
 				value = g_strdup_printf ("\"%s\" <%s>", mb->name, mb->email);
diff --git a/src/addressbook/ews-book-backend-sqlitedb-test.c b/src/addressbook/ews-book-backend-sqlitedb-test.c
index 9751388..e24b42c 100644
--- a/src/addressbook/ews-book-backend-sqlitedb-test.c
+++ b/src/addressbook/ews-book-backend-sqlitedb-test.c
@@ -117,9 +117,9 @@ start_tests (gpointer data)
 
 	g_print ("Creating the sqlitedb \n");
 	op = "create sqlitedb";
-	ebsdb = ews_book_backend_sqlitedb_new
-					(cache_path, email, folderid, folder_name,
-					 store_vcard, &error);
+	ebsdb = ews_book_backend_sqlitedb_new (
+		cache_path, email, folderid,
+		folder_name, store_vcard, &error);
 	if (error)
 		goto exit;
 
diff --git a/src/addressbook/ews-book-backend-sqlitedb.c b/src/addressbook/ews-book-backend-sqlitedb.c
index ec54189..0af6364 100644
--- a/src/addressbook/ews-book-backend-sqlitedb.c
+++ b/src/addressbook/ews-book-backend-sqlitedb.c
@@ -244,7 +244,7 @@ book_backend_sql_exec (sqlite3 *db,
 	}
 
 	if (ret != SQLITE_OK) {
-		d(g_print ("Error in SQL EXEC statement: %s [%s].\n", stmt, errmsg));
+		d (g_print ("Error in SQL EXEC statement: %s [%s].\n", stmt, errmsg));
 		g_set_error (
 			error, E_BOOK_SDB_ERROR,
 			0, "%s", errmsg);
@@ -292,13 +292,14 @@ create_folders_table (EwsBookBackendSqliteDB *ebsdb,
 	 * Have not included a bdata here since the keys table should suffice any
 	 * additional need that arises.
 	 */
-	const gchar *stmt = "CREATE TABLE IF NOT EXISTS folders"
-			     "( folder_id  TEXT PRIMARY KEY,"
-			     " folder_name TEXT,"
-			     "  sync_data TEXT,"
-			     " is_populated INTEGER,"
-			     "  partial_content INTEGER,"
-			     " version INTEGER)";
+	const gchar *stmt =
+		"CREATE TABLE IF NOT EXISTS folders"
+		"( folder_id  TEXT PRIMARY KEY,"
+		" folder_name TEXT,"
+		"  sync_data TEXT,"
+		" is_populated INTEGER,"
+		"  partial_content INTEGER,"
+		" version INTEGER)";
 
 	WRITER_LOCK (ebsdb);
 	book_backend_sqlitedb_start_transaction (ebsdb, &err);
@@ -308,7 +309,8 @@ create_folders_table (EwsBookBackendSqliteDB *ebsdb,
 
 	/* Create a child table to store key/value pairs for a folder */
 	if (!err) {
-		stmt =	"CREATE TABLE IF NOT EXISTS keys"
+		stmt =
+			"CREATE TABLE IF NOT EXISTS keys"
 			"( key TEXT PRIMARY KEY, value TEXT,"
 			" folder_id TEXT REFERENCES folders)";
 		book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
@@ -376,8 +378,9 @@ add_folder_into_db (EwsBookBackendSqliteDB *ebsdb,
 	book_backend_sqlitedb_start_transaction (ebsdb, &err);
 
 	if (!err) {
-		stmt = sqlite3_mprintf ("INSERT OR REPLACE INTO folders VALUES ( %Q, %Q, %Q, %d, %d, %d ) ",
-					folderid, folder_name, NULL, 0, 0, FOLDER_VERSION);
+		stmt = sqlite3_mprintf (
+			"INSERT OR REPLACE INTO folders VALUES ( %Q, %Q, %Q, %d, %d, %d ) ",
+			folderid, folder_name, NULL, 0, 0, FOLDER_VERSION);
 
 		book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
 
@@ -431,7 +434,7 @@ create_contacts_table (EwsBookBackendSqliteDB *ebsdb,
 	 * rely on this. Assuming that the frequency of matching on these would be higher than
 	 * on the other fields like email_2, surname etc. email_1 should be the primary email */
 	if (!err) {
-		tmp = g_strdup_printf("FNINDEX-%s", folderid);
+		tmp = g_strdup_printf ("FNINDEX-%s", folderid);
 		stmt = sqlite3_mprintf ("CREATE INDEX IF NOT EXISTS %Q ON %Q (full_name)", tmp, folderid);
 		ret = book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
 		g_free (tmp);
@@ -439,7 +442,7 @@ create_contacts_table (EwsBookBackendSqliteDB *ebsdb,
 	}
 
 	if (!err) {
-		tmp = g_strdup_printf("EMINDEX-%s", folderid);
+		tmp = g_strdup_printf ("EMINDEX-%s", folderid);
 		stmt = sqlite3_mprintf ("CREATE INDEX IF NOT EXISTS %Q ON %Q (email_1)", tmp, folderid);
 		ret = book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
 		g_free (tmp);
@@ -476,7 +479,7 @@ book_backend_sqlitedb_load (EwsBookBackendSqliteDB *ebsdb,
 		} else {
 			const gchar *errmsg;
 			errmsg = sqlite3_errmsg (priv->db);
-			d(g_print("Can't open database %s: %s\n", path, errmsg));
+			d (g_print ("Can't open database %s: %s\n", path, errmsg));
 			g_set_error (
 				error, E_BOOK_SDB_ERROR,
 				0, "%s", errmsg);
@@ -541,12 +544,13 @@ ews_book_backend_sqlitedb_new (const gchar *path,
 		}
 	}
 
-	ebsdb = g_object_new	(EWS_TYPE_BOOK_BACKEND_SQLITEDB, NULL);
+	ebsdb = g_object_new (EWS_TYPE_BOOK_BACKEND_SQLITEDB, NULL);
 	ebsdb->priv->path = g_strdup (path);
 	ebsdb->priv->store_vcard = store_vcard;
 	if (g_mkdir_with_parents (path, 0777) < 0) {
-		g_set_error (error, E_BOOK_SDB_ERROR,
-				0, "Can not make parent directory: errno %d", errno);
+		g_set_error (
+			error, E_BOOK_SDB_ERROR,
+			0, "Can not make parent directory: errno %d", errno);
 		return NULL;
 	}
 	filename = g_build_filename (path, DB_FILENAME, NULL);
@@ -650,8 +654,9 @@ ews_book_backend_sqlitedb_add_contact (EwsBookBackendSqliteDB *ebsdb,
 	GSList l;
 	l.data = contact;
 	l.next = NULL;
-	return ews_book_backend_sqlitedb_add_contacts (ebsdb, folderid, &l,
-						     partial_content, error);
+	return ews_book_backend_sqlitedb_add_contacts (
+		ebsdb, folderid, &l,
+		partial_content, error);
 }
 
 /**
@@ -689,8 +694,9 @@ ews_book_backend_sqlitedb_add_contacts (EwsBookBackendSqliteDB *ebsdb,
 		gchar *stmt;
 		EContact *contact = (EContact *) l->data;
 
-		stmt = insert_stmt_from_contact (contact, partial_content, folderid,
-						 priv->store_vcard);
+		stmt = insert_stmt_from_contact (
+			contact, partial_content, folderid,
+			priv->store_vcard);
 		book_backend_sql_exec (priv->db, stmt, NULL, NULL, &err);
 
 		g_free (stmt);
@@ -722,8 +728,8 @@ ews_book_backend_sqlitedb_remove_contact (EwsBookBackendSqliteDB *ebsdb,
 	GSList l;
 	l.data = (gchar *) uid; /* Won't modify it, I promise :) */
 	l.next = NULL;
-	return ews_book_backend_sqlitedb_remove_contacts (ebsdb, folderid, &l,
-							error);
+	return ews_book_backend_sqlitedb_remove_contacts (
+		ebsdb, folderid, &l, error);
 }
 
 /**
@@ -870,8 +876,9 @@ ews_book_backend_sqlitedb_get_contact (EwsBookBackendSqliteDB *ebsdb,
 {
 	GError *err = NULL;
 	EContact *contact = NULL;
-	gchar *vcard = ews_book_backend_sqlitedb_get_vcard_string (ebsdb, folderid, uid,
-								 fields_of_interest, with_all_required_fields, &err);
+	gchar *vcard = ews_book_backend_sqlitedb_get_vcard_string (
+		ebsdb, folderid, uid,
+		fields_of_interest, with_all_required_fields, &err);
 	if (!err) {
 		contact = e_contact_new_from_vcard (vcard);
 		g_free (vcard);
@@ -1115,11 +1122,13 @@ ews_book_backend_sqlitedb_is_summary_query (const gchar *query)
 
 	for (i = 0; i < G_N_ELEMENTS (check_symbols); i++) {
 		if (check_symbols[i].type == 1) {
-			e_sexp_add_ifunction (sexp, 0, check_symbols[i].name,
-					      (ESExpIFunc *) check_symbols[i].func, NULL);
+			e_sexp_add_ifunction (
+				sexp, 0, check_symbols[i].name,
+				(ESExpIFunc *) check_symbols[i].func, NULL);
 		} else {
-			e_sexp_add_function (sexp, 0, check_symbols[i].name,
-					     check_symbols[i].func, NULL);
+			e_sexp_add_function (
+				sexp, 0, check_symbols[i].name,
+				check_symbols[i].func, NULL);
 		}
 	}
 
@@ -1151,7 +1160,7 @@ func_and (ESExp *f,
 	GString *string;
 	gint i;
 
-	string = g_string_new("( ");
+	string = g_string_new ("( ");
 	for (i = 0; i < argc; i++) {
 		r1 = e_sexp_term_eval (f, argv[i]);
 
@@ -1160,14 +1169,14 @@ func_and (ESExp *f,
 			continue;
 		}
 		if (r1->value.string && *r1->value.string)
-			g_string_append_printf(string, "%s%s", r1->value.string, ((argc>1) && (i != argc-1)) ?  " AND ":"");
+			g_string_append_printf (string, "%s%s", r1->value.string, ((argc > 1) && (i != argc - 1)) ?  " AND ":"");
 		e_sexp_result_free (f, r1);
 	}
-	g_string_append(string, " )");
+	g_string_append (string, " )");
 	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 
 	if (strlen (string->str) == 4)
-		r->value.string = g_strdup("");
+		r->value.string = g_strdup ("");
 	else
 		r->value.string = string->str;
 	g_string_free (string, FALSE);
@@ -1185,7 +1194,7 @@ func_or (ESExp *f,
 	GString *string;
 	gint i;
 
-	string = g_string_new("( ");
+	string = g_string_new ("( ");
 	for (i = 0; i < argc; i++) {
 		r1 = e_sexp_term_eval (f, argv[i]);
 
@@ -1193,10 +1202,10 @@ func_or (ESExp *f,
 			e_sexp_result_free (f, r1);
 			continue;
 		}
-		g_string_append_printf(string, "%s%s", r1->value.string, ((argc>1) && (i != argc-1)) ?  " OR ":"");
+		g_string_append_printf (string, "%s%s", r1->value.string, ((argc > 1) && (i != argc - 1)) ?  " OR ":"");
 		e_sexp_result_free (f, r1);
 	}
-	g_string_append(string, " )");
+	g_string_append (string, " )");
 
 	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 	r->value.string = string->str;
@@ -1244,10 +1253,10 @@ convert_match_exp (struct _ESExp *f,
 			if (!strcmp (field, "full_name")) {
 				gchar *full, *sur, *given, *nick;
 
-				full = g_strdup_printf("(full_name IS NOT NULL AND full_name LIKE %s)",value);
-				sur = g_strdup_printf("(family_name IS NOT NULL AND family_name LIKE %s)",value);
-				given = g_strdup_printf("(given_name IS NOT NULL AND given_name LIKE %s)",value);
-				nick = g_strdup_printf("(nickname IS NOT NULL AND nickname LIKE %s)",value);
+				full = g_strdup_printf ("(full_name IS NOT NULL AND full_name LIKE %s)",value);
+				sur = g_strdup_printf ("(family_name IS NOT NULL AND family_name LIKE %s)",value);
+				given = g_strdup_printf ("(given_name IS NOT NULL AND given_name LIKE %s)",value);
+				nick = g_strdup_printf ("(nickname IS NOT NULL AND nickname LIKE %s)",value);
 
 				str = g_strdup_printf (" %s OR %s OR %s OR %s ", full, sur, given, nick);
 
@@ -1268,7 +1277,7 @@ convert_match_exp (struct _ESExp *f,
 				str = emails->str;
 				g_string_free (emails, FALSE);
 			} else
-				str = g_strdup_printf("(%s IS NOT NULL AND %s LIKE %s)", field, field, value);
+				str = g_strdup_printf ("(%s IS NOT NULL AND %s LIKE %s)", field, field, value);
 			g_free (value);
 		}
 	}
@@ -1342,11 +1351,13 @@ sexp_to_sql_query (const gchar *query)
 
 	for (i = 0; i < G_N_ELEMENTS (symbols); i++) {
 		if (symbols[i].immediate)
-			e_sexp_add_ifunction (sexp, 0, symbols[i].name,
-					     (ESExpIFunc *) symbols[i].func, NULL);
+			e_sexp_add_ifunction (
+				sexp, 0, symbols[i].name,
+				(ESExpIFunc *) symbols[i].func, NULL);
 		else
-			e_sexp_add_function (sexp, 0, symbols[i].name,
-					    symbols[i].func, NULL);
+			e_sexp_add_function (
+				sexp, 0, symbols[i].name,
+				symbols[i].func, NULL);
 	}
 
 	e_sexp_input_text (sexp, query, strlen (query));
@@ -1445,7 +1456,7 @@ store_data_to_vcard (gpointer ref,
 		if (found)
 			continue;
 
-		if (!strcmp (name [i], "bdata"))
+		if (!strcmp (name[i], "bdata"))
 			search_data->bdata = g_strdup (cols[i]);
 	}
 
@@ -1482,8 +1493,9 @@ book_backend_sqlitedb_search_query (EwsBookBackendSqliteDB *ebsdb,
 			book_backend_sql_exec (ebsdb->priv->db, stmt, store_data_to_vcard, &vcard_data, &err);
 			sqlite3_free (stmt);
 		} else
-			book_backend_sql_exec (ebsdb->priv->db, select_stmt,
-					       store_data_to_vcard, &vcard_data, &err);
+			book_backend_sql_exec (
+				ebsdb->priv->db, select_stmt,
+				store_data_to_vcard, &vcard_data, &err);
 
 		g_free (select_stmt);
 
@@ -1607,9 +1619,10 @@ ews_book_backend_sqlitedb_search (EwsBookBackendSqliteDB *ebsdb,
 		gchar *sql_query;
 
 		sql_query = sexp ? sexp_to_sql_query (sexp) : NULL;
-		search_contacts = book_backend_sqlitedb_search_query (ebsdb, sql_query, folderid,
-								      fields_of_interest,
-								      &local_with_all_required_fields, error);
+		search_contacts = book_backend_sqlitedb_search_query (
+			ebsdb, sql_query, folderid,
+			fields_of_interest,
+			&local_with_all_required_fields, error);
 		g_free (sql_query);
 
 		local_searched = TRUE;
@@ -1619,8 +1632,9 @@ ews_book_backend_sqlitedb_search (EwsBookBackendSqliteDB *ebsdb,
 		local_searched = TRUE;
 		local_with_all_required_fields = TRUE;
 	} else {
-		g_set_error (error, E_BOOK_SDB_ERROR,
-				0, "Full search_contacts are not stored in cache. Hence only summary query is supported.");
+		g_set_error (
+			error, E_BOOK_SDB_ERROR,
+			0, "Full search_contacts are not stored in cache. Hence only summary query is supported.");
 	}
 
 	if (searched)
@@ -1671,8 +1685,9 @@ ews_book_backend_sqlitedb_search_uids (EwsBookBackendSqliteDB *ebsdb,
 
 		local_searched = TRUE;
 	} else {
-		g_set_error (error, E_BOOK_SDB_ERROR,
-				0, "Full vcards are not stored in cache. Hence only summary query is supported.");
+		g_set_error (
+			error, E_BOOK_SDB_ERROR,
+			0, "Full vcards are not stored in cache. Hence only summary query is supported.");
 	}
 
 	if (searched)
@@ -1741,8 +1756,9 @@ ews_book_backend_sqlitedb_set_is_populated (EwsBookBackendSqliteDB *ebsdb,
 	book_backend_sqlitedb_start_transaction (ebsdb, &err);
 
 	if (!err) {
-		stmt = sqlite3_mprintf ("UPDATE folders SET is_populated = %d WHERE folder_id = %Q",
-					populated, folderid);
+		stmt = sqlite3_mprintf (
+			"UPDATE folders SET is_populated = %d WHERE folder_id = %Q",
+			populated, folderid);
 		book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
 		sqlite3_free (stmt);
 	}
@@ -1807,8 +1823,9 @@ ews_book_backend_sqlitedb_set_has_partial_content (EwsBookBackendSqliteDB *ebsdb
 	book_backend_sqlitedb_start_transaction (ebsdb, &err);
 
 	if (!err) {
-		stmt = sqlite3_mprintf ("UPDATE folders SET partial_content = %d WHERE folder_id = %Q",
-					partial_content, folderid);
+		stmt = sqlite3_mprintf (
+			"UPDATE folders SET partial_content = %d WHERE folder_id = %Q",
+			partial_content, folderid);
 		book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
 		sqlite3_free (stmt);
 	}
@@ -1882,8 +1899,9 @@ ews_book_backend_sqlitedb_set_contact_bdata (EwsBookBackendSqliteDB *ebsdb,
 	book_backend_sqlitedb_start_transaction (ebsdb, &err);
 
 	if (!err) {
-		stmt = sqlite3_mprintf ("UPDATE %Q SET bdata = %Q WHERE uid = %Q", folderid,
-					value, uid);
+		stmt = sqlite3_mprintf (
+			"UPDATE %Q SET bdata = %Q WHERE uid = %Q", folderid,
+			value, uid);
 		book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
 		sqlite3_free (stmt);
 	}
@@ -1942,8 +1960,9 @@ ews_book_backend_sqlitedb_set_sync_data (EwsBookBackendSqliteDB *ebsdb,
 	book_backend_sqlitedb_start_transaction (ebsdb, &err);
 
 	if (!err) {
-		stmt = sqlite3_mprintf ("UPDATE folders SET sync_data = %Q WHERE folder_id = %Q",
-					sync_data, folderid);
+		stmt = sqlite3_mprintf (
+			"UPDATE folders SET sync_data = %Q WHERE folder_id = %Q",
+			sync_data, folderid);
 		book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
 		sqlite3_free (stmt);
 	}
@@ -1974,8 +1993,9 @@ ews_book_backend_sqlitedb_get_key_value (EwsBookBackendSqliteDB *ebsdb,
 
 	READER_LOCK (ebsdb);
 
-	stmt = sqlite3_mprintf ("SELECT value FROM keys WHERE folder_id = %Q AND key = %Q",
-							folderid, key);
+	stmt = sqlite3_mprintf (
+		"SELECT value FROM keys WHERE folder_id = %Q AND key = %Q",
+		folderid, key);
 	book_backend_sql_exec (ebsdb->priv->db, stmt, get_string_cb , &ret, error);
 	sqlite3_free (stmt);
 
@@ -2005,8 +2025,9 @@ ews_book_backend_sqlitedb_set_key_value (EwsBookBackendSqliteDB *ebsdb,
 	book_backend_sqlitedb_start_transaction (ebsdb, &err);
 
 	if (!err) {
-		stmt = sqlite3_mprintf ("INSERT or REPLACE INTO keys (key, value, folder_id)	\
-					values (%Q, %Q, %Q)", key, value, folderid);
+		stmt = sqlite3_mprintf (
+		"INSERT or REPLACE INTO keys (key, value, folder_id) "
+		"values (%Q, %Q, %Q)", key, value, folderid);
 		book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
 		sqlite3_free (stmt);
 	}
@@ -2037,8 +2058,9 @@ ews_book_backend_sqlitedb_get_partially_cached_ids (EwsBookBackendSqliteDB *ebsd
 
 	READER_LOCK (ebsdb);
 
-	stmt = sqlite3_mprintf ("SELECT uid FROM %Q WHERE partial_content = 1",
-							folderid);
+	stmt = sqlite3_mprintf (
+		"SELECT uid FROM %Q WHERE partial_content = 1",
+		folderid);
 	book_backend_sql_exec (ebsdb->priv->db, stmt, addto_slist_cb, &uids, error);
 	sqlite3_free (stmt);
 
@@ -2162,8 +2184,9 @@ ews_book_backend_sqlitedb_remove (EwsBookBackendSqliteDB *ebsdb,
 
 	g_free (filename);
 	if (ret == -1) {
-		g_set_error (error, E_BOOK_SDB_ERROR,
-				0, "Unable to remove the db file: errno %d", errno);
+		g_set_error (
+			error, E_BOOK_SDB_ERROR,
+			0, "Unable to remove the db file: errno %d", errno);
 		return FALSE;
 	}
 
diff --git a/src/addressbook/ews-oab-decoder.c b/src/addressbook/ews-oab-decoder.c
index da194da..12bbadc 100644
--- a/src/addressbook/ews-oab-decoder.c
+++ b/src/addressbook/ews-oab-decoder.c
@@ -352,7 +352,7 @@ ews_oab_read_uint16 (GInputStream *is,
 	if (!*error)
 		ret = EndGetI16 (str);
 
-	return ret;	
+	return ret;
 }
 
 static gint
@@ -477,7 +477,7 @@ ews_decode_hdr_props (EwsOabDecoder *eod,
 		guint32 prop_id, flags;
 
 		prop_id = ews_oab_read_uint32 (G_INPUT_STREAM (priv->fis), cancellable, error);
-		d(g_print ("%X \n", prop_id);)
+		d (g_print ("%X \n", prop_id);)
 		*props = g_slist_prepend (*props, GUINT_TO_POINTER (prop_id));
 
 		if (*error)
@@ -627,7 +627,7 @@ ews_decode_oab_prop (EwsOabDecoder *eod,
 			val = ews_decode_uint32 (eod, cancellable, error);
 			ret_val = GUINT_TO_POINTER (val);
 
-			d(g_print ("prop id %X prop type: int32 value %d \n", prop_id, val);)
+			d (g_print ("prop id %X prop type: int32 value %d \n", prop_id, val);)
 
 			break;
 		}
@@ -637,7 +637,7 @@ ews_decode_oab_prop (EwsOabDecoder *eod,
 
 			g_input_stream_read (G_INPUT_STREAM (priv->fis), &val, 1, cancellable, error);
 			ret_val = GUINT_TO_POINTER ((guint) val);
-			d(g_print ("prop id %X prop type: bool value %d \n", prop_id, val);)
+			d (g_print ("prop id %X prop type: bool value %d \n", prop_id, val);)
 
 			break;
 		}
@@ -649,13 +649,13 @@ ews_decode_oab_prop (EwsOabDecoder *eod,
 			val = ews_oab_read_upto (G_INPUT_STREAM (priv->fis), '\0', cancellable, error);
 			ret_val = (gpointer) val;
 
-			d(g_print ("prop id %X prop type: string value %s \n", prop_id, val);)
+			d (g_print ("prop id %X prop type: string value %s \n", prop_id, val);)
 			break;
 		}
 		case EWS_PTYP_BINARY:
 		{
 			ret_val = ews_decode_binary (eod, cancellable, error);
-			d(g_print ("prop id %X prop type: binary value %s \n", prop_id, (gchar *) ret_val);)
+			d (g_print ("prop id %X prop type: binary value %s \n", prop_id, (gchar *) ret_val);)
 			break;
 		}
 		case EWS_PTYP_MULTIPLEINTEGER32:
@@ -669,7 +669,7 @@ ews_decode_oab_prop (EwsOabDecoder *eod,
 			num = ews_decode_uint32 (eod, cancellable, error);
 			if (*error)
 				break;
-			d(g_print ("prop id %X prop type: multi-num %d \n", prop_id, num);)
+			d (g_print ("prop id %X prop type: multi-num %d \n", prop_id, num);)
 
 			for (i = 0; i < num; i++) {
 				gpointer val;
@@ -681,7 +681,7 @@ ews_decode_oab_prop (EwsOabDecoder *eod,
 					val = GUINT_TO_POINTER (v);
 					list = g_slist_prepend (list, val);
 
-					d(g_print ("prop id %X prop type: multi-int32 %d \n", prop_id, v);)
+					d (g_print ("prop id %X prop type: multi-int32 %d \n", prop_id, v);)
 					if (*error) {
 						g_slist_free (list);
 						return NULL;
@@ -691,10 +691,10 @@ ews_decode_oab_prop (EwsOabDecoder *eod,
 
 					if (prop_type == EWS_PTYP_MULTIPLEBINARY) {
 						val = ews_decode_binary (eod, cancellable, error);
-						d(g_print ("prop id %X prop type: multi-string %s \n", prop_id, val);)
+						d (g_print ("prop id %X prop type: multi-string %s \n", prop_id, val);)
 					} else {
 						val = ews_oab_read_upto (G_INPUT_STREAM (priv->fis), '\0', cancellable, error);
-						d(g_print ("prop id %X prop type: multi-string %s \n", prop_id, val);)
+						d (g_print ("prop id %X prop type: multi-string %s \n", prop_id, val);)
 					}
 
 					if (*error) {
@@ -867,7 +867,7 @@ ews_decode_and_store_oab_records (EwsOabDecoder *eod,
 			e_contact_set (contact, E_CONTACT_UID, uid);
 
 			cb (contact, offset, ((gfloat) (i + 1) / priv->total_records) * 100, user_data, error);
-			d(g_print ("%s \n", e_vcard_to_string ((EVCard *) contact, EVC_FORMAT_VCARD_30));)
+			d (g_print ("%s \n", e_vcard_to_string ((EVCard *) contact, EVC_FORMAT_VCARD_30));)
 		}
 
 error:
@@ -909,7 +909,7 @@ ews_oab_decoder_get_oab_prop_string (EwsOabDecoder *eod,
 	if (str->len)
 		g_string_erase (str, str->len - 1, 1);
 
-	d(g_print ("Oab prop string: %s \n", str->str);)
+	d (g_print ("Oab prop string: %s \n", str->str);)
 
 	return g_string_free (str, FALSE);
 }
@@ -942,7 +942,7 @@ ews_oab_decoder_set_oab_prop_string (EwsOabDecoder *eod,
 
 		sscanf (vals[i],"%"G_GUINT32_FORMAT,&prop_id);
 		priv->oab_props = g_slist_prepend (priv->oab_props, GUINT_TO_POINTER (prop_id));
-		d(printf ("%X\n", prop_id);)
+		d (printf ("%X\n", prop_id);)
 	}
 
 	priv->oab_props = g_slist_reverse (priv->oab_props);
@@ -1076,7 +1076,7 @@ main (gint argc,
 		return -1;
 	}
 
-	ebsdb = ews_book_backend_sqlitedb_new (argv [2], "dum", "de", "dum", TRUE, NULL);
+	ebsdb = ews_book_backend_sqlitedb_new (argv[2], "dum", "de", "dum", TRUE, NULL);
 	eod = ews_oab_decoder_new (argv[1], argv[2], &err);
 
 	data.contact_collector = NULL;
diff --git a/src/calendar/e-cal-backend-ews-utils.c b/src/calendar/e-cal-backend-ews-utils.c
index 5c86cbc..9739a5c 100644
--- a/src/calendar/e-cal-backend-ews-utils.c
+++ b/src/calendar/e-cal-backend-ews-utils.c
@@ -155,7 +155,7 @@ void
 ewscal_set_time (ESoapMessage *msg,
                  const gchar *name,
                  icaltimetype *t,
-		 gboolean with_timezone)
+                 gboolean with_timezone)
 {
 	gchar *str;
 	gchar *tz_ident = NULL;
@@ -182,10 +182,11 @@ ewscal_set_time (ESoapMessage *msg,
 		}
 	}
 
-	str = g_strdup_printf ("%04d-%02d-%02dT%02d:%02d:%02d%s",
-			       t->year, t->month, t->day,
-			       t->hour, t->minute, t->second,
-			       tz_ident ? tz_ident : "");
+	str = g_strdup_printf (
+		"%04d-%02d-%02dT%02d:%02d:%02d%s",
+		t->year, t->month, t->day,
+		t->hour, t->minute, t->second,
+		tz_ident ? tz_ident : "");
 
 	e_ews_message_write_string_parameter (msg, name, NULL, str);
 
@@ -200,8 +201,9 @@ ewscal_set_date (ESoapMessage *msg,
 {
 	gchar *str;
 
-	str = g_strdup_printf("%04d-%02d-%02d",
-			      t->year, t->month, t->day);
+	str = g_strdup_printf (
+		"%04d-%02d-%02d",
+		t->year, t->month, t->day);
 
 	e_ews_message_write_string_parameter (msg, name, NULL, str);
 	g_free (str);
@@ -254,13 +256,13 @@ ewscal_add_rrule (ESoapMessage *msg,
 {
 	struct icalrecurrencetype recur = icalproperty_get_rrule (prop);
 
-	e_soap_message_start_element(msg, "RelativeYearlyRecurrence", NULL, NULL);
+	e_soap_message_start_element (msg, "RelativeYearlyRecurrence", NULL, NULL);
 
-	e_ews_message_write_string_parameter(msg, "DaysOfWeek", NULL, number_to_weekday(icalrecurrencetype_day_day_of_week(recur.by_day[0])));
-	e_ews_message_write_string_parameter(msg, "DayOfWeekIndex", NULL, weekindex_to_ical(icalrecurrencetype_day_position(recur.by_day[0])));
-	e_ews_message_write_string_parameter(msg, "Month", NULL, number_to_month(recur.by_month[0]));
+	e_ews_message_write_string_parameter (msg, "DaysOfWeek", NULL, number_to_weekday (icalrecurrencetype_day_day_of_week (recur.by_day[0])));
+	e_ews_message_write_string_parameter (msg, "DayOfWeekIndex", NULL, weekindex_to_ical (icalrecurrencetype_day_position (recur.by_day[0])));
+	e_ews_message_write_string_parameter (msg, "Month", NULL, number_to_month (recur.by_month[0]));
 
-	e_soap_message_end_element(msg); /* "RelativeYearlyRecurrence" */
+	e_soap_message_end_element (msg); /* "RelativeYearlyRecurrence" */
 }
 
 static void
@@ -277,7 +279,7 @@ ewscal_add_timechange (ESoapMessage *msg,
 	prop = icalcomponent_get_first_property (comp, ICAL_TZNAME_PROPERTY);
 	if (prop) {
 		tzname = icalproperty_get_tzname (prop);
-		e_soap_message_add_attribute(msg, "TimeZoneName", tzname, NULL, NULL);
+		e_soap_message_add_attribute (msg, "TimeZoneName", tzname, NULL, NULL);
 	}
 
 	/* Calculate zone Offset from BaseOffset */
@@ -286,7 +288,7 @@ ewscal_add_timechange (ESoapMessage *msg,
 		utcoffs = -icalproperty_get_tzoffsetto (prop);
 		utcoffs -= baseoffs;
 		offset = icaldurationtype_as_ical_string_r (icaldurationtype_from_int (utcoffs));
-		e_ews_message_write_string_parameter(msg, "Offset", NULL, offset);
+		e_ews_message_write_string_parameter (msg, "Offset", NULL, offset);
 		free (offset);
 	}
 
@@ -297,8 +299,8 @@ ewscal_add_timechange (ESoapMessage *msg,
 	prop = icalcomponent_get_first_property (comp, ICAL_DTSTART_PROPERTY);
 	if (prop) {
 		dtstart = icalproperty_get_dtstart (prop);
-		snprintf(buffer, 16, "%02d:%02d:%02d", dtstart.hour, dtstart.minute, dtstart.second);
-		e_ews_message_write_string_parameter(msg, "Time", NULL, buffer);
+		snprintf (buffer, 16, "%02d:%02d:%02d", dtstart.hour, dtstart.minute, dtstart.second);
+		e_ews_message_write_string_parameter (msg, "Time", NULL, buffer);
 	}
 }
 
@@ -346,7 +348,7 @@ ewscal_set_timezone (ESoapMessage *msg,
 		location = icaltimezone_get_tznames (icaltz);
 
 	e_soap_message_start_element (msg, name, NULL, NULL);
-	e_soap_message_add_attribute(msg, "TimeZoneName", location, NULL, NULL);
+	e_soap_message_add_attribute (msg, "TimeZoneName", location, NULL, NULL);
 
 	/* Fetch the timezone offsets for the standard (or only) zone.
 	 * Negate it, because Exchange does it backwards */
@@ -363,7 +365,7 @@ ewscal_set_timezone (ESoapMessage *msg,
 	 * to the offset of the Standard zone, and the Offset in the Standard
 	 * zone to zero. So try to avoid problems by doing the same. */
 	offset = icaldurationtype_as_ical_string_r (icaldurationtype_from_int (std_utcoffs));
-	e_ews_message_write_string_parameter(msg, "BaseOffset", NULL, offset);
+	e_ews_message_write_string_parameter (msg, "BaseOffset", NULL, offset);
 	free (offset);
 
 	/* Only write the full TimeChangeType information, including the
@@ -371,16 +373,16 @@ ewscal_set_timezone (ESoapMessage *msg,
 	 * one. */
 	if (xdaylight) {
 		/* Standard */
-		e_soap_message_start_element(msg, "Standard", NULL, NULL);
+		e_soap_message_start_element (msg, "Standard", NULL, NULL);
 		ewscal_add_timechange (msg, xstd, std_utcoffs);
-		e_soap_message_end_element(msg); /* "Standard" */
+		e_soap_message_end_element (msg); /* "Standard" */
 
 		/* DayLight */
-		e_soap_message_start_element(msg, "Daylight", NULL, NULL);
+		e_soap_message_start_element (msg, "Daylight", NULL, NULL);
 		ewscal_add_timechange (msg, xdaylight, std_utcoffs);
-		e_soap_message_end_element(msg); /* "Daylight" */
+		e_soap_message_end_element (msg); /* "Daylight" */
 	}
-	e_soap_message_end_element(msg); /* "MeetingTimeZone" */
+	e_soap_message_end_element (msg); /* "MeetingTimeZone" */
 }
 
 static void
@@ -390,33 +392,33 @@ ewscal_add_availability_rrule (ESoapMessage *msg,
 	struct icalrecurrencetype recur = icalproperty_get_rrule (prop);
 	gchar buffer[16];
 
-	snprintf (buffer, 16, "%d", icalrecurrencetype_day_position(recur.by_day[0]));
-	e_ews_message_write_string_parameter(msg, "DayOrder", NULL, buffer);
+	snprintf (buffer, 16, "%d", icalrecurrencetype_day_position (recur.by_day[0]));
+	e_ews_message_write_string_parameter (msg, "DayOrder", NULL, buffer);
 
 	snprintf (buffer, 16, "%d", recur.by_month[0]);
-	e_ews_message_write_string_parameter(msg, "Month", NULL, buffer);
+	e_ews_message_write_string_parameter (msg, "Month", NULL, buffer);
 
-	e_ews_message_write_string_parameter(msg, "DayOfWeek", NULL, number_to_weekday(icalrecurrencetype_day_day_of_week(recur.by_day[0])));
+	e_ews_message_write_string_parameter (msg, "DayOfWeek", NULL, number_to_weekday (icalrecurrencetype_day_day_of_week (recur.by_day[0])));
 }
 
 static void
 ewscal_add_availability_default_timechange (ESoapMessage *msg)
 {
 
-	e_soap_message_start_element(msg, "StandardTime", NULL, NULL);
-	e_ews_message_write_string_parameter(msg, "Bias", NULL, "0");
-	e_ews_message_write_string_parameter(msg, "Time", NULL, "00:00:00");
-	e_ews_message_write_string_parameter(msg, "DayOrder", NULL, "0");
-	e_ews_message_write_string_parameter(msg, "Month", NULL, "0");
-	e_ews_message_write_string_parameter(msg, "DayOfWeek", NULL, "Sunday");
+	e_soap_message_start_element (msg, "StandardTime", NULL, NULL);
+	e_ews_message_write_string_parameter (msg, "Bias", NULL, "0");
+	e_ews_message_write_string_parameter (msg, "Time", NULL, "00:00:00");
+	e_ews_message_write_string_parameter (msg, "DayOrder", NULL, "0");
+	e_ews_message_write_string_parameter (msg, "Month", NULL, "0");
+	e_ews_message_write_string_parameter (msg, "DayOfWeek", NULL, "Sunday");
 	e_soap_message_end_element (msg);
 
-	e_soap_message_start_element(msg, "DaylightTime", NULL, NULL);
-	e_ews_message_write_string_parameter(msg, "Bias", NULL, "0");
-	e_ews_message_write_string_parameter(msg, "Time", NULL, "00:00:00");
-	e_ews_message_write_string_parameter(msg, "DayOrder", NULL, "0");
-	e_ews_message_write_string_parameter(msg, "Month", NULL, "0");
-	e_ews_message_write_string_parameter(msg, "DayOfWeek", NULL, "Sunday");
+	e_soap_message_start_element (msg, "DaylightTime", NULL, NULL);
+	e_ews_message_write_string_parameter (msg, "Bias", NULL, "0");
+	e_ews_message_write_string_parameter (msg, "Time", NULL, "00:00:00");
+	e_ews_message_write_string_parameter (msg, "DayOrder", NULL, "0");
+	e_ews_message_write_string_parameter (msg, "Month", NULL, "0");
+	e_ews_message_write_string_parameter (msg, "DayOfWeek", NULL, "Sunday");
 	e_soap_message_end_element (msg);
 }
 
@@ -436,14 +438,14 @@ ewscal_add_availability_timechange (ESoapMessage *msg,
 		utcoffs = -icalproperty_get_tzoffsetto (prop) / 60;
 		utcoffs -= baseoffs;
 		snprintf (buffer, 16, "%d", utcoffs);
-		e_ews_message_write_string_parameter(msg, "Bias", NULL, buffer);
+		e_ews_message_write_string_parameter (msg, "Bias", NULL, buffer);
 	}
 
 	prop = icalcomponent_get_first_property (comp, ICAL_DTSTART_PROPERTY);
 	if (prop) {
 		dtstart = icalproperty_get_dtstart (prop);
-		snprintf(buffer, 16, "%02d:%02d:%02d", dtstart.hour, dtstart.minute, dtstart.second);
-		e_ews_message_write_string_parameter(msg, "Time", NULL, buffer);
+		snprintf (buffer, 16, "%02d:%02d:%02d", dtstart.hour, dtstart.minute, dtstart.second);
+		e_ews_message_write_string_parameter (msg, "Time", NULL, buffer);
 	}
 
 	prop = icalcomponent_get_first_property (comp, ICAL_RRULE_PROPERTY);
@@ -470,7 +472,7 @@ ewscal_set_availability_timezone (ESoapMessage *msg,
 	xdaylight = icalcomponent_get_first_component (comp, ICAL_XDAYLIGHT_COMPONENT);
 
 	/*TimeZone is the root element of GetUserAvailabilityRequest*/
-	e_soap_message_start_element(msg, "TimeZone", NULL, NULL);
+	e_soap_message_start_element (msg, "TimeZone", NULL, NULL);
 
 	/* Fetch the timezone offsets for the standard (or only) zone.
 	 * Negate it, because Exchange does it backwards */
@@ -485,24 +487,24 @@ ewscal_set_availability_timezone (ESoapMessage *msg,
 	 * to the offset of the Standard zone, and the Offset in the Standard
 	 * zone to zero. So try to avoid problems by doing the same. */
 	offset = g_strdup_printf ("%d", std_utcoffs);
-	e_ews_message_write_string_parameter(msg, "Bias", NULL, offset);
+	e_ews_message_write_string_parameter (msg, "Bias", NULL, offset);
 	g_free (offset);
 
 	if (xdaylight) {
 		/* Standard */
-		e_soap_message_start_element(msg, "StandardTime", NULL, NULL);
+		e_soap_message_start_element (msg, "StandardTime", NULL, NULL);
 		ewscal_add_availability_timechange (msg, xstd, std_utcoffs);
-		e_soap_message_end_element(msg); /* "StandardTime" */
+		e_soap_message_end_element (msg); /* "StandardTime" */
 
 		/* DayLight */
-		e_soap_message_start_element(msg, "DaylightTime", NULL, NULL);
+		e_soap_message_start_element (msg, "DaylightTime", NULL, NULL);
 		ewscal_add_availability_timechange (msg, xdaylight, std_utcoffs);
-		e_soap_message_end_element(msg); /* "DaylightTime" */
+		e_soap_message_end_element (msg); /* "DaylightTime" */
 	} else
 		/* Set default values*/
 		ewscal_add_availability_default_timechange (msg);
 
-	e_soap_message_end_element(msg); /* "TimeZone" */
+	e_soap_message_end_element (msg); /* "TimeZone" */
 }
 
 void
@@ -534,13 +536,15 @@ ewscal_set_reccurence (ESoapMessage *msg,
 			snprintf (buffer, 32, "%d", recur.interval);
 			e_ews_message_write_string_parameter (msg, "Interval", NULL, buffer);
 
-			len = snprintf (buffer, 256, "%s",
+			len = snprintf (
+				buffer, 256, "%s",
 				number_to_weekday (icalrecurrencetype_day_day_of_week (recur.by_day[0])));
 			for (i = 1; recur.by_day[i] != ICAL_RECURRENCE_ARRAY_MAX; i++) {
-				len += snprintf (buffer+len, 256-len, " %s",
+				len += snprintf (
+					buffer + len, 256 - len, " %s",
 					number_to_weekday (icalrecurrencetype_day_day_of_week (recur.by_day[i])));
 			}
-			e_ews_message_write_string_parameter(msg, "DaysOfWeek", NULL, buffer);
+			e_ews_message_write_string_parameter (msg, "DaysOfWeek", NULL, buffer);
 
 			e_soap_message_end_element (msg); /* "WeeklyRecurrence" */
 			break;
@@ -553,23 +557,24 @@ ewscal_set_reccurence (ESoapMessage *msg,
 				 relative monthly recurrence evolution can set.
 				 TODO: extend the code with all possible monthly recurrence settings */
 				snprintf (buffer, 32, "%d", recur.interval);
-				e_ews_message_write_string_parameter(msg, "Interval", NULL, buffer);
+				e_ews_message_write_string_parameter (msg, "Interval", NULL, buffer);
 
-				e_ews_message_write_string_parameter(msg, "DaysOfWeek", NULL,
+				e_ews_message_write_string_parameter (
+					msg, "DaysOfWeek", NULL,
 					number_to_weekday (icalrecurrencetype_day_day_of_week (recur.by_day[0])));
 
-				e_ews_message_write_string_parameter(msg, "DayOfWeekIndex", NULL, weekindex_to_ical ((recur.by_set_pos[0] == 5 ? -1 : recur.by_set_pos[0])));
+				e_ews_message_write_string_parameter (msg, "DayOfWeekIndex", NULL, weekindex_to_ical ((recur.by_set_pos[0] == 5 ? -1 : recur.by_set_pos[0])));
 
 				e_soap_message_end_element (msg); /* "RelativeMonthlyRecurrence" */
 
 			} else {
 				e_soap_message_start_element (msg, "AbsoluteMonthlyRecurrence", NULL, NULL);
 
-                                snprintf (buffer, 256, "%d", recur.interval);
+				snprintf (buffer, 256, "%d", recur.interval);
 				e_ews_message_write_string_parameter (msg, "Interval", NULL, buffer);
 
 				snprintf (buffer, 256, "%d", recur.by_month_day[0]);
-				e_ews_message_write_string_parameter(msg, "DayOfMonth", NULL, buffer);
+				e_ews_message_write_string_parameter (msg, "DayOfMonth", NULL, buffer);
 
 				e_soap_message_end_element (msg); /* "AbsoluteMonthlyRecurrence" */
 
@@ -591,14 +596,16 @@ ewscal_set_reccurence (ESoapMessage *msg,
 				} else {
 					snprintf (buffer, 256, "%d", dtstart->day);
 				}
-				e_ews_message_write_string_parameter(msg, "DayOfMonth", NULL, buffer);
+				e_ews_message_write_string_parameter (msg, "DayOfMonth", NULL, buffer);
 
 				if (recur.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX) {
 					snprintf (buffer, 256, "%d", recur.by_month_day[0]);
-					e_ews_message_write_string_parameter(msg, "Month", NULL,
+					e_ews_message_write_string_parameter (
+						msg, "Month", NULL,
 						number_to_month (recur.by_month[0]));
 				} else {
-					e_ews_message_write_string_parameter(msg, "Month", NULL,
+					e_ews_message_write_string_parameter (
+						msg, "Month", NULL,
 						number_to_month (dtstart->month));
 				}
 
@@ -738,11 +745,13 @@ e_ews_collect_organizer (icalcomponent *comp)
 	org = icalproperty_get_organizer (org_prop);
 	if (!org)
 		org = "";
-	else
+	else {
 		if (!g_ascii_strncasecmp (org, "MAILTO:", 7))
-				org_email_address = (org) + 7;
-			else
-				org_email_address = org;
+			org_email_address = (org) + 7;
+		else
+			org_email_address = org;
+	}
+
 	return org_email_address;
 }
 
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 316e3c5..1e80c0b 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -339,8 +339,9 @@ static void clear_reminder_is_set (ESoapMessage *msg, gpointer user_data)
 	else
 		change_type = E_EWS_ITEMCHANGE_TYPE_ITEM;
 
-	e_ews_message_start_item_change (msg, change_type,
-					 edad->itemid, edad->changekey, edad->instance_index);
+	e_ews_message_start_item_change (
+		msg, change_type,
+		edad->itemid, edad->changekey, edad->instance_index);
 
 	e_ews_message_start_set_item_field (msg, "ReminderIsSet","item", "CalendarItem");
 
@@ -394,8 +395,9 @@ e_cal_backend_ews_discard_alarm (ECalBackend *backend,
 
 	comp = e_cal_backend_store_get_component (priv->store, uid, NULL);
 	if (!comp) {
-		e_data_cal_respond_discard_alarm (cal, context,
-						   EDC_ERROR (ObjectNotFound));
+		e_data_cal_respond_discard_alarm (
+			cal, context,
+			EDC_ERROR (ObjectNotFound));
 		PRIV_UNLOCK (priv);
 		return;
 	}
@@ -519,8 +521,9 @@ ews_cal_component_get_item_id (ECalComponent *comp,
 	gchar *ck = NULL;
 	gchar *id = NULL;
 
-	prop = icalcomponent_get_first_property (e_cal_component_get_icalcomponent (comp),
-						 ICAL_X_PROPERTY);
+	prop = icalcomponent_get_first_property (
+		e_cal_component_get_icalcomponent (comp),
+		ICAL_X_PROPERTY);
 	while (prop) {
 		const gchar *x_name, *x_val;
 
@@ -531,8 +534,9 @@ ews_cal_component_get_item_id (ECalComponent *comp,
 		 else if (changekey && !ck && !g_ascii_strcasecmp (x_name, "X-EVOLUTION-CHANGEKEY"))
 			ck = g_strdup (x_val);
 
-		prop = icalcomponent_get_next_property (e_cal_component_get_icalcomponent (comp),
-							ICAL_X_PROPERTY);
+		prop = icalcomponent_get_next_property (
+			e_cal_component_get_icalcomponent (comp),
+			ICAL_X_PROPERTY);
 	}
 
 	*itemid = id;
@@ -550,8 +554,9 @@ ews_cal_component_get_calendar_item_accept_id (ECalComponent *comp,
 	gchar *id = NULL;
 	gchar *ck = NULL;
 
-	prop = icalcomponent_get_first_property (e_cal_component_get_icalcomponent (comp),
-						 ICAL_X_PROPERTY);
+	prop = icalcomponent_get_first_property (
+		e_cal_component_get_icalcomponent (comp),
+		ICAL_X_PROPERTY);
 	while (prop) {
 		const gchar *x_name, *x_val;
 
@@ -562,7 +567,8 @@ ews_cal_component_get_calendar_item_accept_id (ECalComponent *comp,
 		else if (changekey && !ck && !g_ascii_strcasecmp (x_name, "X-EVOLUTION-CHANGEKEY"))
 			ck = g_strdup (x_val);
 
-		prop = icalcomponent_get_next_property (e_cal_component_get_icalcomponent (comp),
+		prop = icalcomponent_get_next_property (
+			e_cal_component_get_icalcomponent (comp),
 			ICAL_X_PROPERTY);
 	}
 
@@ -594,8 +600,9 @@ add_comps_to_item_id_hash (ECalBackendEws *cbews)
 			 * use of X- fields has changed it has triggered. Make
 			 * it cope, and not crash */
 			e_cal_component_get_uid (comp, &uid);
-			g_warning ("EWS calendar item %s had no EWS ItemID!",
-				   uid);
+			g_warning (
+				"EWS calendar item %s had no EWS ItemID!",
+				uid);
 			continue;
 		}
 		g_hash_table_insert (priv->item_id_hash, item_id, comp);
@@ -762,9 +769,8 @@ cal_backend_ews_get_object_list (ECalBackend *backend,
 
 	*objects = NULL;
 
-	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (cbsexp,
-									    &occur_start,
-									    &occur_end);
+	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (
+		cbsexp, &occur_start, &occur_end);
 	components = prunning_by_time ?
 		e_cal_backend_store_get_components_occuring_in_range (priv->store, occur_start, occur_end)
 		: e_cal_backend_store_get_components (priv->store);
@@ -922,8 +928,9 @@ e_cal_rid_to_index (ECalBackend *backend,
 	icalrecur_iterator_free (ritr);
 
 	if (icaltime_is_null_time (next)) {
-		g_propagate_error (error, EDC_ERROR_EX (OtherError,
-		    "Invalid occurrence ID"));
+		g_propagate_error (
+			error, EDC_ERROR_EX (OtherError,
+			"Invalid occurrence ID"));
 	}
 
 	return index;
@@ -985,8 +992,9 @@ e_cal_backend_ews_remove_object (ECalBackend *backend,
 	PRIV_UNLOCK (priv);
 
 	if (!item_id.id) {
-		g_propagate_error (&error, EDC_ERROR_EX (OtherError,
-					       "Cannot determine EWS ItemId"));
+		g_propagate_error (
+			&error, EDC_ERROR_EX (OtherError,
+			"Cannot determine EWS ItemId"));
 		goto errorlvl2;
 	}
 
@@ -1095,13 +1103,13 @@ add_attendees_list_to_message (ESoapMessage *msg,
 	e_soap_message_start_element (msg, listname, NULL, NULL);
 
 	for (item = list; item != NULL; item = item->next) {
-		e_soap_message_start_element(msg, "Attendee", NULL, NULL);
-		e_soap_message_start_element(msg, "Mailbox", NULL, NULL);
+		e_soap_message_start_element (msg, "Attendee", NULL, NULL);
+		e_soap_message_start_element (msg, "Mailbox", NULL, NULL);
 
-		e_ews_message_write_string_parameter(msg, "EmailAddress", NULL, item->data);
+		e_ews_message_write_string_parameter (msg, "EmailAddress", NULL, item->data);
 
-		e_soap_message_end_element(msg); /* "Mailbox" */
-		e_soap_message_end_element(msg); /* "Attendee" */
+		e_soap_message_end_element (msg); /* "Mailbox" */
+		e_soap_message_end_element (msg); /* "Attendee" */
 	}
 
 	e_soap_message_end_element (msg);
@@ -1125,17 +1133,17 @@ convert_vevent_calcomp_to_xml (ESoapMessage *msg,
 	/* FORMAT OF A SAMPLE SOAP MESSAGE: http://msdn.microsoft.com/en-us/library/aa564690.aspx */
 
 	/* Prepare CalendarItem node in the SOAP message */
-	e_soap_message_start_element(msg, "CalendarItem", NULL, NULL);
+	e_soap_message_start_element (msg, "CalendarItem", NULL, NULL);
 
 	/* subject */
 	value = icalcomponent_get_summary (icalcomp);
 	if (value)
-		e_ews_message_write_string_parameter(msg, "Subject", NULL, value);
+		e_ews_message_write_string_parameter (msg, "Subject", NULL, value);
 
 	/* description */
 	value = icalcomponent_get_description (icalcomp);
 	if (value)
-		e_ews_message_write_string_parameter_with_attribute(msg, "Body", NULL, value, "BodyType", "Text");
+		e_ews_message_write_string_parameter_with_attribute (msg, "Body", NULL, value, "BodyType", "Text");
 
 	/* set alarms */
 	has_alarms = e_cal_component_has_alarms (comp);
@@ -1154,7 +1162,7 @@ convert_vevent_calcomp_to_xml (ESoapMessage *msg,
 
 	/* All day event ? */
 	if (icaltime_is_date (dtstart))
-		e_ews_message_write_string_parameter(msg, "IsAllDayEvent", NULL, "true");
+		e_ews_message_write_string_parameter (msg, "IsAllDayEvent", NULL, "true");
 
 	/*freebusy*/
 	prop = icalcomponent_get_first_property (icalcomp, ICAL_TRANSP_PROPERTY);
@@ -1166,21 +1174,21 @@ convert_vevent_calcomp_to_xml (ESoapMessage *msg,
 	/* location */
 	value = icalcomponent_get_location (icalcomp);
 	if (value)
-		e_ews_message_write_string_parameter(msg, "Location", NULL, value);
+		e_ews_message_write_string_parameter (msg, "Location", NULL, value);
 
 	/* collect attendees */
 	e_ews_collect_attendees (icalcomp, &required, &optional, &resource);
 
 	if (required != NULL) {
-		add_attendees_list_to_message(msg, "RequiredAttendees", required);
+		add_attendees_list_to_message (msg, "RequiredAttendees", required);
 		g_slist_free (required);
 	}
 	if (optional != NULL) {
-		add_attendees_list_to_message(msg, "OptionalAttendees", optional);
+		add_attendees_list_to_message (msg, "OptionalAttendees", optional);
 		g_slist_free (optional);
 	}
 	if (resource != NULL) {
-		add_attendees_list_to_message(msg, "Resources", resource);
+		add_attendees_list_to_message (msg, "Resources", resource);
 		g_slist_free (resource);
 	}
 	/* end of attendees */
@@ -1195,10 +1203,10 @@ convert_vevent_calcomp_to_xml (ESoapMessage *msg,
 		/* We have to cast these because libical puts a const pointer into the
 		 * icaltimetype, but its basic read-only icaltimezone_foo() functions
 		 * take a non-const pointer! */
-		ewscal_set_timezone (msg, "StartTimeZone", (icaltimezone *)dtstart.zone);
-		ewscal_set_timezone (msg, "EndTimeZone", (icaltimezone *)dtstart.zone);
+		ewscal_set_timezone (msg, "StartTimeZone", (icaltimezone *) dtstart.zone);
+		ewscal_set_timezone (msg, "EndTimeZone", (icaltimezone *) dtstart.zone);
 	} else
-		ewscal_set_timezone (msg, "MeetingTimeZone", (icaltimezone *)(dtstart.zone?dtstart.zone:convert_data->cbews->priv->default_zone));
+		ewscal_set_timezone (msg, "MeetingTimeZone", (icaltimezone *)(dtstart.zone ? dtstart.zone : convert_data->cbews->priv->default_zone));
 
 	// end of "CalendarItem"
 	e_soap_message_end_element (msg);
@@ -1215,9 +1223,9 @@ convert_vtodo_calcomp_to_xml (ESoapMessage *msg,
 	gint value;
 	gchar buffer[16];
 
-	e_soap_message_start_element(msg, "Task", NULL, NULL);
+	e_soap_message_start_element (msg, "Task", NULL, NULL);
 
-	e_ews_message_write_string_parameter(msg, "Subject", NULL, icalcomponent_get_summary(icalcomp));
+	e_ews_message_write_string_parameter (msg, "Subject", NULL, icalcomponent_get_summary (icalcomp));
 
 	e_ews_message_write_string_parameter_with_attribute (msg, "Body", NULL, icalcomponent_get_description (icalcomp), "BodyType", "Text");
 
@@ -1231,7 +1239,7 @@ convert_vtodo_calcomp_to_xml (ESoapMessage *msg,
 	if (prop) {
 		value = icalproperty_get_percentcomplete (prop);
 		snprintf (buffer, 16, "%d", value);
-		e_ews_message_write_string_parameter(msg, "PercentComplete", NULL, buffer);
+		e_ews_message_write_string_parameter (msg, "PercentComplete", NULL, buffer);
 	}
 
 	prop = icalcomponent_get_first_property (icalcomp, ICAL_DTSTART_PROPERTY);
@@ -1244,17 +1252,17 @@ convert_vtodo_calcomp_to_xml (ESoapMessage *msg,
 	if (prop) {
 		switch (icalproperty_get_status (prop)) {
 		case ICAL_STATUS_INPROCESS:
-			e_ews_message_write_string_parameter(msg, "Status", NULL, "InProgress");
+			e_ews_message_write_string_parameter (msg, "Status", NULL, "InProgress");
 			break;
 		case ICAL_STATUS_COMPLETED:
-			e_ews_message_write_string_parameter(msg, "Status", NULL, "Completed");
+			e_ews_message_write_string_parameter (msg, "Status", NULL, "Completed");
 			break;
 		default:
 			break;
 		}
 	}
 
-	e_soap_message_end_element(msg); // "Task"
+	e_soap_message_end_element (msg); // "Task"
 }
 
 static void
@@ -1567,8 +1575,9 @@ ews_create_object_cb (GObject *object,
 		}
 
 		for (i = exceptions; i; i = i->next) {
-			e_cal_backend_ews_remove_object (E_CAL_BACKEND (create_data->cbews), create_data->cal, 0, NULL,
-							 comp_uid, i->data, CALOBJ_MOD_THIS);
+			e_cal_backend_ews_remove_object (
+				E_CAL_BACKEND (create_data->cbews), create_data->cal, 0, NULL,
+				comp_uid, i->data, CALOBJ_MOD_THIS);
 		}
 
 		g_slist_foreach (exceptions, (GFunc) g_free, NULL);
@@ -1849,33 +1858,35 @@ convert_vevent_component_to_updatexml (ESoapMessage *msg,
 		prop = icalcomponent_get_first_property (icalcomp, ICAL_RECURRENCEID_PROPERTY);
 		if (prop != NULL) {
 			recid = icalproperty_get_value_as_string_r (prop);
-			e_ews_message_start_item_change (msg, E_EWS_ITEMCHANGE_TYPE_OCCURRENCEITEM,
-					 modify_data->itemid, modify_data->changekey, e_cal_rid_to_index (E_CAL_BACKEND (modify_data->cbews), recid, icalcomp_old, &error));
+			e_ews_message_start_item_change (
+				msg, E_EWS_ITEMCHANGE_TYPE_OCCURRENCEITEM,
+				modify_data->itemid, modify_data->changekey, e_cal_rid_to_index (E_CAL_BACKEND (modify_data->cbews), recid, icalcomp_old, &error));
 			free (recid);
 		} else {
-			e_ews_message_start_item_change (msg, E_EWS_ITEMCHANGE_TYPE_ITEM,
-					 modify_data->itemid, modify_data->changekey, 0);
+			e_ews_message_start_item_change (
+				msg, E_EWS_ITEMCHANGE_TYPE_ITEM,
+				modify_data->itemid, modify_data->changekey, 0);
 		}
 	} else e_ews_message_start_item_change (msg, E_EWS_ITEMCHANGE_TYPE_ITEM,
-					 modify_data->itemid, modify_data->changekey, 0);
+		modify_data->itemid, modify_data->changekey, 0);
 
 	/* subject */
 	value = icalcomponent_get_summary (icalcomp);
 	old_value = icalcomponent_get_summary (icalcomp_old);
 	if ((value && old_value && g_ascii_strcasecmp (value, old_value)) ||
 	 (value && old_value == NULL)) {
-			convert_vevent_property_to_updatexml (msg, "Subject", value, "item", NULL, NULL);
+		convert_vevent_property_to_updatexml (msg, "Subject", value, "item", NULL, NULL);
 	} else if (!value && old_value)
-			convert_vevent_property_to_updatexml (msg, "Subject", "", "item", NULL, NULL);
+		convert_vevent_property_to_updatexml (msg, "Subject", "", "item", NULL, NULL);
 
 	/*description*/
 	value = icalcomponent_get_description (icalcomp);
 	old_value = icalcomponent_get_description (icalcomp_old);
 	if ((value && old_value && g_ascii_strcasecmp (value, old_value)) ||
 	 (value && old_value == NULL)) {
-			convert_vevent_property_to_updatexml (msg, "Body", value, "item", "BodyType", "Text");
+		convert_vevent_property_to_updatexml (msg, "Body", value, "item", "BodyType", "Text");
 	} else if (!value && old_value)
-			convert_vevent_property_to_updatexml (msg, "Body", "", "item", "BodyType", "Text");
+		convert_vevent_property_to_updatexml (msg, "Body", "", "item", "BodyType", "Text");
 
 	/*update alarm items*/
 	has_alarms = e_cal_component_has_alarms (modify_data->comp);
@@ -1898,9 +1909,9 @@ convert_vevent_component_to_updatexml (ESoapMessage *msg,
 	old_value = icalcomponent_get_location (icalcomp_old);
 	if ((value && old_value && g_ascii_strcasecmp (value, old_value)) ||
 	 (value && old_value == NULL)) {
-			convert_vevent_property_to_updatexml (msg, "Location", value, "calendar", NULL, NULL);
+		convert_vevent_property_to_updatexml (msg, "Location", value, "calendar", NULL, NULL);
 	} else if (!value && old_value)
-			convert_vevent_property_to_updatexml (msg, "Location", "", "calendar", NULL, NULL);
+		convert_vevent_property_to_updatexml (msg, "Location", "", "calendar", NULL, NULL);
 
 	/*freebusy*/
 	transp = icalcomponent_get_first_property (icalcomp, ICAL_TRANSP_PROPERTY);
@@ -1992,17 +2003,17 @@ convert_vevent_component_to_updatexml (ESoapMessage *msg,
 	if (0 /* Exchange 2010 detected */ && dtstart.zone != dtend.zone) {
 		if (dtstart.zone) {
 			e_ews_message_start_set_item_field (msg, "StartTimeZone", "calendar", "CalendarItem");
-			ewscal_set_timezone (msg, "StartTimeZone", (icaltimezone *)dtstart.zone);
+			ewscal_set_timezone (msg, "StartTimeZone", (icaltimezone *) dtstart.zone);
 			e_ews_message_end_set_item_field (msg);
 		}
 		if (dtend.zone) {
 			e_ews_message_start_set_item_field (msg, "EndTimeZone", "calendar", "CalendarItem");
-			ewscal_set_timezone (msg, "EndTimeZone", (icaltimezone *)dtend.zone);
+			ewscal_set_timezone (msg, "EndTimeZone", (icaltimezone *) dtend.zone);
 			e_ews_message_end_set_item_field (msg);
 		}
 	} else {
 		e_ews_message_start_set_item_field (msg, "MeetingTimeZone", "calendar", "CalendarItem");
-		ewscal_set_timezone (msg, "MeetingTimeZone", (icaltimezone *)(dtstart.zone?dtstart.zone:modify_data->cbews->priv->default_zone));
+		ewscal_set_timezone (msg, "MeetingTimeZone", (icaltimezone *)(dtstart.zone ? dtstart.zone : modify_data->cbews->priv->default_zone));
 		e_ews_message_end_set_item_field (msg);
 	}
 
@@ -2033,10 +2044,11 @@ convert_vtodo_component_to_updatexml (ESoapMessage *msg,
 	gint value;
 	gchar buffer[16];
 
-	e_ews_message_start_item_change (msg, E_EWS_ITEMCHANGE_TYPE_ITEM,
-					 modify_data->itemid, modify_data->changekey, 0);
+	e_ews_message_start_item_change (
+		msg, E_EWS_ITEMCHANGE_TYPE_ITEM,
+		modify_data->itemid, modify_data->changekey, 0);
 
-	convert_vtodo_property_to_updatexml (msg, "Subject", icalcomponent_get_summary(icalcomp), "item", NULL, NULL);
+	convert_vtodo_property_to_updatexml (msg, "Subject", icalcomponent_get_summary (icalcomp), "item", NULL, NULL);
 
 	convert_vtodo_property_to_updatexml (msg, "Body", icalcomponent_get_description (icalcomp), "item", "BodyType", "Text");
 
@@ -2055,7 +2067,7 @@ convert_vtodo_component_to_updatexml (ESoapMessage *msg,
 		value = icalproperty_get_percentcomplete (prop);
 		snprintf (buffer, 16, "%d", value);
 		e_ews_message_start_set_item_field (msg, "PercentComplete", "task", "Task");
-		e_ews_message_write_string_parameter(msg, "PercentComplete", NULL, buffer);
+		e_ews_message_write_string_parameter (msg, "PercentComplete", NULL, buffer);
 		e_ews_message_end_set_item_field (msg);
 	}
 
@@ -2195,8 +2207,9 @@ e_cal_backend_ews_modify_object (ECalBackend *backend,
 
 	ews_cal_component_get_item_id (comp, &itemid, &changekey);
 	if (!itemid) {
-		g_propagate_error (&error, EDC_ERROR_EX (OtherError,
-					       "Cannot determine EWS ItemId"));
+		g_propagate_error (
+			&error, EDC_ERROR_EX (OtherError,
+			"Cannot determine EWS ItemId"));
 		g_object_unref (comp);
 		goto exit;
 	}
@@ -2333,7 +2346,7 @@ e_ews_get_icalcomponent_as_mime_content (icalcomponent *vevent)
 	gchar *vcal_str;
 
 	vcal = icalcomponent_new (ICAL_VCALENDAR_COMPONENT);
-	icalcomponent_add_property (vcal, icalproperty_new_version("2.0"));
+	icalcomponent_add_property (vcal, icalproperty_new_version ("2.0"));
 	icalcomponent_add_property (vcal, icalproperty_new_method (ICAL_METHOD_REQUEST));
 	icalcomponent_add_component (vcal, icalcomponent_new_clone (vevent));
 
@@ -2351,7 +2364,7 @@ prepare_create_item_with_mime_content_request (ESoapMessage *msg,
 	gchar *mime_content = (gchar *) user_data;
 
 	/* Prepare CalendarItem node in the SOAP message */
-	e_soap_message_start_element(msg, "CalendarItem", NULL, NULL);
+	e_soap_message_start_element (msg, "CalendarItem", NULL, NULL);
 
 	e_ews_message_write_base64_parameter (msg,"MimeContent",NULL,mime_content);
 	// end of "CalendarItem"
@@ -2566,7 +2579,7 @@ e_cal_backend_ews_receive_objects (ECalBackend *backend,
 				if (!g_strcmp0 (response_type, "ACCEPTED")) {
 					/*we have to edit the meeting subject to remove exchange header*/
 					summary = icalcomponent_get_first_property (subcomp, ICAL_SUMMARY_PROPERTY);
-					split_subject  = g_strsplit (icalproperty_get_value_as_string(summary), ":", -1);
+					split_subject  = g_strsplit (icalproperty_get_value_as_string (summary), ":", -1);
 					icalproperty_set_value_from_string (summary, split_subject[1] , "NO");
 					g_strfreev (split_subject);
 
@@ -2591,7 +2604,8 @@ static const gchar *
 e_cal_get_meeting_cancellation_comment (ECalComponent *comp)
 {
 	icalproperty *prop;
-	prop = icalcomponent_get_first_property (e_cal_component_get_icalcomponent (comp),
+	prop = icalcomponent_get_first_property (
+		e_cal_component_get_icalcomponent (comp),
 		ICAL_X_PROPERTY);
 	while (prop) {
 		const gchar *x_name, *x_val;
@@ -2600,35 +2614,38 @@ e_cal_get_meeting_cancellation_comment (ECalComponent *comp)
 		if (!g_ascii_strcasecmp (x_name, "X-EVOLUTION-RETRACT-COMMENT"))
 			return x_val;
 
-		prop = icalcomponent_get_next_property (e_cal_component_get_icalcomponent (comp),
+		prop = icalcomponent_get_next_property (
+			e_cal_component_get_icalcomponent (comp),
 			ICAL_X_PROPERTY);
 	}
-	return NULL;
 
+	return NULL;
 }
 
 static icaltimezone *
 e_cal_get_timezone_from_ical_component (ECalBackend *backend,
-                                        icalcomponent *comp) {
-        icalproperty *prop;
-        icalparameter *param;
+                                        icalcomponent *comp)
+{
+	icalproperty *prop;
+	icalparameter *param;
 
-        prop = icalcomponent_get_first_property (comp,
-                                        ICAL_DTSTART_PROPERTY);
-        if ((param = icalproperty_get_first_parameter (prop,
-                                        ICAL_TZID_PARAMETER))) {
-                const gchar *tzid = icalparameter_get_tzid (param);
-                icaltimezone *zone;
+	prop = icalcomponent_get_first_property (
+		comp, ICAL_DTSTART_PROPERTY);
+	if ((param = icalproperty_get_first_parameter (prop,
+		ICAL_TZID_PARAMETER))) {
+		const gchar *tzid = icalparameter_get_tzid (param);
+		icaltimezone *zone;
 
-                zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
-                if (zone)
-                        return zone;
+		zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
+		if (zone)
+			return zone;
 
-                return e_cal_backend_ews_internal_get_timezone (E_CAL_BACKEND (backend), tzid);
-        }
+		return e_cal_backend_ews_internal_get_timezone (E_CAL_BACKEND (backend), tzid);
+	}
 
 	g_warning ("EEE Cant figure the relevant timezone of the component\n");
-        return NULL;
+
+	return NULL;
 }
 
 static void
@@ -2651,8 +2668,8 @@ ewscal_send_cancellation_email (ECalBackend *backend,
 	struct icaltimetype dt;
 
 	vcal = icalcomponent_new (ICAL_VCALENDAR_COMPONENT);
-	icalcomponent_add_property (vcal, icalproperty_new_version("2.0"));
-        icalcomponent_add_property (vcal, icalproperty_new_prodid("-//Evolution EWS backend//EN"));
+	icalcomponent_add_property (vcal, icalproperty_new_version ("2.0"));
+	icalcomponent_add_property (vcal, icalproperty_new_prodid ("-//Evolution EWS backend//EN"));
 	icalcomponent_add_property (vcal, icalproperty_new_method (ICAL_METHOD_CANCEL));
 	vevent = icalcomponent_new_from_string (calobj);
 	prop = icalcomponent_get_first_property (vevent, ICAL_STATUS_PROPERTY);
@@ -2669,14 +2686,14 @@ ewscal_send_cancellation_email (ECalBackend *backend,
 	camel_mime_part_set_content (text_part, body, strlen (body), "text/plain");
 
 	vcal_part = camel_mime_part_new ();
-	camel_content_type_set_param(CAMEL_DATA_WRAPPER (vcal_part)->mime_type, "charset", "utf-8");
-	camel_content_type_set_param(CAMEL_DATA_WRAPPER (vcal_part)->mime_type, "method", "CANCEL");
+	camel_content_type_set_param (CAMEL_DATA_WRAPPER (vcal_part)->mime_type, "charset", "utf-8");
+	camel_content_type_set_param (CAMEL_DATA_WRAPPER (vcal_part)->mime_type, "method", "CANCEL");
 	ical_str = icalcomponent_as_ical_string_r ((icalcomponent *) vcal);
 	camel_mime_part_set_content (vcal_part, ical_str, strlen (ical_str), "text/calendar; method=CANCEL");
 	free (ical_str);
 
 	multi = camel_multipart_new ();
-	camel_data_wrapper_set_mime_type(CAMEL_DATA_WRAPPER (multi), "multipart/alternative");
+	camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (multi), "multipart/alternative");
 	camel_multipart_add_part (multi, text_part);
 	camel_multipart_set_boundary (multi, NULL);
 	camel_multipart_add_part (multi, vcal_part);
@@ -2762,7 +2779,7 @@ e_cal_backend_ews_send_objects (ECalBackend *backend,
 		org_prop = icalcomponent_get_first_property (subcomp, ICAL_ORGANIZER_PROPERTY);
 		org = icalproperty_get_organizer (org_prop);
 		if (!g_ascii_strncasecmp (org, "MAILTO:", 7))
-				org_email = (org) + 7;
+			org_email = (org) + 7;
 			else
 				org_email = org;
 
@@ -2823,9 +2840,10 @@ put_component_to_store (ECalBackendEws *cbews,
 
 	priv = cbews->priv;
 
-	e_cal_util_get_component_occur_times (comp, &time_start, &time_end,
-				   resolve_tzid, cbews, priv->default_zone,
-				   e_cal_backend_get_kind (E_CAL_BACKEND (cbews)));
+	e_cal_util_get_component_occur_times (
+		comp, &time_start, &time_end,
+		resolve_tzid, cbews, priv->default_zone,
+		e_cal_backend_get_kind (E_CAL_BACKEND (cbews)));
 
 	e_cal_backend_store_put_component_with_time_range (priv->store, comp, time_start, time_end);
 }
@@ -2853,7 +2871,7 @@ ews_get_attachments_ready_callback (GObject *object,
 	icalproperty *icalprop;
 	icalparameter *icalparam;
 
-	ids = e_ews_connection_get_attachments_finish	(cnc, res, &uris, &error);
+	ids = e_ews_connection_get_attachments_finish (cnc, res, &uris, &error);
 
 	comp_att = att_data->comp;
 	cbews = att_data->cbews;
@@ -2936,7 +2954,7 @@ ews_get_attachments (ECalBackendEws *cbews,
 
 static void
 add_item_to_cache (ECalBackendEws *cbews,
-		   EEwsConnection *cnc,
+                   EEwsConnection *cnc,
                    EEwsItem *item)
 {
 	ECalBackendEwsPrivate *priv;
@@ -2964,7 +2982,7 @@ add_item_to_cache (ECalBackendEws *cbews,
 		icalcomponent_add_property (icalcomp, icalprop);
 		/*status*/
 		ews_task_status = e_ews_item_get_status (item);
-		if (!g_strcmp0(ews_task_status, "NotStarted") == 0) {
+		if (!g_strcmp0 (ews_task_status, "NotStarted") == 0) {
 			if (g_strcmp0 (ews_task_status, "Completed") == 0)
 				status = ICAL_STATUS_COMPLETED;
 			else if (g_strcmp0 (ews_task_status, "InProgress") == 0)
@@ -3163,11 +3181,11 @@ add_item_to_cache (ECalBackendEws *cbews,
 			param = icalparameter_new_cn (attendee->mailbox->name);
 			icalproperty_add_parameter (icalprop, param);
 
-			if (g_ascii_strcasecmp(attendee->attendeetype, "Required") == 0) {
+			if (g_ascii_strcasecmp (attendee->attendeetype, "Required") == 0) {
 				param = icalparameter_new_role (ICAL_ROLE_REQPARTICIPANT);
 				cu_type = icalparameter_new_cutype (ICAL_CUTYPE_INDIVIDUAL);
 			}
-			else if (g_ascii_strcasecmp(attendee->attendeetype, "Resource") == 0) {
+			else if (g_ascii_strcasecmp (attendee->attendeetype, "Resource") == 0) {
 				param = icalparameter_new_role (ICAL_ROLE_NONPARTICIPANT);
 				cu_type = icalparameter_new_cutype (ICAL_CUTYPE_RESOURCE);
 			}
@@ -3203,11 +3221,11 @@ add_item_to_cache (ECalBackendEws *cbews,
 			icalcomponent_add_property (icalcomp, freebusy);
 		}
 		for (icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
-				icalprop != NULL;
-				icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
+			icalprop != NULL;
+			icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
 
-			if (g_strcmp0(icalproperty_get_x_name(icalprop), "X-MICROSOFT-CDO-BUSYSTATUS") == 0) {
-				if (g_strcmp0(icalproperty_get_value_as_string(icalprop), "BUSY") == 0) {
+			if (g_strcmp0 (icalproperty_get_x_name (icalprop), "X-MICROSOFT-CDO-BUSYSTATUS") == 0) {
+				if (g_strcmp0 (icalproperty_get_value_as_string (icalprop), "BUSY") == 0) {
 					icalproperty_set_transp (freebusy, ICAL_TRANSP_OPAQUE);
 				} else {
 					icalproperty_set_transp (freebusy, ICAL_TRANSP_TRANSPARENT);
@@ -3219,11 +3237,11 @@ add_item_to_cache (ECalBackendEws *cbews,
 
 		/*AllDayEvent*/
 		for (icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
-				icalprop != NULL;
-				icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
+			icalprop != NULL;
+			icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
 
-			if (g_strcmp0(icalproperty_get_x_name(icalprop), "X-MICROSOFT-CDO-ALLDAYEVENT") == 0) {
-				if (g_strcmp0(icalproperty_get_value_as_string(icalprop), "TRUE") == 0) {
+			if (g_strcmp0 (icalproperty_get_x_name (icalprop), "X-MICROSOFT-CDO-ALLDAYEVENT") == 0) {
+				if (g_strcmp0 (icalproperty_get_value_as_string (icalprop), "TRUE") == 0) {
 					struct icaltimetype dtend, dtstart;
 					dtstart = icalcomponent_get_dtstart (icalcomp);
 					dtstart.is_date = 1;
@@ -3615,7 +3633,7 @@ ews_start_sync (gpointer data)
 	GThread *thread;
 
 	/* run the actual operation in thread,
-	   to not block main thread of the factory */
+	 * to not block main thread of the factory */
 	thread = g_thread_new (NULL, ews_start_sync_thread, g_object_ref (data));
 	g_thread_unref (thread);
 
@@ -3672,9 +3690,8 @@ e_cal_backend_ews_start_query (ECalBackend *backend,
 	if (!sexp || !strcmp (sexp, "#t"))
 		search_needed = FALSE;
 
-	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (cbsexp,
-									    &occur_start,
-									    &occur_end);
+	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (
+		cbsexp, &occur_start, &occur_end);
 	components = prunning_by_time ?
 		e_cal_backend_store_get_components_occuring_in_range (priv->store, occur_start, occur_end)
 		: e_cal_backend_store_get_components (priv->store);
@@ -3743,36 +3760,36 @@ prepare_free_busy_request (ESoapMessage *msg,
 
 	ewscal_set_availability_timezone (msg, free_busy_data->timezone);
 
-	e_soap_message_start_element(msg, "MailboxDataArray", "messages", NULL);
+	e_soap_message_start_element (msg, "MailboxDataArray", "messages", NULL);
 
 	for (addr = free_busy_data->users; addr; addr = addr->next) {
-		e_soap_message_start_element(msg, "MailboxData", NULL, NULL);
+		e_soap_message_start_element (msg, "MailboxData", NULL, NULL);
 
-		e_soap_message_start_element(msg, "Email", NULL, NULL);
+		e_soap_message_start_element (msg, "Email", NULL, NULL);
 		e_ews_message_write_string_parameter (msg, "Address", NULL, addr->data);
-		e_soap_message_end_element(msg); /* "Email" */
+		e_soap_message_end_element (msg); /* "Email" */
 
 		e_ews_message_write_string_parameter (msg, "AttendeeType", NULL, "Required");
 		e_ews_message_write_string_parameter (msg, "ExcludeConflicts", NULL, "false");
 
-		e_soap_message_end_element(msg); /* "MailboxData" */
+		e_soap_message_end_element (msg); /* "MailboxData" */
 	}
 
-	e_soap_message_end_element(msg); /* "MailboxDataArray" */
+	e_soap_message_end_element (msg); /* "MailboxDataArray" */
 
-	e_soap_message_start_element(msg, "FreeBusyViewOptions", NULL, NULL);
+	e_soap_message_start_element (msg, "FreeBusyViewOptions", NULL, NULL);
 
-	e_soap_message_start_element(msg, "TimeWindow", NULL, NULL);
+	e_soap_message_start_element (msg, "TimeWindow", NULL, NULL);
 	t_start = icaltime_from_timet_with_zone (free_busy_data->start, 0, free_busy_data->timezone);
 	t_end = icaltime_from_timet_with_zone (free_busy_data->end, 0, free_busy_data->timezone);
 	ewscal_set_time (msg, "StartTime", &t_start, FALSE);
 	ewscal_set_time (msg, "EndTime", &t_end, FALSE);
-	e_soap_message_end_element(msg); /* "TimeWindow" */
+	e_soap_message_end_element (msg); /* "TimeWindow" */
 
 	e_ews_message_write_string_parameter (msg, "MergedFreeBusyIntervalInMinutes", NULL, "60");
 	e_ews_message_write_string_parameter (msg, "RequestedView", NULL, "DetailedMerged");
 
-	e_soap_message_end_element(msg); /* "FreeBusyViewOptions" */
+	e_soap_message_end_element (msg); /* "FreeBusyViewOptions" */
 }
 
 static void
@@ -3885,16 +3902,17 @@ e_cal_backend_ews_get_backend_property (ECalBackend *backend,
 	g_return_if_fail (prop_name != NULL);
 
 	if (g_str_equal (prop_name, CLIENT_BACKEND_PROPERTY_CAPABILITIES)) {
-		prop_value = g_strdup	(CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS ","
-					 CAL_STATIC_CAPABILITY_ONE_ALARM_ONLY ","
-					 CAL_STATIC_CAPABILITY_REMOVE_ALARMS ","
-					 CAL_STATIC_CAPABILITY_REFRESH_SUPPORTED ","
-					 CAL_STATIC_CAPABILITY_NO_THISANDPRIOR ","
-					 CAL_STATIC_CAPABILITY_NO_THISANDFUTURE ","
-					 CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK ","
-				//	 CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR ","
-					 CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT ","
-					 CAL_STATIC_CAPABILITY_SAVE_SCHEDULES);
+		prop_value = g_strdup (
+			CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS ","
+			CAL_STATIC_CAPABILITY_ONE_ALARM_ONLY ","
+			CAL_STATIC_CAPABILITY_REMOVE_ALARMS ","
+			CAL_STATIC_CAPABILITY_REFRESH_SUPPORTED ","
+			CAL_STATIC_CAPABILITY_NO_THISANDPRIOR ","
+			CAL_STATIC_CAPABILITY_NO_THISANDFUTURE ","
+			CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK ","
+			//	 CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR ","
+			CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT ","
+			CAL_STATIC_CAPABILITY_SAVE_SCHEDULES);
 	} else if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS)) {
 		/* return email address of the person who opened the calendar */
 		ECalBackendEws *cbews;
@@ -4212,9 +4230,9 @@ e_cal_backend_ews_init (ECalBackendEws *cbews)
 	/* create the mutex for thread safety */
 	g_static_rec_mutex_init (&priv->rec_mutex);
 	priv->item_id_hash = g_hash_table_new_full
-						(g_str_hash, g_str_equal,
-						 (GDestroyNotify) g_free,
-						 (GDestroyNotify) g_object_unref);
+		(g_str_hash, g_str_equal,
+		(GDestroyNotify) g_free,
+		(GDestroyNotify) g_object_unref);
 	priv->default_zone = icaltimezone_get_utc_timezone ();
 	priv->cancellable = g_cancellable_new ();
 
diff --git a/src/camel/camel-ews-folder.c b/src/camel/camel-ews-folder.c
index fe8b28c..438fb4b 100644
--- a/src/camel/camel-ews-folder.c
+++ b/src/camel/camel-ews-folder.c
@@ -125,9 +125,10 @@ ews_data_cache_remove (CamelDataCache *cdc,
 	gint ret;
 
 	g_checksum_update (sha, (guchar *) key, strlen (key));
-	ret = camel_data_cache_remove (cdc, path, g_checksum_get_string (sha),
-				       error);
+	ret = camel_data_cache_remove (
+		cdc, path, g_checksum_get_string (sha), error);
 	g_checksum_free (sha);
+
 	return ret;
 }
 
@@ -141,9 +142,10 @@ ews_data_cache_get (CamelDataCache *cdc,
 	CamelStream *ret;
 
 	g_checksum_update (sha, (guchar *) key, strlen (key));
-	ret = camel_data_cache_get (cdc, path, g_checksum_get_string (sha),
-				    error);
+	ret = camel_data_cache_get (
+		cdc, path, g_checksum_get_string (sha), error);
 	g_checksum_free (sha);
+
 	return ret;
 }
 
@@ -182,8 +184,9 @@ camel_ews_folder_get_message_from_cache (CamelEwsFolder *ews_folder,
 		gchar *old_fname = camel_data_cache_get_filename (
 			ews_folder->cache, "cur", uid);
 		if (!g_access (old_fname, R_OK)) {
-			gchar *new_fname = ews_data_cache_get_filename (ews_folder->cache,
-									"cur", uid, error);
+			gchar *new_fname = ews_data_cache_get_filename (
+				ews_folder->cache,
+				"cur", uid, error);
 			g_rename (old_fname, new_fname);
 			g_free (new_fname);
 			stream = ews_data_cache_get (ews_folder->cache, "cur", uid, error);
@@ -198,7 +201,7 @@ camel_ews_folder_get_message_from_cache (CamelEwsFolder *ews_folder,
 	msg = camel_mime_message_new ();
 
 	if (!camel_data_wrapper_construct_from_stream_sync (
-				(CamelDataWrapper *) msg, stream, cancellable, error)) {
+		(CamelDataWrapper *) msg, stream, cancellable, error)) {
 		g_object_unref (msg);
 		msg = NULL;
 	}
@@ -259,24 +262,26 @@ ews_update_mgtrequest_mime_calendar_itemid (const gchar *mime_fname,
 	// original mime file
 	fd_old = open (mime_fname, O_RDONLY);
 	if (fd_old == -1) {
-		g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-			     _("Unable to open mimecontent temporary file!"));
+		g_set_error (
+			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+			_("Unable to open mimecontent temporary file!"));
 		return NULL;
 	}
 
 	mimeparser = camel_mime_parser_new ();
 	if (camel_mime_parser_init_with_fd (mimeparser, fd_old) == -1) {
-		g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-			     _("Unable to generate parser from mimecontent!"));
+		g_set_error (
+			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+			_("Unable to generate parser from mimecontent!"));
 		goto exit_parser;
 	}
 
 	msg = camel_mime_message_new ();
-	if (camel_mime_part_construct_from_parser_sync (CAMEL_MIME_PART (msg),
-							mimeparser, NULL,
-							error) == -1) {
-		g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-			     _("Unable to parse meeting request mimecontent!"));
+	if (camel_mime_part_construct_from_parser_sync (
+		CAMEL_MIME_PART (msg), mimeparser, NULL, error) == -1) {
+		g_set_error (
+			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+			_("Unable to parse meeting request mimecontent!"));
 		goto exit_msg;
 	}
 
@@ -294,8 +299,8 @@ ews_update_mgtrequest_mime_calendar_itemid (const gchar *mime_fname,
 
 		dw = camel_medium_get_content (CAMEL_MEDIUM (mimepart));
 		tmpstream = camel_stream_mem_new ();
-		if (camel_data_wrapper_decode_to_stream_sync (dw, tmpstream,
-							      NULL, error) == -1) {
+		if (camel_data_wrapper_decode_to_stream_sync (
+			dw, tmpstream, NULL, error) == -1) {
 			g_object_unref (tmpstream);
 			goto exit_msg;
 		}
@@ -319,9 +324,11 @@ ews_update_mgtrequest_mime_calendar_itemid (const gchar *mime_fname,
 			icalcomponent_add_property (subcomp, icalprop);
 		}
 		calstring_new = icalcomponent_as_ical_string_r (icalcomp);
-		camel_mime_part_set_content (mimepart,
-					     (const gchar *) calstring_new, strlen (calstring_new),
-					     "text/calendar");
+		camel_mime_part_set_content (
+			mimepart,
+			(const gchar *) calstring_new,
+			strlen (calstring_new),
+			"text/calendar");
 		g_free (calstring_new);
 		icalcomponent_free (icalcomp);
 		g_object_unref (tmpstream);
@@ -329,16 +336,18 @@ ews_update_mgtrequest_mime_calendar_itemid (const gchar *mime_fname,
 		// Create a new file to store updated mimecontent
 		temp = g_strrstr (mime_fname, "/");
 		dir = g_strndup (mime_fname, temp - mime_fname);
-		mime_fname_new = g_build_filename ((const gchar*) dir, "XXXXXX", NULL);
+		mime_fname_new = g_build_filename ((const gchar *) dir, "XXXXXX", NULL);
 		fd = g_mkstemp (mime_fname_new);
 		if (fd == -1) {
-			g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-				     _("Unable to create cache file"));
+			g_set_error (
+				error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+				_("Unable to create cache file"));
 			goto exit_save;
 		}
 		newstream = camel_stream_fs_new_with_fd (fd);
-		if (camel_data_wrapper_write_to_stream_sync (CAMEL_DATA_WRAPPER (msg),
-							     newstream, NULL, error) == -1)
+		if (camel_data_wrapper_write_to_stream_sync (
+			CAMEL_DATA_WRAPPER (msg),
+			newstream, NULL, error) == -1)
 			goto exit_save;
 		if (camel_stream_flush (newstream, NULL, error) == -1)
 			goto exit_save;
@@ -429,13 +438,15 @@ camel_ews_folder_get_message (CamelFolder *folder,
 	cnc = camel_ews_store_ref_connection (ews_store);
 	ids = g_slist_append (ids, (gchar *) uid);
 
-	mime_dir = g_build_filename (camel_data_cache_get_path (ews_folder->cache),
-				     "mimecontent", NULL);
+	mime_dir = g_build_filename (
+		camel_data_cache_get_path (ews_folder->cache),
+		"mimecontent", NULL);
 
 	if (g_access (mime_dir, F_OK) == -1 &&
 	    g_mkdir_with_parents (mime_dir, 0700) == -1) {
-		g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-			     _("Unable to create cache path"));
+		g_set_error (
+			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+			_("Unable to create cache path"));
 		g_free (mime_dir);
 		goto exit;
 	}
@@ -507,14 +518,15 @@ camel_ews_folder_get_message (CamelFolder *folder,
 		}
 	}
 
-	cache_file = ews_data_cache_get_filename (ews_folder->cache, "cur",
-						  uid, error);
+	cache_file = ews_data_cache_get_filename (
+		ews_folder->cache, "cur", uid, error);
 	temp = g_strrstr (cache_file, "/");
 	dir = g_strndup (cache_file, temp - cache_file);
 
 	if (g_mkdir_with_parents (dir, 0700) == -1) {
-		g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-			     _("Unable to create cache path"));
+		g_set_error (
+			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+			_("Unable to create cache path"));
 		g_free (dir);
 		g_free (cache_file);
 		goto exit;
@@ -522,8 +534,9 @@ camel_ews_folder_get_message (CamelFolder *folder,
 	g_free (dir);
 
 	if (g_rename (mime_content, cache_file) != 0) {
-		g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-			     _("Failed to move message cache file"));
+		g_set_error (
+			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+			_("Failed to move message cache file"));
 		g_free (cache_file);
 		goto exit;
 	}
@@ -684,8 +697,9 @@ msg_update_flags (ESoapMessage *msg,
 
 		flags_changed = mi->server_flags ^ mi->info.flags;
 
-		e_ews_message_start_item_change (msg, E_EWS_ITEMCHANGE_TYPE_ITEM,
-						 mi->info.uid, mi->change_key, 0);
+		e_ews_message_start_item_change (
+			msg, E_EWS_ITEMCHANGE_TYPE_ITEM,
+			mi->info.uid, mi->change_key, 0);
 		if (flags_changed & CAMEL_MESSAGE_FLAGGED) {
 			const gchar *flag;
 
@@ -716,8 +730,10 @@ msg_update_flags (ESoapMessage *msg,
 			e_soap_message_end_element (msg);
 
 			e_soap_message_start_element (msg, "Message", NULL, NULL);
-			e_ews_message_write_string_parameter (msg, "IsRead", NULL,
-					      (mi->info.flags & CAMEL_MESSAGE_SEEN)?"true":"false");
+			e_ews_message_write_string_parameter (
+				msg, "IsRead", NULL,
+				(mi->info.flags & CAMEL_MESSAGE_SEEN) ?
+				"true" : "false");
 
 			e_soap_message_end_element (msg); /* Message */
 			e_soap_message_end_element (msg); /* SetItemField */
@@ -880,7 +896,8 @@ ews_move_to_junk_folder (CamelFolder *folder,
 		folder_id = camel_ews_store_summary_get_folder_id_from_folder_type (
 			ews_store->summary, CAMEL_FOLDER_TYPE_JUNK);
 
-		status = e_ews_connection_move_items_sync (cnc, EWS_PRIORITY_MEDIUM, folder_id, FALSE,
+		status = e_ews_connection_move_items_sync (
+			cnc, EWS_PRIORITY_MEDIUM, folder_id, FALSE,
 			junk_uids, &moved_items, cancellable, &local_error);
 
 		if (!status && local_error && local_error->code == EWS_CONNECTION_ERROR_ITEMNOTFOUND) {
@@ -1170,9 +1187,9 @@ sync_updated_items (CamelEwsFolder *ews_folder,
 	if (msg_ids)
 		e_ews_connection_get_items_sync (
 			cnc, EWS_PRIORITY_MEDIUM,
-			 msg_ids, "IdOnly", SUMMARY_MESSAGE_FLAGS,
-			 FALSE, NULL, &items, NULL, NULL,
-			 cancellable, &local_error);
+			msg_ids, "IdOnly", SUMMARY_MESSAGE_FLAGS,
+			FALSE, NULL, &items, NULL, NULL,
+			cancellable, &local_error);
 
 	camel_ews_utils_sync_updated_items (ews_folder, items);
 	items = NULL;
@@ -1351,9 +1368,8 @@ ews_refresh_info_sync (CamelFolder *folder,
 
 	camel_folder_summary_prepare_fetch_all (folder->summary, NULL);
 
-	id = camel_ews_store_summary_get_folder_id_from_name
-						(ews_store->summary,
-						 full_name);
+	id = camel_ews_store_summary_get_folder_id_from_name (
+		ews_store->summary, full_name);
 
 	/* Sync folder items does not return the fields ToRecipients,
 	 * CCRecipients. With the item_type unknown, its not possible
@@ -1362,8 +1378,7 @@ ews_refresh_info_sync (CamelFolder *folder,
 	 * SyncFolderItem request and fetch the item using the
 	 * GetItem request. */
 	sync_state = ((CamelEwsSummary *) folder->summary)->sync_state;
-	do
-	{
+	do {
 		GSList *items_created = NULL, *items_updated = NULL;
 		GSList *items_deleted = NULL;
 		guint32 total, unread;
@@ -1450,8 +1465,9 @@ ews_append_message_sync (CamelFolder *folder,
 	ews_store = (CamelEwsStore *) camel_folder_get_parent_store (folder);
 
 	folder_name = camel_folder_get_full_name (folder);
-	folder_id = camel_ews_store_summary_get_folder_id_from_name (ews_store->summary,
-								     folder_name);
+	folder_id = camel_ews_store_summary_get_folder_id_from_name (
+		ews_store->summary,
+		folder_name);
 	if (!folder_id)
 		return FALSE;
 
@@ -1464,16 +1480,17 @@ ews_append_message_sync (CamelFolder *folder,
 	cnc = camel_ews_store_ref_connection (ews_store);
 
 	if (!cnc) {
-		g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-			     _("Cant perform actions on the folder while in offline mode"));
+		g_set_error (
+			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+			_("Cant perform actions on the folder while in offline mode"));
 		return FALSE;
 	}
 
-	if (!camel_ews_utils_create_mime_message (cnc, "SaveOnly", folder_id,
-						  message,
-						  camel_message_info_flags (info),
-						  from, &itemid, &changekey,
-						  cancellable, &local_error)) {
+	if (!camel_ews_utils_create_mime_message (
+		cnc, "SaveOnly", folder_id, message,
+		camel_message_info_flags (info),
+		from, &itemid, &changekey,
+		cancellable, &local_error)) {
 		camel_ews_store_maybe_disconnect (ews_store, local_error);
 		g_propagate_error (error, local_error);
 		g_free (folder_id);
@@ -1521,19 +1538,18 @@ ews_transfer_messages_to_sync (CamelFolder *source,
 		return FALSE;
 
 	cnc = camel_ews_store_ref_connection (dst_ews_store);
-	dst_id = camel_ews_store_summary_get_folder_id_from_name
-						(dst_ews_store->summary,
-						 dst_full_name);
+	dst_id = camel_ews_store_summary_get_folder_id_from_name (
+		dst_ews_store->summary, dst_full_name);
 
 	for (i = 0; i < uids->len; i++) {
 		ids = g_slist_append (ids, (gchar *) uids->pdata[i]);
 	}
 
 	if (e_ews_connection_move_items_sync (
-			cnc, EWS_PRIORITY_MEDIUM,
-			dst_id, !delete_originals,
-			ids, &ret_items,
-			cancellable, &local_error)) {
+		cnc, EWS_PRIORITY_MEDIUM,
+		dst_id, !delete_originals,
+		ids, &ret_items,
+		cancellable, &local_error)) {
 
 		if (delete_originals) {
 			changes = camel_folder_change_info_new ();
@@ -1617,7 +1633,7 @@ ews_delete_messages (CamelFolder *folder,
 				camel_folder_summary_lock (folder->summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 				camel_folder_change_info_remove_uid (changes, uid);
 				camel_folder_summary_remove_uid (folder->summary, uid);
-				ews_data_cache_remove(ews_folder->cache, "cur", uid, NULL);
+				ews_data_cache_remove (ews_folder->cache, "cur", uid, NULL);
 				camel_folder_summary_unlock (folder->summary, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 				deleted_items = g_slist_next (deleted_items);
 			}
diff --git a/src/camel/camel-ews-store-summary.c b/src/camel/camel-ews-store-summary.c
index 5c16c86..bb66972 100644
--- a/src/camel/camel-ews-store-summary.c
+++ b/src/camel/camel-ews-store-summary.c
@@ -65,9 +65,10 @@ camel_ews_store_summary_init (CamelEwsStoreSummary *ews_summary)
 	priv->key_file = g_key_file_new ();
 	priv->dirty = FALSE;
 	priv->fname_id_hash = g_hash_table_new (g_str_hash, g_str_equal);
-	priv->id_fname_hash = g_hash_table_new_full (g_str_hash, g_str_equal,
-						     (GDestroyNotify) g_free,
-						     (GDestroyNotify) g_free);
+	priv->id_fname_hash = g_hash_table_new_full (
+		g_str_hash, g_str_equal,
+		(GDestroyNotify) g_free,
+		(GDestroyNotify) g_free);
 	g_static_rec_mutex_init (&priv->s_lock);
 }
 
@@ -177,9 +178,8 @@ camel_ews_store_summary_load (CamelEwsStoreSummary *ews_summary,
 
 	S_LOCK (ews_summary);
 
-	ret = g_key_file_load_from_file	(priv->key_file,
-					 priv->path,
-					 0, error);
+	ret = g_key_file_load_from_file (
+		priv->key_file, priv->path, 0, error);
 
 	load_id_fname_hash (ews_summary);
 	S_UNLOCK (ews_summary);
@@ -201,12 +201,13 @@ camel_ews_store_summary_save (CamelEwsStoreSummary *ews_summary,
 	if (!priv->dirty)
 		goto exit;
 
-	contents = g_key_file_to_data	(priv->key_file, NULL,
-					 NULL);
-	file = g_file_new_for_path	(priv->path);
-	ret = g_file_replace_contents	(file, contents, strlen (contents),
-					 NULL, FALSE, G_FILE_CREATE_PRIVATE,
-					 NULL, NULL, error);
+	contents = g_key_file_to_data (
+		priv->key_file, NULL, NULL);
+	file = g_file_new_for_path (priv->path);
+	ret = g_file_replace_contents (
+		file, contents, strlen (contents),
+		NULL, FALSE, G_FILE_CREATE_PRIVATE,
+		NULL, NULL, error);
 	g_object_unref (file);
 	priv->dirty = FALSE;
 
@@ -268,9 +269,11 @@ match_subfolder (gpointer key,
 
 /* Must be called with the summary lock held, and gets to keep
  * both its string arguments */
-static void ews_ss_hash_replace (CamelEwsStoreSummary *ews_summary,
-				 gchar *folder_id, gchar *full_name,
-				 gboolean recurse)
+static void
+ews_ss_hash_replace (CamelEwsStoreSummary *ews_summary,
+                     gchar *folder_id,
+                     gchar *full_name,
+                     gboolean recurse)
 {
 	const gchar *ofname;
 	struct subfolder_match sm = { NULL, NULL };
@@ -278,16 +281,16 @@ static void ews_ss_hash_replace (CamelEwsStoreSummary *ews_summary,
 	if (!full_name)
 		full_name = build_full_name (ews_summary, folder_id);
 
-	ofname = g_hash_table_lookup (ews_summary->priv->id_fname_hash,
-				      folder_id);
+	ofname = g_hash_table_lookup (
+		ews_summary->priv->id_fname_hash, folder_id);
 	/* Remove the old fullname->id hash entry *iff* it's pointing
 	 * to this folder id. */
 	if (ofname) {
-		gchar *ofid = g_hash_table_lookup (ews_summary->priv->fname_id_hash,
-						  ofname);
+		gchar *ofid = g_hash_table_lookup (
+			ews_summary->priv->fname_id_hash, ofname);
 		if (!strcmp (folder_id, ofid)) {
-			g_hash_table_remove (ews_summary->priv->fname_id_hash,
-					     ofname);
+			g_hash_table_remove (
+				ews_summary->priv->fname_id_hash, ofname);
 			if (recurse)
 				sm.match = g_strdup_printf ("%s/", ofname);
 		}
@@ -304,8 +307,9 @@ static void ews_ss_hash_replace (CamelEwsStoreSummary *ews_summary,
 
 		sm.matchlen = strlen (sm.match);
 
-		g_hash_table_foreach (ews_summary->priv->fname_id_hash,
-				      match_subfolder, &sm);
+		g_hash_table_foreach (
+			ews_summary->priv->fname_id_hash,
+			match_subfolder, &sm);
 
 		for (l = sm.ids; l; l = g_slist_next (l))
 			ews_ss_hash_replace (ews_summary, l->data, NULL, FALSE);
@@ -322,8 +326,9 @@ camel_ews_store_summary_set_folder_name (CamelEwsStoreSummary *ews_summary,
 {
 	S_LOCK (ews_summary);
 
-	g_key_file_set_string	(ews_summary->priv->key_file, folder_id,
-				 "DisplayName", display_name);
+	g_key_file_set_string (
+		ews_summary->priv->key_file,
+		folder_id, "DisplayName", display_name);
 
 	ews_ss_hash_replace (ews_summary, g_strdup (folder_id), NULL, TRUE);
 	ews_summary->priv->dirty = TRUE;
@@ -343,18 +348,24 @@ camel_ews_store_summary_new_folder (CamelEwsStoreSummary *ews_summary,
 {
 	S_LOCK (ews_summary);
 
-	g_key_file_set_string (ews_summary->priv->key_file, folder_id,
-			       "ParentFolderId", parent_fid);
-	g_key_file_set_string (ews_summary->priv->key_file, folder_id,
-			       "ChangeKey", change_key);
-	g_key_file_set_string (ews_summary->priv->key_file, folder_id,
-			       "DisplayName", display_name);
-	g_key_file_set_uint64 (ews_summary->priv->key_file, folder_id,
-			       "FolderType", folder_type);
-	g_key_file_set_uint64 (ews_summary->priv->key_file, folder_id,
-			       "Flags", folder_flags);
-	g_key_file_set_uint64 (ews_summary->priv->key_file, folder_id,
-			       "Total", total);
+	g_key_file_set_string (
+		ews_summary->priv->key_file,
+		folder_id, "ParentFolderId", parent_fid);
+	g_key_file_set_string (
+		ews_summary->priv->key_file,
+		folder_id, "ChangeKey", change_key);
+	g_key_file_set_string (
+		ews_summary->priv->key_file,
+		folder_id, "DisplayName", display_name);
+	g_key_file_set_uint64 (
+		ews_summary->priv->key_file,
+		folder_id, "FolderType", folder_type);
+	g_key_file_set_uint64 (
+		ews_summary->priv->key_file,
+		folder_id, "Flags", folder_flags);
+	g_key_file_set_uint64 (
+		ews_summary->priv->key_file,
+		folder_id, "Total", total);
 
 	ews_ss_hash_replace (ews_summary, g_strdup (folder_id), NULL, FALSE);
 
@@ -371,11 +382,13 @@ camel_ews_store_summary_set_parent_folder_id (CamelEwsStoreSummary *ews_summary,
 	S_LOCK (ews_summary);
 
 	if (parent_id)
-		g_key_file_set_string (ews_summary->priv->key_file, folder_id,
-				       "ParentFolderId", parent_id);
+		g_key_file_set_string (
+			ews_summary->priv->key_file,
+			folder_id, "ParentFolderId", parent_id);
 	else
-		g_key_file_remove_key (ews_summary->priv->key_file, folder_id,
-				       "ParentFolderId", NULL);
+		g_key_file_remove_key (
+			ews_summary->priv->key_file,
+			folder_id, "ParentFolderId", NULL);
 
 	ews_ss_hash_replace (ews_summary, g_strdup (folder_id), NULL, TRUE);
 
@@ -391,8 +404,9 @@ camel_ews_store_summary_set_change_key (CamelEwsStoreSummary *ews_summary,
 {
 	S_LOCK (ews_summary);
 
-	g_key_file_set_string	(ews_summary->priv->key_file, folder_id,
-				 "ChangeKey", change_key);
+	g_key_file_set_string (
+		ews_summary->priv->key_file,
+		folder_id, "ChangeKey", change_key);
 	ews_summary->priv->dirty = TRUE;
 
 	S_UNLOCK (ews_summary);
@@ -405,8 +419,9 @@ camel_ews_store_summary_set_sync_state (CamelEwsStoreSummary *ews_summary,
 {
 	S_LOCK (ews_summary);
 
-	g_key_file_set_string	(ews_summary->priv->key_file, folder_id,
-				 "SyncState", sync_state);
+	g_key_file_set_string (
+		ews_summary->priv->key_file,
+		folder_id, "SyncState", sync_state);
 	ews_summary->priv->dirty = TRUE;
 
 	S_UNLOCK (ews_summary);
@@ -419,8 +434,9 @@ camel_ews_store_summary_set_folder_flags (CamelEwsStoreSummary *ews_summary,
 {
 	S_LOCK (ews_summary);
 
-	g_key_file_set_uint64	(ews_summary->priv->key_file, folder_id,
-				 "Flags", flags);
+	g_key_file_set_uint64 (
+		ews_summary->priv->key_file,
+		folder_id, "Flags", flags);
 	ews_summary->priv->dirty = TRUE;
 
 	S_UNLOCK (ews_summary);
@@ -433,8 +449,9 @@ camel_ews_store_summary_set_folder_unread (CamelEwsStoreSummary *ews_summary,
 {
 	S_LOCK (ews_summary);
 
-	g_key_file_set_uint64	(ews_summary->priv->key_file, folder_id,
-				 "UnRead", unread);
+	g_key_file_set_uint64 (
+		ews_summary->priv->key_file,
+		folder_id, "UnRead", unread);
 	ews_summary->priv->dirty = TRUE;
 
 	S_UNLOCK (ews_summary);
@@ -447,8 +464,9 @@ camel_ews_store_summary_set_folder_total (CamelEwsStoreSummary *ews_summary,
 {
 	S_LOCK (ews_summary);
 
-	g_key_file_set_uint64	(ews_summary->priv->key_file, folder_id,
-				 "Total", total);
+	g_key_file_set_uint64 (
+		ews_summary->priv->key_file,
+		folder_id, "Total", total);
 	ews_summary->priv->dirty = TRUE;
 
 	S_UNLOCK (ews_summary);
@@ -461,8 +479,9 @@ camel_ews_store_summary_set_folder_type (CamelEwsStoreSummary *ews_summary,
 {
 	S_LOCK (ews_summary);
 
-	g_key_file_set_uint64	(ews_summary->priv->key_file, folder_id,
-				 "FolderType", ews_folder_type);
+	g_key_file_set_uint64 (
+		ews_summary->priv->key_file,
+		folder_id, "FolderType", ews_folder_type);
 	ews_summary->priv->dirty = TRUE;
 
 	S_UNLOCK (ews_summary);
@@ -475,8 +494,9 @@ camel_ews_store_summary_store_string_val (CamelEwsStoreSummary *ews_summary,
 {
 	S_LOCK (ews_summary);
 
-	g_key_file_set_string	(ews_summary->priv->key_file, STORE_GROUP_NAME,
-				 key, value);
+	g_key_file_set_string (
+		ews_summary->priv->key_file,
+		STORE_GROUP_NAME, key, value);
 	ews_summary->priv->dirty = TRUE;
 
 	S_UNLOCK (ews_summary);
@@ -491,8 +511,9 @@ camel_ews_store_summary_get_folder_name (CamelEwsStoreSummary *ews_summary,
 
 	S_LOCK (ews_summary);
 
-	ret = g_key_file_get_string	(ews_summary->priv->key_file, folder_id,
-					 "DisplayName", error);
+	ret = g_key_file_get_string (
+		ews_summary->priv->key_file, folder_id,
+		"DisplayName", error);
 
 	S_UNLOCK (ews_summary);
 
@@ -527,8 +548,9 @@ camel_ews_store_summary_get_parent_folder_id (CamelEwsStoreSummary *ews_summary,
 
 	S_LOCK (ews_summary);
 
-	ret = g_key_file_get_string	(ews_summary->priv->key_file, folder_id,
-					 "ParentFolderId", error);
+	ret = g_key_file_get_string (
+		ews_summary->priv->key_file, folder_id,
+		"ParentFolderId", error);
 
 	S_UNLOCK (ews_summary);
 
@@ -544,8 +566,9 @@ camel_ews_store_summary_get_change_key (CamelEwsStoreSummary *ews_summary,
 
 	S_LOCK (ews_summary);
 
-	ret = g_key_file_get_string	(ews_summary->priv->key_file, folder_id,
-					 "ChangeKey", error);
+	ret = g_key_file_get_string (
+		ews_summary->priv->key_file, folder_id,
+		"ChangeKey", error);
 
 	S_UNLOCK (ews_summary);
 
@@ -561,8 +584,9 @@ camel_ews_store_summary_get_sync_state (CamelEwsStoreSummary *ews_summary,
 
 	S_LOCK (ews_summary);
 
-	ret = g_key_file_get_string	(ews_summary->priv->key_file, folder_id,
-					 "SyncState", error);
+	ret = g_key_file_get_string (
+		ews_summary->priv->key_file, folder_id,
+		"SyncState", error);
 
 	S_UNLOCK (ews_summary);
 
@@ -578,8 +602,9 @@ camel_ews_store_summary_get_folder_flags (CamelEwsStoreSummary *ews_summary,
 
 	S_LOCK (ews_summary);
 
-	ret = g_key_file_get_uint64	(ews_summary->priv->key_file, folder_id,
-					 "Flags", error);
+	ret = g_key_file_get_uint64 (
+		ews_summary->priv->key_file, folder_id,
+		"Flags", error);
 
 	S_UNLOCK (ews_summary);
 
@@ -595,8 +620,9 @@ camel_ews_store_summary_get_folder_unread (CamelEwsStoreSummary *ews_summary,
 
 	S_LOCK (ews_summary);
 
-	ret = g_key_file_get_uint64	(ews_summary->priv->key_file, folder_id,
-					 "UnRead", error);
+	ret = g_key_file_get_uint64 (
+		ews_summary->priv->key_file, folder_id,
+		"UnRead", error);
 
 	S_UNLOCK (ews_summary);
 
@@ -612,8 +638,9 @@ camel_ews_store_summary_get_folder_total (CamelEwsStoreSummary *ews_summary,
 
 	S_LOCK (ews_summary);
 
-	ret = g_key_file_get_uint64	(ews_summary->priv->key_file, folder_id,
-					 "Total", error);
+	ret = g_key_file_get_uint64 (
+		ews_summary->priv->key_file, folder_id,
+		"Total", error);
 
 	S_UNLOCK (ews_summary);
 
@@ -629,8 +656,9 @@ camel_ews_store_summary_get_folder_type (CamelEwsStoreSummary *ews_summary,
 
 	S_LOCK (ews_summary);
 
-	ret = g_key_file_get_uint64	(ews_summary->priv->key_file, folder_id,
-					 "FolderType", error);
+	ret = g_key_file_get_uint64 (
+		ews_summary->priv->key_file, folder_id,
+		"FolderType", error);
 
 	S_UNLOCK (ews_summary);
 
@@ -646,8 +674,9 @@ camel_ews_store_summary_get_string_val (CamelEwsStoreSummary *ews_summary,
 
 	S_LOCK (ews_summary);
 
-	ret = g_key_file_get_string	(ews_summary->priv->key_file, STORE_GROUP_NAME,
-					 key, error);
+	ret = g_key_file_get_string (
+		ews_summary->priv->key_file, STORE_GROUP_NAME,
+		key, error);
 
 	S_UNLOCK (ews_summary);
 
@@ -704,8 +733,8 @@ camel_ews_store_summary_remove_folder (CamelEwsStoreSummary *ews_summary,
 	if (!full_name)
 		goto unlock;
 
-	ret = g_key_file_remove_group (ews_summary->priv->key_file, folder_id,
-				       error);
+	ret = g_key_file_remove_group (
+		ews_summary->priv->key_file, folder_id, error);
 
 	g_hash_table_remove (ews_summary->priv->fname_id_hash, full_name);
 	g_hash_table_remove (ews_summary->priv->id_fname_hash, folder_id);
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index fb27310..615565a 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -428,14 +428,14 @@ ews_authenticate_sync (CamelService *service,
 			cancellable, &folder_err);
 
 		if (g_slist_length (folders) && (g_slist_length (folders) != G_N_ELEMENTS (system_folder)))
-			d(printf("Error : not all folders are returned by getfolder operation"));
+			d (printf ("Error : not all folders are returned by getfolder operation"));
 		else if (folder_err == NULL && folders != NULL)
 			ews_store_set_flags (ews_store, folders);
 		else if (folder_err) {
 			/*report error and make sure we are not leaking anything*/
 			g_warn_if_fail (folders == NULL);
 		} else
-			d(printf ("folders for respective distinguished ids don't exist"));
+			d (printf ("folders for respective distinguished ids don't exist"));
 
 		g_slist_foreach (folders, (GFunc) g_object_unref, NULL);
 		g_slist_foreach (folder_ids, (GFunc) e_ews_folder_id_free, NULL);
@@ -513,9 +513,10 @@ ews_get_folder_sync (CamelStore *store,
 
 		camel_folder_info_free (fi);
 	} else if (!fid) {
-		g_set_error (error, CAMEL_STORE_ERROR,
-			     CAMEL_ERROR_GENERIC,
-			     _("No such folder: %s"), folder_name);
+		g_set_error (
+			error, CAMEL_STORE_ERROR,
+			CAMEL_ERROR_GENERIC,
+			_("No such folder: %s"), folder_name);
 		return NULL;
 	} else {
 		/* We don't actually care what it is; only that it exists */
@@ -558,7 +559,7 @@ folder_info_from_store_summary (CamelEwsStore *store,
 			continue;
 
 		fi = camel_ews_utils_build_folder_info (store, l->data);
-		g_ptr_array_add	(folder_infos, fi);
+		g_ptr_array_add (folder_infos, fi);
 	}
 
 	root_fi = camel_folder_info_build (folder_infos, top, '/', TRUE);
@@ -584,9 +585,10 @@ ews_folder_hierarchy_ready_cb (GObject *obj,
 	gboolean includes_last_folder;
 	GError *error = NULL;
 
-	e_ews_connection_sync_folder_hierarchy_finish	(cnc, res, &sync_state, &includes_last_folder,
-							 &folders_created, &folders_updated,
-							 &folders_deleted, &error);
+	e_ews_connection_sync_folder_hierarchy_finish (
+		cnc, res, &sync_state, &includes_last_folder,
+		&folders_created, &folders_updated,
+		&folders_deleted, &error);
 
 	if (error != NULL) {
 		g_warning ("Unable to fetch the folder hierarchy: %s :%d \n", error->message, error->code);
@@ -598,8 +600,9 @@ ews_folder_hierarchy_ready_cb (GObject *obj,
 		g_mutex_unlock (priv->get_finfo_lock);
 		goto exit;
 	}
-	ews_update_folder_hierarchy (ews_store, sync_state, includes_last_folder,
-				     folders_created, folders_deleted, folders_updated);
+	ews_update_folder_hierarchy (
+		ews_store, sync_state, includes_last_folder,
+		folders_created, folders_deleted, folders_updated);
 
 	g_mutex_lock (priv->get_finfo_lock);
 	ews_store->priv->last_refresh_time = time (NULL);
@@ -694,8 +697,9 @@ ews_get_folder_info_sync (CamelStore *store,
 
 	if (!success) {
 		if (local_error)
-			g_warning ("Unable to fetch the folder hierarchy: %s :%d \n",
-				   local_error->message, local_error->code);
+			g_warning (
+				"Unable to fetch the folder hierarchy: %s :%d \n",
+				local_error->message, local_error->code);
 		else
 			g_warning ("Unable to fetch the folder hierarchy.\n");
 
@@ -705,8 +709,9 @@ ews_get_folder_info_sync (CamelStore *store,
 		g_mutex_unlock (priv->get_finfo_lock);
 		return NULL;
 	}
-	ews_update_folder_hierarchy (ews_store, sync_state, includes_last_folder,
-				     folders_created, folders_deleted, folders_updated);
+	ews_update_folder_hierarchy (
+		ews_store, sync_state, includes_last_folder,
+		folders_created, folders_deleted, folders_updated);
 	g_mutex_unlock (priv->get_finfo_lock);
 
 offline:
@@ -733,11 +738,13 @@ ews_create_folder_sync (CamelStore *store,
 
 	/* Get Parent folder ID */
 	if (parent_name && parent_name[0]) {
-		fid = camel_ews_store_summary_get_folder_id_from_name (ews_summary,
-								       parent_name);
+		fid = camel_ews_store_summary_get_folder_id_from_name (
+			ews_summary, parent_name);
 		if (!fid) {
-			g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-				     _("Parent folder %s does not exist"), parent_name);
+			g_set_error (
+				error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+				_("Parent folder %s does not exist"),
+				parent_name);
 			return NULL;
 		}
 	}
@@ -770,11 +777,12 @@ ews_create_folder_sync (CamelStore *store,
 	else
 		full_name = g_strdup (folder_name);
 
-	camel_ews_store_summary_new_folder (ews_summary, folder_id->id,
-					    fid, folder_id->change_key,
-					    folder_name,
-					    EWS_FOLDER_TYPE_MAILBOX,
-					    0, 0);
+	camel_ews_store_summary_new_folder (
+		ews_summary, folder_id->id,
+		fid, folder_id->change_key,
+		folder_name,
+		EWS_FOLDER_TYPE_MAILBOX,
+		0, 0);
 	fi = camel_ews_utils_build_folder_info (ews_store, folder_id->id);
 	e_ews_folder_id_free (folder_id);
 
@@ -799,11 +807,12 @@ ews_delete_folder_sync (CamelStore *store,
 	gboolean success;
 	GError *local_error = NULL;
 
-	fid = camel_ews_store_summary_get_folder_id_from_name (ews_summary,
-							       folder_name);
+	fid = camel_ews_store_summary_get_folder_id_from_name (
+		ews_summary, folder_name);
 	if (!fid) {
-		g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-			     _("Folder does not exist"));
+		g_set_error (
+			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+			_("Folder does not exist"));
 		return FALSE;
 	}
 
@@ -852,11 +861,13 @@ rename_folder_cb (ESoapMessage *msg,
 {
 	struct _rename_cb_data *rename_data = user_data;
 
-	e_ews_message_start_item_change (msg, E_EWS_ITEMCHANGE_TYPE_FOLDER,
-					 rename_data->folder_id, rename_data->change_key, 0);
+	e_ews_message_start_item_change (
+		msg, E_EWS_ITEMCHANGE_TYPE_FOLDER,
+		rename_data->folder_id, rename_data->change_key, 0);
 	e_soap_message_start_element (msg, "SetFolderField", NULL, NULL);
-	e_ews_message_write_string_parameter_with_attribute (msg, "FieldURI", NULL, NULL,
-							      "FieldURI", "folder:DisplayName");
+	e_ews_message_write_string_parameter_with_attribute (
+		msg, "FieldURI", NULL, NULL,
+		"FieldURI", "folder:DisplayName");
 
 	e_soap_message_start_element (msg, "Folder", NULL, NULL);
 	e_ews_message_write_string_parameter (msg, "DisplayName", NULL, rename_data->display_name);
@@ -892,18 +903,20 @@ ews_rename_folder_sync (CamelStore *store,
 
 	fid = camel_ews_store_summary_get_folder_id_from_name (ews_summary, old_name);
 	if (!fid) {
-		g_set_error (error, CAMEL_STORE_ERROR,
-			     CAMEL_STORE_ERROR_NO_FOLDER,
-			     _("Folder %s does not exist"), old_name);
+		g_set_error (
+			error, CAMEL_STORE_ERROR,
+			CAMEL_STORE_ERROR_NO_FOLDER,
+			_("Folder %s does not exist"), old_name);
 		return FALSE;
 	}
 
 	changekey = camel_ews_store_summary_get_change_key (ews_summary, fid, error);
 	if (!changekey) {
 		g_free (fid);
-		g_set_error (error, CAMEL_STORE_ERROR,
-			     CAMEL_STORE_ERROR_NO_FOLDER,
-			     _("No change key record for folder %s"), fid);
+		g_set_error (
+			error, CAMEL_STORE_ERROR,
+			CAMEL_STORE_ERROR_NO_FOLDER,
+			_("No change key record for folder %s"), fid);
 		return FALSE;
 	}
 
@@ -942,9 +955,10 @@ ews_rename_folder_sync (CamelStore *store,
 		*/
 		if (new_slash - new_name != parent_len ||
 		    strncmp (old_name, new_name, parent_len)) {
-			g_set_error (error, CAMEL_STORE_ERROR,
-				     CAMEL_STORE_ERROR_INVALID,
-				     _("Cannot both rename and move a folder at the same time"));
+			g_set_error (
+				error, CAMEL_STORE_ERROR,
+				CAMEL_STORE_ERROR_INVALID,
+				_("Cannot both rename and move a folder at the same time"));
 			g_free (changekey);
 			goto out;
 		}
@@ -973,14 +987,15 @@ ews_rename_folder_sync (CamelStore *store,
 		 * the new parent folder */
 		if (new_slash != new_name) {
 			parent_name = g_strndup (new_name, new_slash - new_name - 1);
-			pfid = camel_ews_store_summary_get_folder_id_from_name (ews_summary,
-										parent_name);
+			pfid = camel_ews_store_summary_get_folder_id_from_name (
+				ews_summary, parent_name);
 			g_free (parent_name);
 			if (!pfid) {
-				g_set_error (error, CAMEL_STORE_ERROR,
-					     CAMEL_STORE_ERROR_NO_FOLDER,
-					     _("Cannot find folder ID for parent folder %s"),
-					     parent_name);
+				g_set_error (
+					error, CAMEL_STORE_ERROR,
+					CAMEL_STORE_ERROR_NO_FOLDER,
+					_("Cannot find folder ID for parent folder %s"),
+					parent_name);
 				goto out;
 			}
 		}
@@ -1027,10 +1042,11 @@ ews_get_name (CamelService *service,
 	user = camel_network_settings_get_user (network_settings);
 
 	if (brief)
-		return g_strdup_printf(_("Exchange server %s"), host);
+		return g_strdup_printf (
+			_("Exchange server %s"), host);
 	else
-		return g_strdup_printf(_("Exchange service for %s on %s"),
-				       user, host);
+		return g_strdup_printf (
+			_("Exchange service for %s on %s"), user, host);
 }
 
 EEwsConnection *
@@ -1128,7 +1144,7 @@ camel_ews_store_connected (CamelEwsStore *ews_store,
 
 void
 camel_ews_store_maybe_disconnect (CamelEwsStore *store,
-				  const GError *error)
+                                  const GError *error)
 {
 	CamelService *service;
 
diff --git a/src/camel/camel-ews-transport.c b/src/camel/camel-ews-transport.c
index 32f85ee..bfc2553 100644
--- a/src/camel/camel-ews-transport.c
+++ b/src/camel/camel-ews-transport.c
@@ -104,11 +104,13 @@ ews_send_to_sync (CamelTransport *transport,
 		used_from = CAMEL_INTERNET_ADDRESS (from);
 
 	if (!used_from || camel_address_length (CAMEL_ADDRESS (used_from)) == 0) {
-		g_set_error_literal (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+		g_set_error_literal (
+			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 			_("Cannot send message with no From address"));
 		return FALSE;
 	} else if (camel_address_length (CAMEL_ADDRESS (used_from)) > 1) {
-		g_set_error_literal (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+		g_set_error_literal (
+			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 			_("Exchange server cannot send message with multiple From addresses"));
 		return FALSE;
 	} else {
@@ -116,13 +118,15 @@ ews_send_to_sync (CamelTransport *transport,
 
 		ews_email = camel_ews_settings_get_email (ews_settings);
 		if (!camel_internet_address_get (used_from, 0, NULL, &used_email)) {
-			g_set_error_literal (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+			g_set_error_literal (
+				error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 				_("Failed to read From address"));
 			return FALSE;
 		}
 
 		if (!ews_email || !used_email || g_ascii_strcasecmp (ews_email, used_email) != 0) {
-			g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+			g_set_error (
+				error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 				_("Exchange server cannot send message as '%s', when the account was configured for address '%s'"),
 				used_email ? used_email : "NULL",
 				ews_email ? ews_email : "NULL");
@@ -132,17 +136,18 @@ ews_send_to_sync (CamelTransport *transport,
 
 	cnc = e_ews_connection_find (host_url, user);
 	if (!cnc) {
-		g_set_error (error, CAMEL_SERVICE_ERROR,
-			     CAMEL_SERVICE_ERROR_NOT_CONNECTED,
-			     _("Service not connected"));
+		g_set_error (
+			error, CAMEL_SERVICE_ERROR,
+			CAMEL_SERVICE_ERROR_NOT_CONNECTED,
+			_("Service not connected"));
 		return FALSE;
 	}
 
-	res = camel_ews_utils_create_mime_message (cnc, "SendOnly", NULL,
-						   message, 0, from,
-						   NULL, NULL,
-						   cancellable, error);
+	res = camel_ews_utils_create_mime_message (
+		cnc, "SendOnly", NULL, message, 0,
+		from, NULL, NULL, cancellable, error);
 	g_object_unref (cnc);
+
 	return res;
 }
 
diff --git a/src/camel/camel-ews-utils.c b/src/camel/camel-ews-utils.c
index ba14fc4..21ac75c 100644
--- a/src/camel/camel-ews-utils.c
+++ b/src/camel/camel-ews-utils.c
@@ -304,16 +304,16 @@ camel_ews_utils_build_folder_info (CamelEwsStore *store,
 	CamelFolderInfo *fi;
 
 	fi = camel_folder_info_new ();
-	fi->full_name = camel_ews_store_summary_get_folder_full_name (ews_summary,
-								      fid, NULL);
-	fi->display_name = camel_ews_store_summary_get_folder_name (ews_summary, fid, NULL);
-
-	fi->flags = camel_ews_store_summary_get_folder_flags (ews_summary,
-							      fid, NULL);
-	fi->unread = camel_ews_store_summary_get_folder_unread (ews_summary,
-								fid, NULL);
-	fi->total = camel_ews_store_summary_get_folder_total (ews_summary,
-							      fid, NULL);
+	fi->full_name = camel_ews_store_summary_get_folder_full_name (
+		ews_summary, fid, NULL);
+	fi->display_name = camel_ews_store_summary_get_folder_name (
+		ews_summary, fid, NULL);
+	fi->flags = camel_ews_store_summary_get_folder_flags (
+		ews_summary, fid, NULL);
+	fi->unread = camel_ews_store_summary_get_folder_unread (
+		ews_summary, fid, NULL);
+	fi->total = camel_ews_store_summary_get_folder_total (
+		ews_summary, fid, NULL);
 
 	return fi;
 }
@@ -346,10 +346,15 @@ sync_deleted_folders (CamelEwsStore *store,
 	}
 }
 
-static gboolean ews_utils_rename_folder (CamelEwsStore *store, EwsFolderType ftype,
-					 const gchar *fid, const gchar *changekey,
-					 const gchar *pfid, const gchar *display_name,
-					 const gchar *old_fname, GError **error)
+static gboolean
+ews_utils_rename_folder (CamelEwsStore *store,
+                         EwsFolderType ftype,
+                         const gchar *fid,
+                         const gchar *changekey,
+                         const gchar *pfid,
+                         const gchar *display_name,
+                         const gchar *old_fname,
+                         GError **error)
 {
 	CamelEwsStoreSummary *ews_summary = store->summary;
 	CamelFolderInfo *fi;
@@ -405,8 +410,8 @@ sync_updated_folders (CamelEwsStore *store,
 				/* If the display name wasn't changed, its basename is still
 				 * the same as it was before... */
 				if (!display_name)
-					display_name = camel_ews_store_summary_get_folder_name (ews_summary,
-										fid->id, NULL);
+					display_name = camel_ews_store_summary_get_folder_name (
+						ews_summary, fid->id, NULL);
 				if (!display_name)
 					goto done;
 
@@ -426,17 +431,20 @@ sync_updated_folders (CamelEwsStore *store,
 				/* Append new display_name to old parent directory name... */
 				last_slash = g_strrstr (folder_name, "/");
 				if (last_slash)
-					new_fname = g_strdup_printf ("%.*s/%s", (int)(last_slash - folder_name),
-								     folder_name, display_name);
+					new_fname = g_strdup_printf (
+						"%.*s/%s",
+						(gint)(last_slash - folder_name),
+						folder_name, display_name);
 				else /* ...unless it was a child of the root folder */
 					new_fname = g_strdup (display_name);
 			}
 
 			if (strcmp (new_fname, folder_name))
-				ews_utils_rename_folder (store, ftype,
-							 fid->id, fid->change_key,
-							 pfid ? pfid->id : NULL,
-							 display_name, folder_name, &error);
+				ews_utils_rename_folder (
+					store, ftype,
+					fid->id, fid->change_key,
+					pfid ? pfid->id : NULL,
+					display_name, folder_name, &error);
 			g_free (new_fname);
 			g_clear_error (&error);
 		}
@@ -464,9 +472,10 @@ add_folder_to_summary (CamelEwsStore *store,
 	unread = e_ews_folder_get_unread_count (folder);
 	ftype = e_ews_folder_get_folder_type (folder);
 
-	camel_ews_store_summary_new_folder (ews_summary, fid->id,
-					    pfid->id, fid->change_key,
-					    dname, ftype, 0, total);
+	camel_ews_store_summary_new_folder (
+		ews_summary, fid->id,
+		pfid->id, fid->change_key,
+		dname, ftype, 0, total);
 	camel_ews_store_summary_set_folder_unread (ews_summary, fid->id, unread);
 }
 
@@ -642,8 +651,9 @@ ews_utils_merge_server_user_flags (EEwsItem *item,
 
 	/* now transfer over all the categories */
 	for (p = e_ews_item_get_categories (item); p; p = p->next) {
-		camel_flag_set (&mi->info.user_flags,
-				ews_utils_rename_label (p->data, 1), 1);
+		camel_flag_set (
+			&mi->info.user_flags,
+			ews_utils_rename_label (p->data, 1), 1);
 	}
 }
 
@@ -683,8 +693,8 @@ ews_utils_get_server_flags (EEwsItem *item)
 
 static const gchar *
 form_email_string_from_mb (EEwsConnection *cnc,
-			   const EwsMailbox *mb,
-			   GCancellable *cancellable)
+                           const EwsMailbox *mb,
+                           GCancellable *cancellable)
 {
 	if (mb) {
 		GString *str;
@@ -722,8 +732,8 @@ form_email_string_from_mb (EEwsConnection *cnc,
 
 static const gchar *
 form_recipient_list (EEwsConnection *cnc,
-		     const GSList *recipients,
-		     GCancellable *cancellable)
+                     const GSList *recipients,
+                     GCancellable *cancellable)
 {
 	const GSList *l;
 	GString *str = NULL;
@@ -849,8 +859,9 @@ camel_ews_utils_sync_updated_items (CamelEwsFolder *ews_folder,
 
 			server_flags = ews_utils_get_server_flags (item);
 			ews_utils_merge_server_user_flags (item, mi);
-			if (camel_ews_update_message_info_flags (folder->summary, (CamelMessageInfo *) mi,
-								 server_flags, NULL))
+			if (camel_ews_update_message_info_flags (
+				folder->summary, (CamelMessageInfo *) mi,
+				server_flags, NULL))
 				camel_folder_change_info_change_uid (ci, mi->info.uid);
 
 			g_free (mi->change_key);
@@ -876,7 +887,7 @@ camel_ews_utils_sync_updated_items (CamelEwsFolder *ews_folder,
 
 void
 camel_ews_utils_sync_created_items (CamelEwsFolder *ews_folder,
-				    EEwsConnection *cnc,
+                                    EEwsConnection *cnc,
                                     GSList *items_created)
 {
 	CamelFolder *folder;
@@ -923,12 +934,12 @@ camel_ews_utils_sync_created_items (CamelEwsFolder *ews_folder,
 		}
 
 		item_type = e_ews_item_get_item_type (item);
-		if	(item_type == E_EWS_ITEM_TYPE_CALENDAR_ITEM ||
+		if (item_type == E_EWS_ITEM_TYPE_CALENDAR_ITEM ||
 			 item_type == E_EWS_ITEM_TYPE_MEETING_MESSAGE ||
 			 item_type == E_EWS_ITEM_TYPE_MEETING_REQUEST ||
 			 item_type == E_EWS_ITEM_TYPE_MEETING_RESPONSE ||
 			 item_type == E_EWS_ITEM_TYPE_MEETING_RESPONSE)
-			camel_message_info_set_user_flag ((CamelMessageInfo*)mi, "$has_cal", TRUE);
+			camel_message_info_set_user_flag ((CamelMessageInfo *) mi, "$has_cal", TRUE);
 
 		mi->info.uid = camel_pstring_strdup (id->id);
 		mi->info.size = e_ews_item_get_size (item);
@@ -964,9 +975,9 @@ camel_ews_utils_sync_created_items (CamelEwsFolder *ews_folder,
 		camel_folder_summary_add (folder->summary, (CamelMessageInfo *) mi);
 
 		/* camel_folder_summary_add() sets folder_flagged flag
-		   on the message info, but this is a fresh item downloaded
-		   from the server, thus unset it, to avoid resync up to the server
-		   on folder leave/store
+		 * on the message info, but this is a fresh item downloaded
+		 * from the server, thus unset it, to avoid resync up to the server
+		 * on folder leave/store
 		*/
 		mi->info.flags &= ~CAMEL_MESSAGE_FOLDER_FLAGGED;
 
diff --git a/src/collection/e-ews-backend.c b/src/collection/e-ews-backend.c
index 4f6879b..f549039 100644
--- a/src/collection/e-ews-backend.c
+++ b/src/collection/e-ews-backend.c
@@ -694,7 +694,7 @@ ews_backend_create_resource_sync (ECollectionBackend *backend,
 			error, G_IO_ERROR,
 			G_IO_ERROR_INVALID_ARGUMENT,
 			_("Could not determine a suitable folder "
-			  "class for a new folder named '%s'"),
+			"class for a new folder named '%s'"),
 			e_source_get_display_name (source));
 		goto exit;
 	}
@@ -784,7 +784,7 @@ ews_backend_delete_resource_sync (ECollectionBackend *backend,
 			error, G_IO_ERROR,
 			G_IO_ERROR_INVALID_ARGUMENT,
 			_("Data source '%s' does not represent "
-			  "an Exchange Web Services folder"),
+			"an Exchange Web Services folder"),
 			e_source_get_display_name (source));
 		goto exit;
 	}
diff --git a/src/configuration/e-ews-config-ui-extension.c b/src/configuration/e-ews-config-ui-extension.c
index 5a11cdd..ca2a814 100644
--- a/src/configuration/e-ews-config-ui-extension.c
+++ b/src/configuration/e-ews-config-ui-extension.c
@@ -36,7 +36,7 @@ G_DEFINE_DYNAMIC_TYPE (
 
 static void
 e_ews_config_ui_extension_shell_view_toggled_cb (EShellView *shell_view,
-						 EEwsConfigUIExtension *ui_ext)
+                                                 EEwsConfigUIExtension *ui_ext)
 {
 	EShellViewClass *shell_view_class;
 	EShellWindow *shell_window;
diff --git a/src/configuration/e-ews-config-utils.c b/src/configuration/e-ews-config-utils.c
index ccc6dd2..b2727c3 100644
--- a/src/configuration/e-ews-config-utils.c
+++ b/src/configuration/e-ews-config-utils.c
@@ -134,8 +134,8 @@ run_with_feedback_thread (gpointer user_data)
 
 static void
 run_with_feedback_response_cb (GtkWidget *dialog,
-			       gint resonse_id,
-			       struct RunWithFeedbackData *rfd)
+                               gint resonse_id,
+                               struct RunWithFeedbackData *rfd)
 {
 	g_return_if_fail (rfd != NULL);
 
@@ -148,13 +148,13 @@ run_with_feedback_response_cb (GtkWidget *dialog,
 
 static void
 e_ews_config_utils_run_in_thread_with_feedback_general (GtkWindow *parent,
-							GObject *with_object,
-							const gchar *description,
-							EEwsSetupFunc thread_func,
-							EEwsSetupFunc idle_func,
-							gpointer user_data,
-							GDestroyNotify free_user_data,
-							gboolean run_modal)
+                                                        GObject *with_object,
+                                                        const gchar *description,
+                                                        EEwsSetupFunc thread_func,
+                                                        EEwsSetupFunc idle_func,
+                                                        gpointer user_data,
+                                                        GDestroyNotify free_user_data,
+                                                        gboolean run_modal)
 {
 	GtkWidget *dialog, *label, *content, *spinner, *box;
 	struct RunWithFeedbackData *rfd;
@@ -163,7 +163,8 @@ e_ews_config_utils_run_in_thread_with_feedback_general (GtkWindow *parent,
 	g_return_if_fail (description != NULL);
 	g_return_if_fail (thread_func != NULL);
 
-	dialog = gtk_dialog_new_with_buttons ("",
+	dialog = gtk_dialog_new_with_buttons (
+		"",
 		parent,
 		GTK_DIALOG_MODAL,
 		GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@@ -219,24 +220,24 @@ e_ews_config_utils_run_in_thread_with_feedback_general (GtkWindow *parent,
 
 void
 e_ews_config_utils_run_in_thread_with_feedback (GtkWindow *parent,
-						GObject *with_object,
-						const gchar *description,
-						EEwsSetupFunc thread_func,
-						EEwsSetupFunc idle_func,
-						gpointer user_data,
-						GDestroyNotify free_user_data)
+                                                GObject *with_object,
+                                                const gchar *description,
+                                                EEwsSetupFunc thread_func,
+                                                EEwsSetupFunc idle_func,
+                                                gpointer user_data,
+                                                GDestroyNotify free_user_data)
 {
 	e_ews_config_utils_run_in_thread_with_feedback_general (parent, with_object, description, thread_func, idle_func, user_data, free_user_data, FALSE);
 }
 
 void
 e_ews_config_utils_run_in_thread_with_feedback_modal (GtkWindow *parent,
-						      GObject *with_object,
-						      const gchar *description,
-						      EEwsSetupFunc thread_func,
-						      EEwsSetupFunc idle_func,
-						      gpointer user_data,
-						      GDestroyNotify free_user_data)
+                                                      GObject *with_object,
+                                                      const gchar *description,
+                                                      EEwsSetupFunc thread_func,
+                                                      EEwsSetupFunc idle_func,
+                                                      gpointer user_data,
+                                                      GDestroyNotify free_user_data)
 {
 	e_ews_config_utils_run_in_thread_with_feedback_general (parent, with_object, description, thread_func, idle_func, user_data, free_user_data, TRUE);
 }
@@ -258,9 +259,9 @@ struct _EEwsConfigUtilsAuthenticatorClass {
 
 static ESourceAuthenticationResult
 ews_config_utils_authenticator_try_password_sync (ESourceAuthenticator *auth,
-						  const GString *password,
-						  GCancellable *cancellable,
-						  GError **error)
+                                                  const GString *password,
+                                                  GCancellable *cancellable,
+                                                  GError **error)
 {
 	EEwsConfigUtilsAuthenticator *authenticator = (EEwsConfigUtilsAuthenticator *) auth;
 	CamelNetworkSettings *network_settings;
@@ -369,10 +370,10 @@ e_ews_config_utils_authenticator_init (EEwsConfigUtilsAuthenticator *authenticat
 
 EEwsConnection	*
 e_ews_config_utils_open_connection_for (ESourceRegistry *registry,
-					ESource *source,
-					CamelEwsSettings *ews_settings,
-					GCancellable *cancellable,
-					GError **perror)
+                                        ESource *source,
+                                        CamelEwsSettings *ews_settings,
+                                        GCancellable *cancellable,
+                                        GError **perror)
 {
 	EEwsConnection *conn = NULL;
 	CamelNetworkSettings *network_settings;
@@ -415,8 +416,8 @@ e_ews_config_utils_open_connection_for (ESourceRegistry *registry,
 
 static gboolean
 get_ews_store_from_folder_tree (EShellView *shell_view,
-				gchar **pfolder_path,
-				CamelStore **pstore)
+                                gchar **pfolder_path,
+                                CamelStore **pstore)
 {
 	EShellSidebar *shell_sidebar;
 	EMFolderTree *folder_tree;
@@ -457,9 +458,10 @@ get_ews_store_from_folder_tree (EShellView *shell_view,
 	return found;
 }
 
-/* static void
+#if 0
+static void
 action_subscribe_foreign_folder_cb (GtkAction *action,
-				    EShellView *shell_view)
+                                    EShellView *shell_view)
 {
 	GtkWindow *parent;
 	EShellBackend *backend;
@@ -478,11 +480,12 @@ action_subscribe_foreign_folder_cb (GtkAction *action,
 	g_object_unref (session);
 	g_object_unref (store);
 	g_free (profile);
-} */
+}
+#endif
 
 static void
 action_folder_permissions_mail_cb (GtkAction *action,
-				   EShellView *shell_view)
+                                   EShellView *shell_view)
 {
 	gchar *folder_path = NULL;
 	EShellWindow *shell_window;
@@ -521,7 +524,8 @@ action_folder_permissions_mail_cb (GtkAction *action,
 
 		folder_id = e_ews_folder_id_new (str_folder_id, str_change_key, FALSE);
 
-		e_ews_edit_folder_permissions (parent,
+		e_ews_edit_folder_permissions (
+			parent,
 			registry,
 			source,
 			CAMEL_EWS_SETTINGS (network_settings),
@@ -542,10 +546,10 @@ action_folder_permissions_mail_cb (GtkAction *action,
 
 static void
 ews_ui_enable_actions (GtkActionGroup *action_group,
-		       const GtkActionEntry *entries,
-		       guint n_entries,
-		       gboolean can_show,
-		       gboolean is_online)
+                       const GtkActionEntry *entries,
+                       guint n_entries,
+                       gboolean can_show,
+                       gboolean is_online)
 {
 	gint ii;
 
@@ -565,7 +569,8 @@ ews_ui_enable_actions (GtkActionGroup *action_group,
 	}
 }
 
-/*static GtkActionEntry mail_account_context_entries[] = {
+#if 0
+static GtkActionEntry mail_account_context_entries[] = {
 
 	{ "mail-ews-subscribe-foreign-folder",
 	  NULL,
@@ -573,7 +578,8 @@ ews_ui_enable_actions (GtkActionGroup *action_group,
 	  NULL,
 	  NULL,  / * XXX Add a tooltip! * /
 	  G_CALLBACK (action_subscribe_foreign_folder_cb) }
-};*/
+};
+#endif
 
 static GtkActionEntry mail_folder_context_entries[] = {
 	{ "mail-ews-folder-permissions",
@@ -594,7 +600,7 @@ static const gchar *ews_ui_mail_def =
 
 static void
 ews_ui_update_actions_mail_cb (EShellView *shell_view,
-			       GtkActionEntry *entries)
+                               GtkActionEntry *entries)
 {
 	EShellWindow *shell_window;
 	GtkActionGroup *action_group;
@@ -649,7 +655,7 @@ ews_ui_update_actions_mail_cb (EShellView *shell_view,
 static void
 ews_ui_init_mail (GtkUIManager *ui_manager,
                   EShellView *shell_view,
-		  gchar **ui_definition)
+                  gchar **ui_definition)
 {
 	EShellWindow *shell_window;
 	GtkActionGroup *action_group;
@@ -664,21 +670,23 @@ ews_ui_init_mail (GtkUIManager *ui_manager,
 	/* Add actions to the "mail" action group. */
 	/*e_action_group_add_actions_localized (action_group, GETTEXT_PACKAGE,
 		mail_account_context_entries, G_N_ELEMENTS (mail_account_context_entries), shell_view);*/
-	e_action_group_add_actions_localized (action_group, GETTEXT_PACKAGE,
+	e_action_group_add_actions_localized (
+		action_group, GETTEXT_PACKAGE,
 		mail_folder_context_entries, G_N_ELEMENTS (mail_folder_context_entries), shell_view);
 
 	/* Decide whether we want this option to be visible or not */
-	g_signal_connect (shell_view, "update-actions",
-			  G_CALLBACK (ews_ui_update_actions_mail_cb),
-			  shell_view);
+	g_signal_connect (
+		shell_view, "update-actions",
+		G_CALLBACK (ews_ui_update_actions_mail_cb),
+		shell_view);
 
 	g_object_unref (action_group);
 }
 
 static gboolean
 get_selected_ews_source (EShellView *shell_view,
-			 ESource **selected_source,
-			 ESourceRegistry **registry)
+                         ESource **selected_source,
+                         ESourceRegistry **registry)
 {
 	ESource *source;
 	EShellSidebar *shell_sidebar;
@@ -728,12 +736,12 @@ get_selected_ews_source (EShellView *shell_view,
 }
 
 /* how many menu entries are defined; all calendar/tasks/memos/contacts
-   actions should have same count */
+ * actions should have same count */
 #define EWS_ESOURCE_NUM_ENTRIES 1
 
 static void
 update_ews_source_entries_cb (EShellView *shell_view,
-			      GtkActionEntry *entries)
+                              GtkActionEntry *entries)
 {
 	GtkActionGroup *action_group;
 	EShell *shell;
@@ -767,9 +775,9 @@ update_ews_source_entries_cb (EShellView *shell_view,
 
 static void
 setup_ews_source_actions (EShellView *shell_view,
-			  GtkUIManager *ui_manager,
-			  GtkActionEntry *entries,
-			  guint n_entries)
+                          GtkUIManager *ui_manager,
+                          GtkActionEntry *entries,
+                          guint n_entries)
 {
 	EShellWindow *shell_window;
 	const gchar *group;
@@ -802,7 +810,7 @@ setup_ews_source_actions (EShellView *shell_view,
 
 static void
 action_folder_permissions_source_cb (GtkAction *action,
-				     EShellView *shell_view)
+                                     EShellView *shell_view)
 {
 	ESourceRegistry *registry = NULL;
 	ESource *source = NULL, *parent_source;
@@ -838,7 +846,8 @@ action_folder_permissions_source_cb (GtkAction *action,
 	else if (strstr (gtk_action_get_name (action), "tasks") != NULL)
 		folder_type = EWS_FOLDER_TYPE_TASKS;
 
-	e_ews_edit_folder_permissions (NULL,
+	e_ews_edit_folder_permissions (
+		NULL,
 		registry,
 		source,
 		CAMEL_EWS_SETTINGS (settings),
@@ -872,14 +881,15 @@ static const gchar *ews_ui_cal_def =
 
 static void
 ews_ui_init_calendar (GtkUIManager *ui_manager,
-		      EShellView *shell_view,
-		      gchar **ui_definition)
+                      EShellView *shell_view,
+                      gchar **ui_definition)
 {
 	g_return_if_fail (ui_definition != NULL);
 
 	*ui_definition = g_strdup (ews_ui_cal_def);
 
-	setup_ews_source_actions (shell_view, ui_manager,
+	setup_ews_source_actions (
+		shell_view, ui_manager,
 		calendar_context_entries, G_N_ELEMENTS (calendar_context_entries));
 }
 
@@ -902,14 +912,15 @@ static const gchar *ews_ui_task_def =
 
 static void
 ews_ui_init_tasks (GtkUIManager *ui_manager,
-		   EShellView *shell_view,
-		   gchar **ui_definition)
+                   EShellView *shell_view,
+                   gchar **ui_definition)
 {
 	g_return_if_fail (ui_definition != NULL);
 
 	*ui_definition = g_strdup (ews_ui_task_def);
 
-	setup_ews_source_actions (shell_view, ui_manager,
+	setup_ews_source_actions (
+		shell_view, ui_manager,
 		tasks_context_entries, G_N_ELEMENTS (tasks_context_entries));
 }
 
@@ -932,14 +943,15 @@ static const gchar *ews_ui_memo_def =
 
 static void
 ews_ui_init_memos (GtkUIManager *ui_manager,
-		   EShellView *shell_view,
-		   gchar **ui_definition)
+                   EShellView *shell_view,
+                   gchar **ui_definition)
 {
 	g_return_if_fail (ui_definition != NULL);
 
 	*ui_definition = g_strdup (ews_ui_memo_def);
 
-	setup_ews_source_actions (shell_view, ui_manager,
+	setup_ews_source_actions (
+		shell_view, ui_manager,
 		memos_context_entries, G_N_ELEMENTS (memos_context_entries));
 }
 
@@ -962,21 +974,22 @@ static const gchar *ews_ui_book_def =
 
 static void
 ews_ui_init_contacts (GtkUIManager *ui_manager,
-		      EShellView *shell_view,
-		      gchar **ui_definition)
+                      EShellView *shell_view,
+                      gchar **ui_definition)
 {
 	g_return_if_fail (ui_definition != NULL);
 
 	*ui_definition = g_strdup (ews_ui_book_def);
 
-	setup_ews_source_actions (shell_view, ui_manager,
+	setup_ews_source_actions (
+		shell_view, ui_manager,
 		contacts_context_entries, G_N_ELEMENTS (contacts_context_entries));
 }
 
 void
 e_ews_config_utils_init_ui (EShellView *shell_view,
-			    const gchar *ui_manager_id,
-			    gchar **ui_definition)
+                            const gchar *ui_manager_id,
+                            gchar **ui_definition)
 {
 	EShellWindow *shell_window;
 	GtkUIManager *ui_manager;
diff --git a/src/configuration/e-ews-edit-folder-permissions.c b/src/configuration/e-ews-edit-folder-permissions.c
index da85ff0..e7375f6 100644
--- a/src/configuration/e-ews-edit-folder-permissions.c
+++ b/src/configuration/e-ews-edit-folder-permissions.c
@@ -85,7 +85,7 @@ static const struct EEwsPredefinedLevels {
 	uint32_t rights;
 } predefined_levels[] = {
 	{ NC_("PermissionsLevel", "None"), 0 },
-	{ NC_("PermissionsLevel", "Owner"), 	E_EWS_PERMISSION_BIT_READ_ANY |
+	{ NC_("PermissionsLevel", "Owner"),	E_EWS_PERMISSION_BIT_READ_ANY |
 						E_EWS_PERMISSION_BIT_CREATE |
 						E_EWS_PERMISSION_BIT_CREATE_SUBFOLDER |
 						E_EWS_PERMISSION_BIT_EDIT_OWNED |
@@ -192,9 +192,9 @@ folder_permissions_clear_all_permissions (GObject *dialog)
 
 static void
 write_folder_permissions_thread (GObject *dialog,
-				 gpointer user_data,
-				 GCancellable *cancellable,
-				 GError **perror)
+                                 gpointer user_data,
+                                 GCancellable *cancellable,
+                                 GError **perror)
 {
 	struct EEwsPermissionsDialogWidgets *widgets;
 	const GSList *permissions = user_data;
@@ -208,15 +208,16 @@ write_folder_permissions_thread (GObject *dialog,
 	g_return_if_fail (widgets != NULL);
 	g_return_if_fail (widgets->conn != NULL);
 
-	e_ews_connection_set_folder_permissions_sync (widgets->conn,
+	e_ews_connection_set_folder_permissions_sync (
+		widgets->conn,
 		G_PRIORITY_DEFAULT, widgets->folder_id, widgets->folder_type, permissions, cancellable, perror);
 }
 
 static void
 write_folder_permissions_idle (GObject *dialog,
-			       gpointer user_data,
-			       GCancellable *cancellable,
-			       GError **perror)
+                               gpointer user_data,
+                               GCancellable *cancellable,
+                               GError **perror)
 {
 	/* does this only if no error was raised from the thread function */
 	folder_permissions_clear_all_permissions (dialog);
@@ -225,7 +226,7 @@ write_folder_permissions_idle (GObject *dialog,
 
 static void
 edit_permissions_response_cb (GObject *dialog,
-			      gint response_id)
+                              gint response_id)
 {
 	struct EEwsPermissionsDialogWidgets *widgets;
 	GSList *write_permissions = NULL;
@@ -261,7 +262,8 @@ edit_permissions_response_cb (GObject *dialog,
 		write_permissions = g_slist_reverse (write_permissions);
 	}
 
-	e_ews_config_utils_run_in_thread_with_feedback (GTK_WINDOW (dialog), dialog,
+	e_ews_config_utils_run_in_thread_with_feedback (
+		GTK_WINDOW (dialog), dialog,
 		_("Writing folder permissions, please wait..."),
 		write_folder_permissions_thread,
 		write_folder_permissions_idle,
@@ -270,7 +272,7 @@ edit_permissions_response_cb (GObject *dialog,
 
 static void
 enable_all_widgets (struct EEwsPermissionsDialogWidgets *widgets,
-		    gboolean enabled)
+                    gboolean enabled)
 {
 	g_return_if_fail (widgets != NULL);
 
@@ -337,8 +339,8 @@ folder_permissions_dialog_to_rights (GObject *dialog)
 
 static void
 update_folder_permissions_sensitivity (GObject *dialog,
-				       gboolean member_valid,
-				       EEwsPermissionUserType user_type)
+                                       gboolean member_valid,
+                                       EEwsPermissionUserType user_type)
 {
 	struct EEwsPermissionsDialogWidgets *widgets;
 
@@ -354,7 +356,8 @@ update_folder_permissions_sensitivity (GObject *dialog,
 		gtk_widget_set_sensitive (widgets->other_folder_contact_check, FALSE);
 
 	if (member_valid)
-		gtk_widget_set_sensitive (widgets->remove_button,
+		gtk_widget_set_sensitive (
+			widgets->remove_button,
 			user_type != E_EWS_PERMISSION_USER_TYPE_DEFAULT &&
 			user_type != E_EWS_PERMISSION_USER_TYPE_ANONYMOUS);
 
@@ -366,7 +369,7 @@ update_folder_permissions_sensitivity (GObject *dialog,
 
 static void
 update_folder_permissions_by_rights (GObject *dialog,
-				     uint32_t rights)
+                                     uint32_t rights)
 {
 	struct EEwsPermissionsDialogWidgets *widgets;
 
@@ -411,7 +414,7 @@ update_folder_permissions_by_rights (GObject *dialog,
 
 static void
 update_folder_permissions_tree_view (GObject *dialog,
-				     struct EEwsPermissionsDialogWidgets *widgets)
+                                     struct EEwsPermissionsDialogWidgets *widgets)
 {
 	GtkTreeSelection *selection;
 	GtkTreeModel *model;
@@ -571,7 +574,8 @@ add_button_clicked_cb (GObject *dialog)
 
 				perm = NULL;
 
-				gtk_tree_model_get (model, &iter,
+				gtk_tree_model_get (
+					model, &iter,
 					COL_E_EWS_PERMISSION, &perm,
 					COL_E_EWS_PERMISSION_USER_TYPE, &ut,
 					-1);
@@ -587,12 +591,14 @@ add_button_clicked_cb (GObject *dialog)
 		if (!found) {
 			GtkListStore *store = GTK_LIST_STORE (model);
 
-			perm = e_ews_permission_new (E_EWS_PERMISSION_USER_TYPE_REGULAR,
+			perm = e_ews_permission_new (
+				E_EWS_PERMISSION_USER_TYPE_REGULAR,
 				display_name, primary_smtp, NULL,
 				widgets->read_fb_time_radio ? E_EWS_PERMISSION_BIT_FREE_BUSY_SIMPLE : 0);
 
 			gtk_list_store_append (store, &iter);
-			gtk_list_store_set (store, &iter,
+			gtk_list_store_set (
+				store, &iter,
 				COL_NAME, perm->display_name,
 				COL_PERMISSION_LEVEL, g_dgettext ("PermissionsLevel", predefined_levels[0].name),
 				COL_E_EWS_PERMISSION, perm,
@@ -662,9 +668,9 @@ folder_permissions_free_found_permissions (gpointer ptr)
 
 static void
 read_folder_permissions_thread (GObject *dialog,
-				gpointer user_data,
-				GCancellable *cancellable,
-				GError **perror)
+                                gpointer user_data,
+                                GCancellable *cancellable,
+                                GError **perror)
 {
 	struct EEwsPermissionsDialogWidgets *widgets;
 	GSList **ppermissions = user_data;
@@ -694,15 +700,16 @@ read_folder_permissions_thread (GObject *dialog,
 	if (g_cancellable_is_cancelled (cancellable))
 		return;
 
-	e_ews_connection_get_folder_permissions_sync (widgets->conn,
+	e_ews_connection_get_folder_permissions_sync (
+		widgets->conn,
 		G_PRIORITY_DEFAULT, widgets->folder_id, ppermissions, cancellable, perror);
 }
 
 static void
 read_folder_permissions_idle (GObject *dialog,
-			      gpointer user_data,
-			      GCancellable *cancellable,
-			      GError **perror)
+                              gpointer user_data,
+                              GCancellable *cancellable,
+                              GError **perror)
 {
 	struct EEwsPermissionsDialogWidgets *widgets;
 	GSList **ppermissions = user_data;
@@ -768,7 +775,8 @@ read_folder_permissions_idle (GObject *dialog,
 		perm_level = g_dgettext ("PermissionsLevel", predefined_levels[ii].name);
 
 		gtk_list_store_append (store, &iter);
-		gtk_list_store_set (store, &iter,
+		gtk_list_store_set (
+			store, &iter,
 			COL_NAME, perm->display_name,
 			COL_PERMISSION_LEVEL, perm_level,
 			COL_E_EWS_PERMISSION, perm,
@@ -783,7 +791,7 @@ read_folder_permissions_idle (GObject *dialog,
 
 static void
 folder_permissions_tree_selection_changed_cb (GtkTreeSelection *selection,
-					      struct EEwsPermissionsDialogWidgets *widgets)
+                                              struct EEwsPermissionsDialogWidgets *widgets)
 {
 	GObject *dialog;
 	GtkTreeModel *model = NULL;
@@ -806,7 +814,8 @@ folder_permissions_tree_selection_changed_cb (GtkTreeSelection *selection,
 		EEwsPermissionUserType user_type = E_EWS_PERMISSION_USER_TYPE_NONE;
 		EEwsPermission *perm = NULL;
 
-		gtk_tree_model_get (model, &iter,
+		gtk_tree_model_get (
+			model, &iter,
 			COL_E_EWS_PERMISSION, &perm,
 			COL_E_EWS_PERMISSION_USER_TYPE, &user_type,
 			-1);
@@ -823,7 +832,7 @@ folder_permissions_tree_selection_changed_cb (GtkTreeSelection *selection,
 
 static GtkWidget *
 create_permissions_tree_view (GObject *dialog,
-			      struct EEwsPermissionsDialogWidgets *widgets)
+                              struct EEwsPermissionsDialogWidgets *widgets)
 {
 	GtkTreeView *tree_view;
 	GtkTreeSelection *selection;
@@ -856,16 +865,16 @@ create_permissions_tree_view (GObject *dialog,
 }
 
 /* Opens dialog to subscribe to folders of other
-   users in the given store */
+ * users in the given store */
 void
 e_ews_edit_folder_permissions (GtkWindow *parent,
-			       ESourceRegistry *registry,
-			       ESource *source,
-			       CamelEwsSettings *ews_settings,
-			       const gchar *account_name,
-			       const gchar *folder_name,
-			       const EwsFolderId *folder_id,
-			       EwsFolderType folder_type)
+                               ESourceRegistry *registry,
+                               ESource *source,
+                               CamelEwsSettings *ews_settings,
+                               const gchar *account_name,
+                               const gchar *folder_name,
+                               const EwsFolderId *folder_id,
+                               EwsFolderType folder_type)
 {
 	struct EEwsPermissionsDialogWidgets *widgets;
 	PangoAttrList *attrs;
@@ -922,7 +931,8 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 	row = 0;
 
 	label = gtk_label_new (_("Account:"));
-	g_object_set (G_OBJECT (label),
+	g_object_set (
+		G_OBJECT (label),
 		"hexpand", FALSE,
 		"vexpand", FALSE,
 		"xalign", 0.0,
@@ -932,7 +942,8 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 	attrs = pango_attr_list_new ();
 	pango_attr_list_insert (attrs, pango_attr_weight_new (PANGO_WEIGHT_BOLD));
 	widget = gtk_label_new (account_name);
-	g_object_set (G_OBJECT (widget),
+	g_object_set (
+		G_OBJECT (widget),
 		"hexpand", TRUE,
 		"vexpand", FALSE,
 		"use-underline", FALSE,
@@ -948,7 +959,8 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 	row++;
 
 	label = gtk_label_new (_("Folder name:"));
-	g_object_set (G_OBJECT (label),
+	g_object_set (
+		G_OBJECT (label),
 		"hexpand", FALSE,
 		"vexpand", FALSE,
 		"xalign", 0.0,
@@ -957,7 +969,8 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 	widget = gtk_label_new (folder_name);
 	gtk_label_set_ellipsize (GTK_LABEL (widget), PANGO_ELLIPSIZE_MIDDLE);
 	gtk_widget_set_tooltip_text (widget, folder_name);
-	g_object_set (G_OBJECT (widget),
+	g_object_set (
+		G_OBJECT (widget),
 		"hexpand", TRUE,
 		"vexpand", FALSE,
 		"xalign", 0.0,
@@ -969,14 +982,16 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 	row++;
 
 	label = gtk_label_new (_("Folder ID:"));
-	g_object_set (G_OBJECT (label),
+	g_object_set (
+		G_OBJECT (label),
 		"hexpand", FALSE,
 		"vexpand", FALSE,
 		"xalign", 0.0,
 		NULL);
 
 	widget = gtk_entry_new ();
-	g_object_set (G_OBJECT (widget),
+	g_object_set (
+		G_OBJECT (widget),
 		"hexpand", TRUE,
 		"vexpand", FALSE,
 		"xalign", 0.0,
@@ -996,7 +1011,8 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 	gtk_scrolled_window_set_min_content_width (scrolled_window, 120);
 	gtk_scrolled_window_set_min_content_height (scrolled_window, 120);
 	gtk_container_add (GTK_CONTAINER (widget), create_permissions_tree_view (dialog, widgets));
-	g_object_set (G_OBJECT (widget),
+	g_object_set (
+		G_OBJECT (widget),
 		"hexpand", TRUE,
 		"vexpand", TRUE,
 		"shadow-type", GTK_SHADOW_IN,
@@ -1010,7 +1026,8 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 	gtk_orientable_set_orientation (GTK_ORIENTABLE (hvbox), GTK_ORIENTATION_HORIZONTAL);
 	gtk_grid_set_column_spacing (GTK_GRID (hvbox), 6);
 	gtk_grid_set_column_homogeneous (GTK_GRID (hvbox), TRUE);
-	g_object_set (G_OBJECT (hvbox),
+	g_object_set (
+		G_OBJECT (hvbox),
 		"hexpand", FALSE,
 		"vexpand", FALSE,
 		"halign", GTK_ALIGN_END,
@@ -1029,7 +1046,8 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 	row++;
 
 	widget = gtk_frame_new (_("Permissions"));
-	g_object_set (G_OBJECT (widget),
+	g_object_set (
+		G_OBJECT (widget),
 		"hexpand", TRUE,
 		"vexpand", FALSE,
 		NULL);
@@ -1050,13 +1068,15 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 	gtk_grid_set_column_spacing (GTK_GRID (hvbox), 6);
 
 	label = gtk_label_new_with_mnemonic (_("Permi_ssion level:"));
-	g_object_set (G_OBJECT (label),
+	g_object_set (
+		G_OBJECT (label),
 		"hexpand", FALSE,
 		"vexpand", FALSE,
 		"xalign", 0.0,
 		NULL);
 
-	widget = GTK_WIDGET (g_object_new (gtk_combo_box_text_get_type (),
+	widget = GTK_WIDGET (
+		g_object_new (gtk_combo_box_text_get_type (),
 		"has-entry", FALSE,
 		"entry-text-column", 0,
 		"hexpand", TRUE,
@@ -1082,7 +1102,8 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 	row++;
 
 	frame = gtk_frame_new (C_("Permissions", "Read"));
-	g_object_set (G_OBJECT (frame),
+	g_object_set (
+		G_OBJECT (frame),
 		"hexpand", FALSE,
 		"vexpand", FALSE,
 		NULL);
@@ -1116,7 +1137,8 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 	gtk_grid_attach (grid, frame, 0, row, 1, 1);
 
 	frame = gtk_frame_new (C_("Permissions", "Write"));
-	g_object_set (G_OBJECT (frame),
+	g_object_set (
+		G_OBJECT (frame),
 		"hexpand", FALSE,
 		"vexpand", FALSE,
 		NULL);
@@ -1147,7 +1169,8 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 	row++;
 
 	frame = gtk_frame_new (C_("Permissions", "Delete items"));
-	g_object_set (G_OBJECT (frame),
+	g_object_set (
+		G_OBJECT (frame),
 		"hexpand", FALSE,
 		"vexpand", FALSE,
 		NULL);
@@ -1174,7 +1197,8 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 	gtk_grid_attach (grid, frame, 0, row, 1, 1);
 
 	frame = gtk_frame_new (C_("Permissions", "Other"));
-	g_object_set (G_OBJECT (frame),
+	g_object_set (
+		G_OBJECT (frame),
 		"hexpand", FALSE,
 		"vexpand", FALSE,
 		NULL);
@@ -1200,41 +1224,58 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 
 	row++;
 
-	g_signal_connect_swapped (widgets->add_button,
+	g_signal_connect_swapped (
+		widgets->add_button,
 		"clicked", G_CALLBACK (add_button_clicked_cb), dialog);
-	g_signal_connect_swapped (widgets->remove_button,
+	g_signal_connect_swapped (
+		widgets->remove_button,
 		"clicked", G_CALLBACK (remove_button_clicked_cb), dialog);
-	g_signal_connect_swapped (widgets->level_combo,
+	g_signal_connect_swapped (
+		widgets->level_combo,
 		"changed", G_CALLBACK (update_permission_dialog_by_level_combo), dialog);
-	g_signal_connect_swapped (widgets->read_none_radio,
+	g_signal_connect_swapped (
+		widgets->read_none_radio,
 		"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
-	g_signal_connect_swapped (widgets->read_full_radio,
+	g_signal_connect_swapped (
+		widgets->read_full_radio,
 		"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
 	if (widgets->read_fb_time_radio)
-		g_signal_connect_swapped (widgets->read_fb_time_radio,
+		g_signal_connect_swapped (
+			widgets->read_fb_time_radio,
 			"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
 	if (widgets->read_fb_detail_radio)
-		g_signal_connect_swapped (widgets->read_fb_detail_radio,
+		g_signal_connect_swapped (
+			widgets->read_fb_detail_radio,
 			"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
-	g_signal_connect_swapped (widgets->write_create_items_check,
+	g_signal_connect_swapped (
+		widgets->write_create_items_check,
 		"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
-	g_signal_connect_swapped (widgets->write_create_subfolders_check,
+	g_signal_connect_swapped (
+		widgets->write_create_subfolders_check,
 		"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
-	g_signal_connect_swapped (widgets->write_edit_own_check,
+	g_signal_connect_swapped (
+		widgets->write_edit_own_check,
 		"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
-	g_signal_connect_swapped (widgets->write_edit_all_check,
+	g_signal_connect_swapped (
+		widgets->write_edit_all_check,
 		"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
-	g_signal_connect_swapped (widgets->delete_none_radio,
+	g_signal_connect_swapped (
+		widgets->delete_none_radio,
 		"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
-	g_signal_connect_swapped (widgets->delete_own_radio,
+	g_signal_connect_swapped (
+		widgets->delete_own_radio,
 		"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
-	g_signal_connect_swapped (widgets->delete_all_radio,
+	g_signal_connect_swapped (
+		widgets->delete_all_radio,
 		"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
-	g_signal_connect_swapped (widgets->other_folder_owner_check,
+	g_signal_connect_swapped (
+		widgets->other_folder_owner_check,
 		"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
-	g_signal_connect_swapped (widgets->other_folder_contact_check,
+	g_signal_connect_swapped (
+		widgets->other_folder_contact_check,
 		"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
-	g_signal_connect_swapped (widgets->other_folder_visible_check,
+	g_signal_connect_swapped (
+		widgets->other_folder_visible_check,
 		"toggled", G_CALLBACK (update_permission_level_combo_by_dialog), dialog);
 
 	enable_all_widgets (widgets, FALSE);
@@ -1246,7 +1287,8 @@ e_ews_edit_folder_permissions (GtkWindow *parent,
 
 	found_permissions = g_new0 (GSList *, 1);
 
-	e_ews_config_utils_run_in_thread_with_feedback (GTK_WINDOW (dialog), dialog,
+	e_ews_config_utils_run_in_thread_with_feedback (
+		GTK_WINDOW (dialog), dialog,
 		_("Reading folder permissions, please wait..."),
 		read_folder_permissions_thread,
 		read_folder_permissions_idle,
diff --git a/src/configuration/e-ews-search-user.c b/src/configuration/e-ews-search-user.c
index 285fbf3..0246959 100644
--- a/src/configuration/e-ews-search-user.c
+++ b/src/configuration/e-ews-search-user.c
@@ -78,7 +78,7 @@ struct EEwsSearchUser
 
 static struct EEwsSearchUser *
 e_ews_search_user_new (const gchar *display_name,
-		       const gchar *email)
+                       const gchar *email)
 {
 	struct EEwsSearchUser *user;
 
@@ -151,15 +151,16 @@ empty_search_tree_view (GtkWidget *tree_view)
 
 static void
 search_add_user (GtkListStore *store,
-		 const gchar *display_name,
-		 const gchar *email)
+                 const gchar *display_name,
+                 const gchar *email)
 {
 	GtkTreeIter iter;
 
 	g_return_if_fail (store != NULL);
 
 	gtk_list_store_append (store, &iter);
-	gtk_list_store_set (store, &iter,
+	gtk_list_store_set (
+		store, &iter,
 		COL_DISPLAY_NAME, display_name,
 		COL_EMAIL, email,
 		-1);
@@ -203,7 +204,8 @@ search_finish_idle (gpointer user_data)
 		if (!added) {
 			if (sid->found_contacts > 0) {
 				gchar *str;
-				str = g_strdup_printf (ngettext ("No users found, only one contact", "No users found, only %d contacts",
+				str = g_strdup_printf (
+					ngettext ("No users found, only one contact", "No users found, only %d contacts",
 					sid->found_contacts), sid->found_contacts);
 				gtk_label_set_text (GTK_LABEL (pgu->info_label), str);
 				g_free (str);
@@ -258,7 +260,8 @@ search_thread (gpointer user_data)
 					continue;
 				}
 
-				sid->found_users = g_slist_prepend (sid->found_users,
+				sid->found_users = g_slist_prepend (
+					sid->found_users,
 					e_ews_search_user_new (mb->name, mb->email));
 			}
 
@@ -317,7 +320,7 @@ schedule_search_cb (gpointer user_data)
 
 static void
 search_term_changed_cb (GtkEntry *entry,
-			GObject *dialog)
+                        GObject *dialog)
 {
 	struct EEwsSearchUserData *pgu;
 
@@ -379,21 +382,22 @@ dialog_realized_cb (GObject *dialog)
 
 static void
 search_user_selection_changed_cb (GtkTreeSelection *selection,
-				  GtkDialog *dialog)
+                                  GtkDialog *dialog)
 {
 	g_return_if_fail (selection != NULL);
 	g_return_if_fail (dialog != NULL);
 
-	gtk_dialog_set_response_sensitive (dialog,
+	gtk_dialog_set_response_sensitive (
+		dialog,
 		GTK_RESPONSE_OK,
 		gtk_tree_selection_get_selected (selection, NULL, NULL));
 }
 
 static void
 search_user_row_activated_cb (GtkTreeView *tree_view,
-			      GtkTreePath *path,
-			      GtkTreeViewColumn *column,
-			      GtkDialog *dialog)
+                              GtkTreePath *path,
+                              GtkTreeViewColumn *column,
+                              GtkDialog *dialog)
 {
 	g_return_if_fail (tree_view != NULL);
 	g_return_if_fail (dialog != NULL);
@@ -404,7 +408,7 @@ search_user_row_activated_cb (GtkTreeView *tree_view,
 
 static GtkWidget *
 create_users_tree_view (GtkWidget *dialog,
-			struct EEwsSearchUserData *pgu)
+                        struct EEwsSearchUserData *pgu)
 {
 	GtkTreeView *tree_view;
 	GtkTreeSelection *selection;
@@ -443,10 +447,10 @@ create_users_tree_view (GtkWidget *dialog,
 /* for non-NULL @info populates also permission levels for given user */
 gboolean
 e_ews_search_user_modal (GtkWindow *parent,
-			 EEwsConnection *conn,
-			 const gchar *search_this,
-			 gchar **display_name,
-			 gchar **email)
+                         EEwsConnection *conn,
+                         const gchar *search_this,
+                         gchar **display_name,
+                         gchar **email)
 {
 	gboolean res = FALSE;
 	struct EEwsSearchUserData *pgu;
@@ -487,14 +491,16 @@ e_ews_search_user_modal (GtkWindow *parent,
 	row = 0;
 
 	label = gtk_label_new_with_mnemonic (_("_Search:"));
-	g_object_set (G_OBJECT (label),
+	g_object_set (
+		G_OBJECT (label),
 		"hexpand", FALSE,
 		"vexpand", FALSE,
 		"xalign", 0.0,
 		NULL);
 
 	widget = gtk_entry_new ();
-	g_object_set (G_OBJECT (widget),
+	g_object_set (
+		G_OBJECT (widget),
 		"hexpand", TRUE,
 		"vexpand", FALSE,
 		NULL);
@@ -516,7 +522,8 @@ e_ews_search_user_modal (GtkWindow *parent,
 	gtk_scrolled_window_set_min_content_width (scrolled_window, 120);
 	gtk_scrolled_window_set_min_content_height (scrolled_window, 120);
 	gtk_container_add (GTK_CONTAINER (widget), create_users_tree_view (dialog, pgu));
-	g_object_set (G_OBJECT (widget),
+	g_object_set (
+		G_OBJECT (widget),
 		"hexpand", TRUE,
 		"vexpand", TRUE,
 		"shadow-type", GTK_SHADOW_IN,
@@ -527,7 +534,8 @@ e_ews_search_user_modal (GtkWindow *parent,
 	row++;
 
 	label = gtk_label_new (_("Search for a user"));
-	g_object_set (G_OBJECT (label),
+	g_object_set (
+		G_OBJECT (label),
 		"hexpand", TRUE,
 		"vexpand", FALSE,
 		"xalign", 0.0,
diff --git a/src/configuration/e-mail-config-ews-delegates-page.c b/src/configuration/e-mail-config-ews-delegates-page.c
index fcd036c..3cfcba5 100644
--- a/src/configuration/e-mail-config-ews-delegates-page.c
+++ b/src/configuration/e-mail-config-ews-delegates-page.c
@@ -176,7 +176,7 @@ mail_config_ews_delegates_page_get_mailbox (EMailConfigEwsDelegatesPage *page)
 
 static void
 enable_delegates_page_widgets (EMailConfigEwsDelegatesPage *page,
-			       gboolean enable)
+                               gboolean enable)
 {
 	gboolean has_users = FALSE;
 
@@ -230,8 +230,8 @@ copy_delegate_info (const EwsDelegateInfo *src)
 
 static void
 mail_config_ews_delegates_page_refresh_cb (GObject *source_object,
-					   GAsyncResult *result,
-					   gpointer user_data)
+                                           GAsyncResult *result,
+                                           gpointer user_data)
 {
 	ESourceRegistry *registry;
 	AsyncContext *async_context;
@@ -304,7 +304,7 @@ mail_config_ews_delegates_page_refresh_cb (GObject *source_object,
 
 static void
 mail_config_ews_delegates_page_set_account_source (EMailConfigEwsDelegatesPage *page,
-						   ESource *account_source)
+                                                   ESource *account_source)
 {
 	g_return_if_fail (E_IS_SOURCE (account_source));
 	g_return_if_fail (page->priv->account_source == NULL);
@@ -314,7 +314,7 @@ mail_config_ews_delegates_page_set_account_source (EMailConfigEwsDelegatesPage *
 
 static void
 mail_config_ews_delegates_page_set_collection_source (EMailConfigEwsDelegatesPage *page,
-						      ESource *collection_source)
+                                                      ESource *collection_source)
 {
 	g_return_if_fail (E_IS_SOURCE (collection_source));
 	g_return_if_fail (page->priv->collection_source == NULL);
@@ -324,7 +324,7 @@ mail_config_ews_delegates_page_set_collection_source (EMailConfigEwsDelegatesPag
 
 static void
 mail_config_ews_delegates_page_set_identity_source (EMailConfigEwsDelegatesPage *page,
-						    ESource *identity_source)
+                                                    ESource *identity_source)
 {
 	g_return_if_fail (E_IS_SOURCE (identity_source));
 	g_return_if_fail (page->priv->identity_source == NULL);
@@ -334,7 +334,7 @@ mail_config_ews_delegates_page_set_identity_source (EMailConfigEwsDelegatesPage
 
 static void
 mail_config_ews_delegates_page_set_registry (EMailConfigEwsDelegatesPage *page,
-					     ESourceRegistry *registry)
+                                             ESourceRegistry *registry)
 {
 	g_return_if_fail (E_IS_SOURCE_REGISTRY (registry));
 	g_return_if_fail (page->priv->registry == NULL);
@@ -344,9 +344,9 @@ mail_config_ews_delegates_page_set_registry (EMailConfigEwsDelegatesPage *page,
 
 static void
 mail_config_ews_delegates_page_set_property (GObject *object,
-					     guint property_id,
-					     const GValue *value,
-					     GParamSpec *pspec)
+                                             guint property_id,
+                                             const GValue *value,
+                                             GParamSpec *pspec)
 {
 	switch (property_id) {
 		case PROP_ACCOUNT_SOURCE:
@@ -379,9 +379,9 @@ mail_config_ews_delegates_page_set_property (GObject *object,
 
 static void
 mail_config_ews_delegates_page_get_property (GObject *object,
-					     guint property_id,
-					     GValue *value,
-					     GParamSpec *pspec)
+                                             guint property_id,
+                                             GValue *value,
+                                             GParamSpec *pspec)
 {
 	switch (property_id) {
 		case PROP_ACCOUNT_SOURCE:
@@ -475,7 +475,7 @@ mail_config_ews_delegates_page_finalize (GObject *object)
 
 static void
 delegates_tree_selection_changed_cb (GtkTreeSelection *selection,
-				     EMailConfigEwsDelegatesPage *page)
+                                     EMailConfigEwsDelegatesPage *page)
 {
 	g_return_if_fail (selection != NULL);
 	g_return_if_fail (page != NULL);
@@ -485,10 +485,10 @@ delegates_tree_selection_changed_cb (GtkTreeSelection *selection,
 
 static GtkWidget *
 add_permission_level_combo_row (GtkGrid *grid,
-				gint row,
-				const gchar *icon_name,
-				const gchar *label_text,
-				EwsPermissionLevel preselect)
+                                gint row,
+                                const gchar *icon_name,
+                                const gchar *label_text,
+                                EwsPermissionLevel preselect)
 {
 	GtkWidget *image = NULL, *label;
 	GtkComboBoxText *combo;
@@ -526,7 +526,8 @@ add_permission_level_combo_row (GtkGrid *grid,
 	}
 
 	gtk_combo_box_set_active (GTK_COMBO_BOX (combo), index);
-	g_object_set (G_OBJECT (combo),
+	g_object_set (
+		G_OBJECT (combo),
 		"valign", GTK_ALIGN_CENTER,
 		NULL);
 
@@ -577,14 +578,14 @@ get_permission_level_from_combo (GtkWidget *combo)
 
 static void
 enable_cal_copies_by_combo_index (GtkComboBox *combo,
-				  GtkWidget *check)
+                                  GtkWidget *check)
 {
 	gtk_widget_set_sensitive (check, gtk_combo_box_get_active (combo) >= 3);
 }
 
 static void
 show_delegate_properties_modal (EMailConfigEwsDelegatesPage *page,
-				EwsDelegateInfo *di)
+                                EwsDelegateInfo *di)
 {
 	GtkWidget *dialog, *widget, *content_area;
 	GtkGrid *grid;
@@ -603,7 +604,8 @@ show_delegate_properties_modal (EMailConfigEwsDelegatesPage *page,
 		name = di->user_id->primary_smtp;
 
 	parent = e_ews_config_utils_get_widget_toplevel_window (GTK_WIDGET (page));
-	dialog = gtk_dialog_new_with_buttons (_("Delegate permissions"), parent,
+	dialog = gtk_dialog_new_with_buttons (
+		_("Delegate permissions"), parent,
 		GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
 		GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 		GTK_STOCK_OK, GTK_RESPONSE_OK,
@@ -611,7 +613,8 @@ show_delegate_properties_modal (EMailConfigEwsDelegatesPage *page,
 
 	widget = gtk_grid_new ();
 	grid = GTK_GRID (widget);
-	g_object_set (G_OBJECT (grid),
+	g_object_set (
+		G_OBJECT (grid),
 		"row-spacing", 6,
 		"column-spacing", 6,
 		"orientation", GTK_ORIENTATION_VERTICAL,
@@ -649,7 +652,8 @@ show_delegate_properties_modal (EMailConfigEwsDelegatesPage *page,
 	g_free (text);
 
 	grid = GTK_GRID (gtk_grid_new ());
-	g_object_set (G_OBJECT (grid),
+	g_object_set (
+		G_OBJECT (grid),
 		"row-spacing", 6,
 		"orientation", GTK_ORIENTATION_VERTICAL,
 		"border-width", 12,
@@ -706,9 +710,9 @@ show_delegate_properties_modal (EMailConfigEwsDelegatesPage *page,
 
 static void
 retrieve_user_permissions_idle_cb (GObject *ppage,
-				   gpointer pdi,
-				   GCancellable *cancellable,
-				   GError **perror)
+                                   gpointer pdi,
+                                   GCancellable *cancellable,
+                                   GError **perror)
 {
 	EMailConfigEwsDelegatesPage *page = E_MAIL_CONFIG_EWS_DELEGATES_PAGE (ppage);
 	EwsDelegateInfo *di = pdi;
@@ -721,7 +725,7 @@ retrieve_user_permissions_idle_cb (GObject *ppage,
 
 static EwsPermissionLevel
 get_level_from_permissions (const GSList *permissions,
-			    const gchar *primary_smtp)
+                            const gchar *primary_smtp)
 {
 	EwsPermissionLevel level = EwsPermissionLevel_None;
 	const GSList *iter;
@@ -756,11 +760,11 @@ get_level_from_permissions (const GSList *permissions,
 
 static gboolean
 get_folder_permissions_sync (EEwsConnection *conn,
-			     const gchar *distinguished_folder_name,
-			     CamelEwsStoreSummary *ews_summary,
-			     GSList **permissions,
-			     GCancellable *cancellable,
-			     GError **error)
+                             const gchar *distinguished_folder_name,
+                             CamelEwsStoreSummary *ews_summary,
+                             GSList **permissions,
+                             GCancellable *cancellable,
+                             GError **error)
 {
 	gboolean res;
 	EwsFolderId *folder_id;
@@ -802,9 +806,9 @@ get_folder_permissions_sync (EEwsConnection *conn,
 
 static void
 retrieve_user_permissions_thread_cb (GObject *ppage,
-				     gpointer pdi,
-				     GCancellable *cancellable,
-				     GError **perror)
+                                     gpointer pdi,
+                                     GCancellable *cancellable,
+                                     GError **perror)
 {
 	EMailConfigEwsDelegatesPage *page = E_MAIL_CONFIG_EWS_DELEGATES_PAGE (ppage);
 	EwsDelegateInfo *di = pdi;
@@ -888,8 +892,8 @@ enum {
 
 static gboolean
 page_contains_user (EMailConfigEwsDelegatesPage *page,
-		    const gchar *primary_smtp,
-		    GtkTreeIter *piter)
+                    const gchar *primary_smtp,
+                    GtkTreeIter *piter)
 {
 	GtkTreeModel *model;
 	GtkTreeIter iter;
@@ -918,8 +922,8 @@ page_contains_user (EMailConfigEwsDelegatesPage *page,
 
 static void
 add_to_tree_view (EMailConfigEwsDelegatesPage *page,
-		  EwsDelegateInfo *di,
-		  gboolean select)
+                  EwsDelegateInfo *di,
+                  gboolean select)
 {
 	GtkTreeModel *model;
 	GtkTreeIter iter;
@@ -938,7 +942,8 @@ add_to_tree_view (EMailConfigEwsDelegatesPage *page,
 			name = di->user_id->primary_smtp;
 
 		gtk_list_store_append (GTK_LIST_STORE (model), &iter);
-		gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+		gtk_list_store_set (
+			GTK_LIST_STORE (model), &iter,
 			COL_NAME, name,
 			COL_DELEGATE_INFO, di,
 			-1);
@@ -978,7 +983,8 @@ add_button_clicked_cb (EMailConfigEwsDelegatesPage *page)
 			if (page_contains_user (page, email, NULL))
 				add_to_tree_view (page, di, TRUE);
 			else
-				e_ews_config_utils_run_in_thread_with_feedback_modal (parent, G_OBJECT (page),
+				e_ews_config_utils_run_in_thread_with_feedback_modal (
+					parent, G_OBJECT (page),
 					_("Retrieving current user permissions, please wait..."),
 					retrieve_user_permissions_thread_cb,
 					retrieve_user_permissions_idle_cb,
@@ -1109,7 +1115,8 @@ mail_config_ews_delegates_page_constructed (GObject *object)
 	g_free (markup);
 
 	widget = gtk_grid_new ();
-	g_object_set (G_OBJECT (widget),
+	g_object_set (
+		G_OBJECT (widget),
 		"row-homogeneous", FALSE,
 		"row-spacing", 6,
 		"column-homogeneous", FALSE,
@@ -1124,9 +1131,9 @@ mail_config_ews_delegates_page_constructed (GObject *object)
 
 	widget = gtk_label_new (
 		_("Delegates can send items on your behalf, including creating and "
-		  "responding to meeting requests. If you want to grant folder "
-		  "permissions without giving send-on-behalf-of permissions, close this "
-		  "dialog box, right-click the folder, click Permissions and change the options there."));
+		"responding to meeting requests. If you want to grant folder "
+		"permissions without giving send-on-behalf-of permissions, close this "
+		"dialog box, right-click the folder, click Permissions and change the options there."));
 	gtk_label_set_line_wrap (GTK_LABEL (widget), TRUE);
 	gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
 	gtk_grid_attach (grid, widget, 0, row, 2, 1);
@@ -1135,7 +1142,8 @@ mail_config_ews_delegates_page_constructed (GObject *object)
 
 	widget = gtk_scrolled_window_new (NULL, NULL);
 	gtk_container_add (GTK_CONTAINER (widget), create_users_tree_view (page));
-	g_object_set (G_OBJECT (widget),
+	g_object_set (
+		G_OBJECT (widget),
 		"hexpand", TRUE,
 		"vexpand", TRUE,
 		"shadow-type", GTK_SHADOW_IN,
@@ -1147,7 +1155,8 @@ mail_config_ews_delegates_page_constructed (GObject *object)
 	gtk_orientable_set_orientation (GTK_ORIENTABLE (hvgrid), GTK_ORIENTATION_VERTICAL);
 	gtk_grid_set_row_spacing (GTK_GRID (hvgrid), 6);
 	gtk_grid_set_column_homogeneous (GTK_GRID (hvgrid), TRUE);
-	g_object_set (G_OBJECT (hvgrid),
+	g_object_set (
+		G_OBJECT (hvgrid),
 		"hexpand", FALSE,
 		"vexpand", FALSE,
 		"halign", GTK_ALIGN_END,
@@ -1171,7 +1180,7 @@ mail_config_ews_delegates_page_constructed (GObject *object)
 
 	widget = gtk_label_new (
 		_("Deliver meeting requests addressed to me and responses to meeting "
-		  "requests where I am the organizer to:"));
+		"requests where I am the organizer to:"));
 	gtk_label_set_line_wrap (GTK_LABEL (widget), TRUE);
 	gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
 	gtk_grid_attach (grid, widget, 0, row, 2, 1);
@@ -1198,11 +1207,14 @@ mail_config_ews_delegates_page_constructed (GObject *object)
 	radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget));
 	gtk_grid_attach (grid, widget, 0, row, 2, 1);
 
-	g_signal_connect_swapped (page->priv->add_button,
+	g_signal_connect_swapped (
+		page->priv->add_button,
 		"clicked", G_CALLBACK (add_button_clicked_cb), page);
-	g_signal_connect_swapped (page->priv->remove_button,
+	g_signal_connect_swapped (
+		page->priv->remove_button,
 		"clicked", G_CALLBACK (remove_button_clicked_cb), page);
-	g_signal_connect_swapped (page->priv->properties_button,
+	g_signal_connect_swapped (
+		page->priv->properties_button,
 		"clicked", G_CALLBACK (properties_button_clicked_cb), page);
 
 	enable_delegates_page_widgets (page, FALSE);
@@ -1218,8 +1230,8 @@ mail_config_ews_delegates_page_constructed (GObject *object)
 
 static void
 mail_config_ews_delegates_page_add_delegate_cb (GObject *source_object,
-						GAsyncResult *result,
-						gpointer user_data)
+                                                GAsyncResult *result,
+                                                gpointer user_data)
 {
 	GSimpleAsyncResult *simple;
 	GError *error = NULL;
@@ -1239,8 +1251,8 @@ mail_config_ews_delegates_page_add_delegate_cb (GObject *source_object,
 
 static void
 mail_config_ews_delegates_page_remove_delegate_cb (GObject *source_object,
-						   GAsyncResult *result,
-						   gpointer user_data)
+                                                   GAsyncResult *result,
+                                                   gpointer user_data)
 {
 	GSimpleAsyncResult *simple;
 	GError *error = NULL;
@@ -1273,8 +1285,8 @@ mail_config_ews_delegates_page_remove_delegate_cb (GObject *source_object,
 
 static void
 mail_config_ews_delegates_page_update_delegate_cb (GObject *source_object,
-						   GAsyncResult *result,
-						   gpointer user_data)
+                                                   GAsyncResult *result,
+                                                   gpointer user_data)
 {
 	GSimpleAsyncResult *simple;
 	GError *error = NULL;
@@ -1314,7 +1326,7 @@ mail_config_ews_delegates_page_update_delegate_cb (GObject *source_object,
 
 static gboolean
 delegate_infos_equal (const EwsDelegateInfo *di1,
-		       const EwsDelegateInfo *di2)
+                       const EwsDelegateInfo *di2)
 {
 	if (!di1 || !di2)
 		return di1 == di2;
@@ -1332,8 +1344,8 @@ delegate_infos_equal (const EwsDelegateInfo *di1,
 
 static void
 mail_config_ews_delegates_page_submit (EMailConfigPage *page,
-				       GCancellable *cancellable,
-				       GAsyncReadyCallback callback,
+                                       GCancellable *cancellable,
+                                       GAsyncReadyCallback callback,
                                        gpointer user_data)
 {
 	EMailConfigEwsDelegatesPagePrivate *priv;
@@ -1456,7 +1468,7 @@ mail_config_ews_delegates_page_submit (EMailConfigPage *page,
 
 static gboolean
 mail_config_ews_delegates_page_submit_finish (EMailConfigPage *page,
-					      GAsyncResult *result,
+                                              GAsyncResult *result,
                                               GError **error)
 {
 	GSimpleAsyncResult *simple;
@@ -1474,7 +1486,7 @@ mail_config_ews_delegates_page_submit_finish (EMailConfigPage *page,
 
 static gint
 sort_by_display_name_cb (gconstpointer a,
-			 gconstpointer b)
+                         gconstpointer b)
 {
 	const EwsDelegateInfo *dia, *dib;
 	const gchar *aname, *bname;
@@ -1501,9 +1513,9 @@ sort_by_display_name_cb (gconstpointer a,
 
 static ESourceAuthenticationResult
 mail_config_ews_delegates_page_try_password_sync (ESourceAuthenticator *auth,
-						  const GString *password,
-						  GCancellable *cancellable,
-						  GError **error)
+                                                  const GString *password,
+                                                  GCancellable *cancellable,
+                                                  GError **error)
 {
 	EMailConfigEwsDelegatesPage *page;
 	CamelSettings *settings;
@@ -1660,7 +1672,7 @@ e_mail_config_ews_delegates_page_type_register (GTypeModule *type_module)
 
 EMailConfigPage *
 e_mail_config_ews_delegates_page_new (ESourceRegistry *registry,
-				      ESource *account_source,
+                                      ESource *account_source,
                                       ESource *identity_source,
                                       ESource *collection_source)
 {
diff --git a/src/configuration/e-mail-config-ews-ooo-page.c b/src/configuration/e-mail-config-ews-ooo-page.c
index 382f6b7..0103cda 100644
--- a/src/configuration/e-mail-config-ews-ooo-page.c
+++ b/src/configuration/e-mail-config-ews-ooo-page.c
@@ -718,7 +718,8 @@ mail_config_ews_ooo_page_submit (EMailConfigPage *page,
 		return;
 	}
 
-	signal_id = g_signal_connect_swapped (priv->oof_settings, "notify",
+	signal_id = g_signal_connect_swapped (
+		priv->oof_settings, "notify",
 		G_CALLBACK (ews_oof_settings_changed), &priv->changed);
 
 	toggle_button = GTK_TOGGLE_BUTTON (priv->enabled_radio_button);
diff --git a/src/server/camel-ews-settings.c b/src/server/camel-ews-settings.c
index 469cfef..caadc14 100644
--- a/src/server/camel-ews-settings.c
+++ b/src/server/camel-ews-settings.c
@@ -864,7 +864,7 @@ camel_ews_settings_get_timeout (CamelEwsSettings *settings)
 
 void
 camel_ews_settings_set_timeout (CamelEwsSettings *settings,
-				guint timeout)
+                                guint timeout)
 {
 	g_return_if_fail (CAMEL_IS_EWS_SETTINGS (settings));
 
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 8ecec90..4cedcf7 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -6327,8 +6327,8 @@ e_ews_connection_get_delegate (EEwsConnection *cnc,
 gboolean
 e_ews_connection_get_delegate_finish (EEwsConnection *cnc,
                                       GAsyncResult *result,
-				      EwsDelegateDeliver *deliver_to,
-				      GSList **delegates, /* EwsDelegateInfo * */
+                                      EwsDelegateDeliver *deliver_to,
+                                      GSList **delegates, /* EwsDelegateInfo * */
                                       GError **error)
 {
 	GSimpleAsyncResult *simple;
@@ -6360,8 +6360,8 @@ e_ews_connection_get_delegate_sync (EEwsConnection *cnc,
                                     gint pri,
                                     const gchar *mail_id,
                                     gboolean include_permissions,
-				    EwsDelegateDeliver *deliver_to,
-				    GSList **delegates, /* EwsDelegateInfo * */
+                                    EwsDelegateDeliver *deliver_to,
+                                    GSList **delegates, /* EwsDelegateInfo * */
                                     GCancellable *cancellable,
                                     GError **error)
 {
@@ -6431,8 +6431,8 @@ update_delegate_response_cb (ESoapResponse *response,
 
 static void
 set_delegate_permission (ESoapMessage *msg,
-			 const gchar *elem_name,
-			 EwsPermissionLevel perm_level)
+                         const gchar *elem_name,
+                         EwsPermissionLevel perm_level)
 {
 	const gchar *level_name = NULL;
 
@@ -6453,12 +6453,12 @@ set_delegate_permission (ESoapMessage *msg,
 
 void
 e_ews_connection_add_delegate (EEwsConnection *cnc,
-			       gint pri,
-			       const gchar *mail_id,
-			       const GSList *delegates, /* EwsDelegateInfo * */
-			       GCancellable *cancellable,
-			       GAsyncReadyCallback callback,
-			       gpointer user_data)
+                               gint pri,
+                               const gchar *mail_id,
+                               const GSList *delegates, /* EwsDelegateInfo * */
+                               GCancellable *cancellable,
+                               GAsyncReadyCallback callback,
+                               gpointer user_data)
 {
 	ESoapMessage *msg;
 	GSimpleAsyncResult *simple;
@@ -6496,9 +6496,11 @@ e_ews_connection_add_delegate (EEwsConnection *cnc,
 		set_delegate_permission (msg, "JournalFolderPermissionLevel", di->journal);
 		e_soap_message_end_element (msg); /* DelegatePermissions */
 
-		e_ews_message_write_string_parameter (msg, "ReceiveCopiesOfMeetingMessages", NULL,
+		e_ews_message_write_string_parameter (
+			msg, "ReceiveCopiesOfMeetingMessages", NULL,
 			di->meetingcopies ? "true" : "false");
-		e_ews_message_write_string_parameter (msg, "ViewPrivateItems", NULL,
+		e_ews_message_write_string_parameter (
+			msg, "ViewPrivateItems", NULL,
 			di->view_priv_items ? "true" : "false");
 
 		e_soap_message_end_element (msg); /* DelegateUser */
@@ -6525,8 +6527,8 @@ e_ews_connection_add_delegate (EEwsConnection *cnc,
 
 gboolean
 e_ews_connection_add_delegate_finish (EEwsConnection *cnc,
-				      GAsyncResult *result,
-				      GError **error)
+                                      GAsyncResult *result,
+                                      GError **error)
 {
 	GSimpleAsyncResult *simple;
 
@@ -6543,10 +6545,10 @@ e_ews_connection_add_delegate_finish (EEwsConnection *cnc,
 
 gboolean
 e_ews_connection_add_delegate_sync (EEwsConnection *cnc,
-				    gint pri,
-				    const gchar *mail_id,
-				    const GSList *delegates, /* EwsDelegateInfo * */
-				    GCancellable *cancellable,
+                                    gint pri,
+                                    const gchar *mail_id,
+                                    const GSList *delegates, /* EwsDelegateInfo * */
+                                    GCancellable *cancellable,
                                     GError **error)
 {
 	EAsyncClosure *closure;
@@ -6573,12 +6575,12 @@ e_ews_connection_add_delegate_sync (EEwsConnection *cnc,
 
 void
 e_ews_connection_remove_delegate (EEwsConnection *cnc,
-				  gint pri,
-				  const gchar *mail_id,
-				  const GSList *delegate_ids, /* EwsUserId * */
-				  GCancellable *cancellable,
-				  GAsyncReadyCallback callback,
-				  gpointer user_data)
+                                  gint pri,
+                                  const gchar *mail_id,
+                                  const GSList *delegate_ids, /* EwsUserId * */
+                                  GCancellable *cancellable,
+                                  GAsyncReadyCallback callback,
+                                  gpointer user_data)
 {
 	ESoapMessage *msg;
 	GSimpleAsyncResult *simple;
@@ -6627,8 +6629,8 @@ e_ews_connection_remove_delegate (EEwsConnection *cnc,
 
 gboolean
 e_ews_connection_remove_delegate_finish (EEwsConnection *cnc,
-					 GAsyncResult *result,
-					 GError **error)
+                                         GAsyncResult *result,
+                                         GError **error)
 {
 	GSimpleAsyncResult *simple;
 
@@ -6645,9 +6647,9 @@ e_ews_connection_remove_delegate_finish (EEwsConnection *cnc,
 
 gboolean
 e_ews_connection_remove_delegate_sync (EEwsConnection *cnc,
-				       gint pri,
+                                       gint pri,
                                        const gchar *mail_id,
-				       const GSList *delegate_ids, /* EwsUserId * */
+                                       const GSList *delegate_ids, /* EwsUserId * */
                                        GCancellable *cancellable,
                                        GError **error)
 {
@@ -6675,13 +6677,13 @@ e_ews_connection_remove_delegate_sync (EEwsConnection *cnc,
 
 void
 e_ews_connection_update_delegate (EEwsConnection *cnc,
-				  gint pri,
-				  const gchar *mail_id,
-				  EwsDelegateDeliver deliver_to,
-				  const GSList *delegates, /* EwsDelegateInfo * */
-				  GCancellable *cancellable,
-				  GAsyncReadyCallback callback,
-				  gpointer user_data)
+                                  gint pri,
+                                  const gchar *mail_id,
+                                  EwsDelegateDeliver deliver_to,
+                                  const GSList *delegates, /* EwsDelegateInfo * */
+                                  GCancellable *cancellable,
+                                  GAsyncReadyCallback callback,
+                                  gpointer user_data)
 {
 	ESoapMessage *msg;
 	GSimpleAsyncResult *simple;
@@ -6719,9 +6721,11 @@ e_ews_connection_update_delegate (EEwsConnection *cnc,
 			set_delegate_permission (msg, "JournalFolderPermissionLevel", di->journal);
 			e_soap_message_end_element (msg); /* DelegatePermissions */
 
-			e_ews_message_write_string_parameter (msg, "ReceiveCopiesOfMeetingMessages", NULL,
+			e_ews_message_write_string_parameter (
+				msg, "ReceiveCopiesOfMeetingMessages", NULL,
 				di->meetingcopies ? "true" : "false");
-			e_ews_message_write_string_parameter (msg, "ViewPrivateItems", NULL,
+			e_ews_message_write_string_parameter (
+				msg, "ViewPrivateItems", NULL,
 				di->view_priv_items ? "true" : "false");
 
 			e_soap_message_end_element (msg); /* DelegateUser */
@@ -6730,7 +6734,8 @@ e_ews_connection_update_delegate (EEwsConnection *cnc,
 		e_soap_message_end_element (msg); /* DelegateUsers */
 	}
 
-	e_ews_message_write_string_parameter (msg, "DeliverMeetingRequests", "messages",
+	e_ews_message_write_string_parameter (
+		msg, "DeliverMeetingRequests", "messages",
 		deliver_to == EwsDelegateDeliver_DelegatesOnly ? "DelegatesOnly" :
 		deliver_to == EwsDelegateDeliver_DelegatesAndMe ? "DelegatesAndMe" :
 		"DelegatesAndSendInformationToMe");
@@ -6754,8 +6759,8 @@ e_ews_connection_update_delegate (EEwsConnection *cnc,
 
 gboolean
 e_ews_connection_update_delegate_finish (EEwsConnection *cnc,
-					 GAsyncResult *result,
-					 GError **error)
+                                         GAsyncResult *result,
+                                         GError **error)
 {
 	GSimpleAsyncResult *simple;
 
@@ -6772,10 +6777,10 @@ e_ews_connection_update_delegate_finish (EEwsConnection *cnc,
 
 gboolean
 e_ews_connection_update_delegate_sync (EEwsConnection *cnc,
-				       gint pri,
+                                       gint pri,
                                        const gchar *mail_id,
-				       EwsDelegateDeliver deliver_to,
-				       const GSList *delegates, /* EwsDelegateInfo * */
+                                       EwsDelegateDeliver deliver_to,
+                                       const GSList *delegates, /* EwsDelegateInfo * */
                                        GCancellable *cancellable,
                                        GError **error)
 {
@@ -6802,7 +6807,7 @@ e_ews_connection_update_delegate_sync (EEwsConnection *cnc,
 
 static void
 get_folder_permissions_response_cb (ESoapResponse *response,
-				    GSimpleAsyncResult *simple)
+                                    GSimpleAsyncResult *simple)
 {
 	EwsAsyncData *async_data;
 	ESoapParameter *param;
@@ -6859,11 +6864,11 @@ get_folder_permissions_response_cb (ESoapResponse *response,
 
 void
 e_ews_connection_get_folder_permissions (EEwsConnection *cnc,
-					 gint pri,
-					 EwsFolderId *folder_id,
-					 GCancellable *cancellable,
-					 GAsyncReadyCallback callback,
-					 gpointer user_data)
+                                         gint pri,
+                                         EwsFolderId *folder_id,
+                                         GCancellable *cancellable,
+                                         GAsyncReadyCallback callback,
+                                         gpointer user_data)
 {
 	ESoapMessage *msg;
 	GSimpleAsyncResult *simple;
@@ -6873,8 +6878,9 @@ e_ews_connection_get_folder_permissions (EEwsConnection *cnc,
 	g_return_if_fail (cnc != NULL);
 	g_return_if_fail (folder_id != NULL);
 
-	msg = e_ews_message_new_with_header (cnc->priv->uri, "GetFolder",
-					     NULL, NULL, EWS_EXCHANGE_2007_SP1);
+	msg = e_ews_message_new_with_header (
+		cnc->priv->uri, "GetFolder",
+		NULL, NULL, EWS_EXCHANGE_2007_SP1);
 
 	e_soap_message_start_element (msg, "FolderShape", "messages", NULL);
 	e_ews_message_write_string_parameter (msg, "BaseShape", NULL, "IdOnly");
@@ -6891,10 +6897,9 @@ e_ews_connection_get_folder_permissions (EEwsConnection *cnc,
 
 	e_ews_message_write_footer (msg);
 
-	simple = g_simple_async_result_new (G_OBJECT (cnc),
-				      callback,
-				      user_data,
-				      e_ews_connection_get_folder_permissions);
+	simple = g_simple_async_result_new (
+		G_OBJECT (cnc), callback, user_data,
+		e_ews_connection_get_folder_permissions);
 
 	async_data = g_new0 (EwsAsyncData, 1);
 	g_simple_async_result_set_op_res_gpointer (
@@ -6910,9 +6915,9 @@ e_ews_connection_get_folder_permissions (EEwsConnection *cnc,
 /* free permissions with e_ews_permissions_free() */
 gboolean
 e_ews_connection_get_folder_permissions_finish (EEwsConnection *cnc,
-						GAsyncResult *result,
-						GSList **permissions,
-						GError **error)
+                                                GAsyncResult *result,
+                                                GSList **permissions,
+                                                GError **error)
 {
 	GSimpleAsyncResult *simple;
 	EwsAsyncData *async_data;
@@ -6938,11 +6943,11 @@ e_ews_connection_get_folder_permissions_finish (EEwsConnection *cnc,
 /* free permissions with e_ews_permissions_free() */
 gboolean
 e_ews_connection_get_folder_permissions_sync (EEwsConnection *cnc,
-					      gint pri,
-					      EwsFolderId *folder_id,
-					      GSList **permissions,
-					      GCancellable *cancellable,
-					      GError **error)
+                                              gint pri,
+                                              EwsFolderId *folder_id,
+                                              GSList **permissions,
+                                              GCancellable *cancellable,
+                                              GError **error)
 {
 	EAsyncClosure *closure;
 	GAsyncResult *result;
@@ -6970,13 +6975,13 @@ e_ews_connection_get_folder_permissions_sync (EEwsConnection *cnc,
 
 void
 e_ews_connection_set_folder_permissions (EEwsConnection *cnc,
-					 gint pri,
-					 EwsFolderId *folder_id,
-					 EwsFolderType folder_type,
-					 const GSList *permissions,
-					 GCancellable *cancellable,
-					 GAsyncReadyCallback callback,
-					 gpointer user_data)
+                                         gint pri,
+                                         EwsFolderId *folder_id,
+                                         EwsFolderType folder_type,
+                                         const GSList *permissions,
+                                         GCancellable *cancellable,
+                                         GAsyncReadyCallback callback,
+                                         gpointer user_data)
 {
 	ESoapMessage *msg;
 	GSimpleAsyncResult *simple;
@@ -6987,12 +6992,14 @@ e_ews_connection_set_folder_permissions (EEwsConnection *cnc,
 	g_return_if_fail (folder_id != NULL);
 	g_return_if_fail (permissions != NULL);
 
-	msg = e_ews_message_new_with_header (cnc->priv->uri, "UpdateFolder",
-					     NULL, NULL, EWS_EXCHANGE_2007_SP1);
+	msg = e_ews_message_new_with_header (
+		cnc->priv->uri, "UpdateFolder",
+		NULL, NULL, EWS_EXCHANGE_2007_SP1);
 
 	e_soap_message_start_element (msg, "FolderChanges", "messages", NULL);
-	e_ews_message_start_item_change (msg, E_EWS_ITEMCHANGE_TYPE_FOLDER,
-					 folder_id->id, folder_id->change_key, 0);
+	e_ews_message_start_item_change (
+		msg, E_EWS_ITEMCHANGE_TYPE_FOLDER,
+		folder_id->id, folder_id->change_key, 0);
 
 	e_soap_message_start_element (msg, "SetFolderField", NULL, NULL);
 	e_ews_message_write_string_parameter_with_attribute (msg, "FieldURI", NULL, NULL, "FieldURI", "folder:PermissionSet");
@@ -7055,33 +7062,43 @@ e_ews_connection_set_folder_permissions (EEwsConnection *cnc,
 		perm_level_name = e_ews_permission_rights_to_level_name (perm->rights);
 
 		if (g_strcmp0 (perm_level_name, "Custom") == 0) {
-			e_ews_message_write_string_parameter (msg, "CanCreateItems", NULL,
+			e_ews_message_write_string_parameter (
+				msg, "CanCreateItems", NULL,
 				(perm->rights & E_EWS_PERMISSION_BIT_CREATE) != 0 ? "true" : "false");
-			e_ews_message_write_string_parameter (msg, "CanCreateSubFolders", NULL,
+			e_ews_message_write_string_parameter (
+				msg, "CanCreateSubFolders", NULL,
 				(perm->rights & E_EWS_PERMISSION_BIT_CREATE_SUBFOLDER) != 0 ? "true" : "false");
-			e_ews_message_write_string_parameter (msg, "IsFolderOwner", NULL,
+			e_ews_message_write_string_parameter (
+				msg, "IsFolderOwner", NULL,
 				(perm->rights & E_EWS_PERMISSION_BIT_FOLDER_OWNER) != 0 ? "true" : "false");
-			e_ews_message_write_string_parameter (msg, "IsFolderVisible", NULL,
+			e_ews_message_write_string_parameter (
+				msg, "IsFolderVisible", NULL,
 				(perm->rights & E_EWS_PERMISSION_BIT_FOLDER_VISIBLE) != 0 ? "true" : "false");
-			e_ews_message_write_string_parameter (msg, "IsFolderContact", NULL,
+			e_ews_message_write_string_parameter (
+				msg, "IsFolderContact", NULL,
 				(perm->rights & E_EWS_PERMISSION_BIT_FOLDER_CONTACT) != 0 ? "true" : "false");
-			e_ews_message_write_string_parameter (msg, "EditItems", NULL,
+			e_ews_message_write_string_parameter (
+				msg, "EditItems", NULL,
 				(perm->rights & E_EWS_PERMISSION_BIT_EDIT_ANY) != 0 ? "All" :
 				(perm->rights & E_EWS_PERMISSION_BIT_EDIT_OWNED) != 0 ? "Owned" : "None");
-			e_ews_message_write_string_parameter (msg, "DeleteItems", NULL,
+			e_ews_message_write_string_parameter (
+				msg, "DeleteItems", NULL,
 				(perm->rights & E_EWS_PERMISSION_BIT_DELETE_ANY) != 0 ? "All" :
 				(perm->rights & E_EWS_PERMISSION_BIT_DELETE_OWNED) != 0 ? "Owned" : "None");
 			if (folder_type == EWS_FOLDER_TYPE_CALENDAR)
-				e_ews_message_write_string_parameter (msg, "ReadItems", NULL,
+				e_ews_message_write_string_parameter (
+					msg, "ReadItems", NULL,
 					(perm->rights & E_EWS_PERMISSION_BIT_READ_ANY) != 0 ? "FullDetails" :
 					(perm->rights & E_EWS_PERMISSION_BIT_FREE_BUSY_DETAILED) != 0 ? "TimeAndSubjectAndLocation" :
 					(perm->rights & E_EWS_PERMISSION_BIT_FREE_BUSY_SIMPLE) != 0 ? "TimeOnly" : "None");
 			else
-				e_ews_message_write_string_parameter (msg, "ReadItems", NULL,
+				e_ews_message_write_string_parameter (
+					msg, "ReadItems", NULL,
 					(perm->rights & E_EWS_PERMISSION_BIT_READ_ANY) != 0 ? "FullDetails" : "None");
 		}
 
-		e_ews_message_write_string_parameter (msg,
+		e_ews_message_write_string_parameter (
+			msg,
 			folder_type == EWS_FOLDER_TYPE_CALENDAR ? "CalendarPermissionLevel" : "PermissionLevel", NULL,
 			perm_level_name);
 
@@ -7097,10 +7114,9 @@ e_ews_connection_set_folder_permissions (EEwsConnection *cnc,
 
 	e_ews_message_write_footer (msg);
 
-	simple = g_simple_async_result_new (G_OBJECT (cnc),
-				      callback,
-				      user_data,
-				      e_ews_connection_set_folder_permissions);
+	simple = g_simple_async_result_new (
+		G_OBJECT (cnc), callback, user_data,
+		e_ews_connection_set_folder_permissions);
 
 	async_data = g_new0 (EwsAsyncData, 1);
 	g_simple_async_result_set_op_res_gpointer (
@@ -7115,8 +7131,8 @@ e_ews_connection_set_folder_permissions (EEwsConnection *cnc,
 
 gboolean
 e_ews_connection_set_folder_permissions_finish (EEwsConnection *cnc,
-						GAsyncResult *result,
-						GError **error)
+                                                GAsyncResult *result,
+                                                GError **error)
 {
 	GSimpleAsyncResult *simple;
 
@@ -7133,12 +7149,12 @@ e_ews_connection_set_folder_permissions_finish (EEwsConnection *cnc,
 
 gboolean
 e_ews_connection_set_folder_permissions_sync (EEwsConnection *cnc,
-					      gint pri,
-					      EwsFolderId *folder_id,
-					      EwsFolderType folder_type,
-					      const GSList *permissions,
-					      GCancellable *cancellable,
-					      GError **error)
+                                              gint pri,
+                                              EwsFolderId *folder_id,
+                                              EwsFolderType folder_type,
+                                              const GSList *permissions,
+                                              GCancellable *cancellable,
+                                              GError **error)
 {
 	EAsyncClosure *closure;
 	GAsyncResult *result;
diff --git a/src/server/e-ews-folder.c b/src/server/e-ews-folder.c
index ee5c227..02d52d5 100644
--- a/src/server/e-ews-folder.c
+++ b/src/server/e-ews-folder.c
@@ -209,8 +209,8 @@ e_ews_folder_new_from_soap_parameter (ESoapParameter *param)
 
 EwsFolderId *
 e_ews_folder_id_new (const gchar *id,
-		     const gchar *change_key,
-		     gboolean is_distinguished_id)
+                     const gchar *change_key,
+                     gboolean is_distinguished_id)
 {
 	EwsFolderId *fid;
 
diff --git a/src/server/e-ews-item-change.c b/src/server/e-ews-item-change.c
index 89b2a78..58e8f35 100644
--- a/src/server/e-ews-item-change.c
+++ b/src/server/e-ews-item-change.c
@@ -36,43 +36,53 @@ e_ews_message_start_item_change (ESoapMessage *msg,
 	switch (type) {
 	case E_EWS_ITEMCHANGE_TYPE_FOLDER:
 		e_soap_message_start_element (msg, "FolderChange", NULL, NULL);
-		e_soap_message_start_element (msg, "FolderId",
-					      NULL, NULL);
-		e_soap_message_add_attribute (msg, "Id",
-					      itemid, NULL, NULL);
+		e_soap_message_start_element (
+			msg, "FolderId",
+			NULL, NULL);
+		e_soap_message_add_attribute (
+			msg, "Id",
+			itemid, NULL, NULL);
 		break;
 
 	case E_EWS_ITEMCHANGE_TYPE_ITEM:
 		e_soap_message_start_element (msg, "ItemChange", NULL, NULL);
-		e_soap_message_start_element (msg, "ItemId",
-					      NULL, NULL);
-		e_soap_message_add_attribute (msg, "Id",
-					      itemid, NULL, NULL);
+		e_soap_message_start_element (
+			msg, "ItemId",
+			NULL, NULL);
+		e_soap_message_add_attribute (
+			msg, "Id",
+			itemid, NULL, NULL);
 		break;
 
 	case E_EWS_ITEMCHANGE_TYPE_OCCURRENCEITEM:
 		e_soap_message_start_element (msg, "ItemChange", NULL, NULL);
-		e_soap_message_start_element (msg, "OccurrenceItemId",
-					      NULL, NULL);
-		e_soap_message_add_attribute (msg, "RecurringMasterId",
-					      itemid, NULL, NULL);
-		instance = g_strdup_printf("%d", instance_index);
-		e_soap_message_add_attribute (msg, "InstanceIndex", instance,
-					      NULL, NULL);
+		e_soap_message_start_element (
+			msg, "OccurrenceItemId",
+			NULL, NULL);
+		e_soap_message_add_attribute (
+			msg, "RecurringMasterId",
+			itemid, NULL, NULL);
+		instance = g_strdup_printf ("%d", instance_index);
+		e_soap_message_add_attribute (
+			msg, "InstanceIndex", instance,
+			NULL, NULL);
 		g_free (instance);
 		break;
 
 	case E_EWS_ITEMCHANGE_TYPE_RECURRINGMASTER:
 		e_soap_message_start_element (msg, "ItemChange", NULL, NULL);
-		e_soap_message_start_element (msg, "RecurringMasterItemId",
-					      NULL, NULL);
-		e_soap_message_add_attribute (msg, "OccurrenceId",
-					      itemid, NULL, NULL);
+		e_soap_message_start_element (
+			msg, "RecurringMasterItemId",
+			NULL, NULL);
+		e_soap_message_add_attribute (
+			msg, "OccurrenceId",
+			itemid, NULL, NULL);
 		break;
 	}
 	if (changekey)
-		e_soap_message_add_attribute (msg, "ChangeKey",
-					      changekey, NULL, NULL);
+		e_soap_message_add_attribute (
+			msg, "ChangeKey",
+			changekey, NULL, NULL);
 	e_soap_message_end_element (msg);
 
 	e_soap_message_start_element (msg, "Updates", NULL, NULL);
@@ -146,8 +156,8 @@ e_ews_message_end_set_item_field (ESoapMessage *msg)
 
 void
 e_ews_message_add_delete_item_field (ESoapMessage *msg,
-				     const gchar *name,
-				     const gchar *fielduri_prefix)
+                                     const gchar *name,
+                                     const gchar *fielduri_prefix)
 {
 	gchar *fielduri;
 
@@ -162,9 +172,9 @@ e_ews_message_add_delete_item_field (ESoapMessage *msg,
 
 void
 e_ews_message_add_delete_item_field_indexed (ESoapMessage *msg,
-					     const gchar *name,
-					     const gchar *fielduri_prefix,
-					     const gchar *field_index)
+                                             const gchar *name,
+                                             const gchar *fielduri_prefix,
+                                             const gchar *field_index)
 {
 	gchar *fielduri;
 
diff --git a/src/server/e-ews-item-change.h b/src/server/e-ews-item-change.h
index 0928d04..7b8d5c5 100644
--- a/src/server/e-ews-item-change.h
+++ b/src/server/e-ews-item-change.h
@@ -51,7 +51,6 @@ void e_ews_message_add_delete_item_field (ESoapMessage *msg, const gchar *name,
 
 void e_ews_message_add_delete_item_field_indexed (ESoapMessage *msg, const gchar *name, const gchar *fielduri_prefix, const gchar *field_index);
 
-
 G_END_DECLS
 
 #endif
diff --git a/src/server/e-ews-item.c b/src/server/e-ews-item.c
index 9a2a91b..c64905c 100644
--- a/src/server/e-ews-item.c
+++ b/src/server/e-ews-item.c
@@ -41,7 +41,7 @@ static gchar *
 g_mkdtemp (gchar *tmpl,
            gint mode)
 {
-	static const char letters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+	static const gchar letters[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
 	static const gint NLETTERS = sizeof (letters) - 1;
 	static gint counter = 0;
 	gchar *XXXXXX;
@@ -519,8 +519,9 @@ parse_extended_property (EEwsItemPrivate *priv,
 		break;
 
 	default:
-		g_print ("Fetched unrecognised MAPI property 0x%x, value %d\n",
-			 tag, value);
+		g_print (
+			"Fetched unrecognised MAPI property 0x%x, value %d\n",
+			tag, value);
 	}
 }
 
@@ -575,8 +576,8 @@ process_modified_occurrences (EEwsItemPrivate *priv,
 
 	for (subparam = e_soap_parameter_get_first_child (param); subparam != NULL; subparam = e_soap_parameter_get_next_child (subparam)) {
 
-		subparam1 = e_soap_parameter_get_first_child_by_name(subparam, "ItemId");
-		modified_occurrence_id = e_soap_parameter_get_property(subparam1, "Id");
+		subparam1 = e_soap_parameter_get_first_child_by_name (subparam, "ItemId");
+		modified_occurrence_id = e_soap_parameter_get_property (subparam1, "Id");
 		priv->modified_occurrences = g_slist_append (priv->modified_occurrences, modified_occurrence_id);
 	}
 
@@ -717,8 +718,8 @@ parse_entries (GHashTable *hash_table,
 	ESoapParameter *subparam;
 
 	for (subparam = e_soap_parameter_get_first_child_by_name (param, "Entry");
-			subparam != NULL;
-			subparam = e_soap_parameter_get_next_child_by_name (subparam, "Entry")) {
+		subparam != NULL;
+		subparam = e_soap_parameter_get_next_child_by_name (subparam, "Entry")) {
 		gchar *key;
 		gpointer value;
 
@@ -775,9 +776,9 @@ parse_contact_field (EEwsItem *item,
 	} else if (!g_ascii_strcasecmp (name, "AssistantName")) {
 		priv->contact_fields->assistant_name = e_soap_parameter_get_string_value (subparam);
 	} else if (!g_ascii_strcasecmp (name, "Birthday")) {
-			value = e_soap_parameter_get_string_value (subparam);
-			priv->contact_fields->birthday = ews_item_parse_date (value);
-			g_free (value);
+		value = e_soap_parameter_get_string_value (subparam);
+		priv->contact_fields->birthday = ews_item_parse_date (value);
+		g_free (value);
 	} else if (!g_ascii_strcasecmp (name, "BusinessHomePage")) {
 		priv->contact_fields->business_homepage = e_soap_parameter_get_string_value (subparam);
 	} else if (!g_ascii_strcasecmp (name, "Department")) {
@@ -798,9 +799,9 @@ parse_contact_field (EEwsItem *item,
 	} else if (!g_ascii_strcasecmp (name, "Surname")) {
 		priv->contact_fields->surname = e_soap_parameter_get_string_value (subparam);
 	} else if (!g_ascii_strcasecmp (name, "WeddingAnniversary")) {
-			value = e_soap_parameter_get_string_value (subparam);
-			priv->contact_fields->wedding_anniversary = ews_item_parse_date (value);
-			g_free (value);
+		value = e_soap_parameter_get_string_value (subparam);
+		priv->contact_fields->wedding_anniversary = ews_item_parse_date (value);
+		g_free (value);
 	}
 }
 
@@ -956,8 +957,8 @@ e_ews_item_set_from_soap_parameter (EEwsItem *item,
 		node = param;
 
 	for (subparam = e_soap_parameter_get_first_child (node);
-			subparam != NULL;
-			subparam = e_soap_parameter_get_next_child (subparam)) {
+		subparam != NULL;
+		subparam = e_soap_parameter_get_next_child (subparam)) {
 		ESoapParameter *subparam1;
 		const gchar *name;
 		gchar *value = NULL;
@@ -1451,17 +1452,17 @@ e_ews_embed_attachment_id_in_uri (const gchar *olduri,
 
 	tmpfilename = g_filename_from_uri (olduri, NULL, NULL);
 
-	name = g_strrstr (tmpfilename, "/")+1;
-	tmpdir = g_strndup(tmpfilename, g_strrstr (tmpfilename, "/") - tmpfilename);
+	name = g_strrstr (tmpfilename, "/") + 1;
+	tmpdir = g_strndup (tmpfilename, g_strrstr (tmpfilename, "/") - tmpfilename);
 
 	snprintf (dirname, 350, "%s/%s", tmpdir, attach_id);
 	if (g_mkdir (dirname, 0775) == -1) {
-		g_warning("Failed create directory to place file in [%s]: %s\n", dirname, strerror (errno));
+		g_warning ("Failed create directory to place file in [%s]: %s\n", dirname, strerror (errno));
 	}
 
-	snprintf(filename, 350, "%s/%s", dirname, name);
+	snprintf (filename, 350, "%s/%s", dirname, name);
 	if (g_rename (tmpfilename, filename) != 0) {
-		g_warning("Failed to move attachment cache file [%s -> %s]: %s\n", tmpfilename, filename, strerror (errno));
+		g_warning ("Failed to move attachment cache file [%s -> %s]: %s\n", tmpfilename, filename, strerror (errno));
 	}
 
 	g_free (tmpdir);
@@ -1489,15 +1490,15 @@ e_ews_dump_file_attachment_from_soap_parameter (ESoapParameter *param,
 	for (subparam = e_soap_parameter_get_first_child (param); subparam != NULL; subparam = e_soap_parameter_get_next_child (subparam)) {
 		param_name = e_soap_parameter_get_name (subparam);
 
-		if (g_ascii_strcasecmp(param_name, "Name") == 0) {
+		if (g_ascii_strcasecmp (param_name, "Name") == 0) {
 			value = e_soap_parameter_get_string_value (subparam);
-			name = g_uri_escape_string(value, "", TRUE);
+			name = g_uri_escape_string (value, "", TRUE);
 			g_free (value);
-		} else if (g_ascii_strcasecmp(param_name, "Content") == 0) {
+		} else if (g_ascii_strcasecmp (param_name, "Content") == 0) {
 			value = e_soap_parameter_get_string_value (subparam);
 			content = g_base64_decode (value, &data_len);
 			g_free (value);
-		} else if (g_ascii_strcasecmp(param_name, "AttachmentId") == 0) {
+		} else if (g_ascii_strcasecmp (param_name, "AttachmentId") == 0) {
 			*attach_id = e_soap_parameter_get_property (subparam, "Id");
 		}
 	}
@@ -1511,16 +1512,16 @@ e_ews_dump_file_attachment_from_soap_parameter (ESoapParameter *param,
 	}
 
 	tmpfilename = (gchar *) content;
-	tmpdir = g_strndup(tmpfilename, g_strrstr (tmpfilename, "/") - tmpfilename);
+	tmpdir = g_strndup (tmpfilename, g_strrstr (tmpfilename, "/") - tmpfilename);
 
 	dirname = g_build_filename (tmpdir, comp_uid, NULL);
 	if (g_mkdir_with_parents (dirname, 0775) == -1) {
-		g_warning("Failed create directory to place file in [%s]: %s\n", dirname, strerror (errno));
+		g_warning ("Failed create directory to place file in [%s]: %s\n", dirname, strerror (errno));
 	}
 
 	filename = g_build_filename (dirname, name, NULL);
 	if (g_rename (tmpfilename, filename) != 0) {
-		g_warning("Failed to move attachment cache file [%s -> %s]: %s\n", tmpfilename, filename, strerror (errno));
+		g_warning ("Failed to move attachment cache file [%s -> %s]: %s\n", tmpfilename, filename, strerror (errno));
 	}
 
 	g_free (dirname);
@@ -1544,17 +1545,17 @@ e_ews_item_dump_mime_content (EEwsItem *item,
 	g_return_val_if_fail (item->priv->mime_content != NULL, NULL);
 
 	tmpfilename = (gchar *) item->priv->mime_content;
-	tmpdir = g_strndup(tmpfilename, g_strrstr (tmpfilename, "/") - tmpfilename);
+	tmpdir = g_strndup (tmpfilename, g_strrstr (tmpfilename, "/") - tmpfilename);
 
 	dirname = g_build_filename (tmpdir, "XXXXXX", NULL);
 	if (!mkdtemp (dirname))
 		g_warning ("Failed to create directory for attachment cache");
 
-	surename = g_uri_escape_string(item->priv->subject, "", TRUE);
+	surename = g_uri_escape_string (item->priv->subject, "", TRUE);
 	filename = g_build_filename (dirname, surename, NULL);
 
 	if (g_rename ((const gchar *) item->priv->mime_content, filename) != 0) {
-		g_warning("Failed to move attachment cache file");
+		g_warning ("Failed to move attachment cache file");
 	}
 
 	g_free (filename);
@@ -1959,10 +1960,10 @@ e_ews_free_resolve_contact (gpointer rc)
 /* free returned pointer with e_ews_permission_free() */
 EEwsPermission *
 e_ews_permission_new (EEwsPermissionUserType user_type,
-		      const gchar *display_name,
-		      const gchar *primary_smtp,
-		      const gchar *sid,
-		      guint32 rights)
+                      const gchar *display_name,
+                      const gchar *primary_smtp,
+                      const gchar *sid,
+                      guint32 rights)
 {
 	EEwsPermission *perm;
 
@@ -1990,8 +1991,8 @@ e_ews_permission_free (EEwsPermission *perm)
 
 static void
 ews_level_rights_converter (const gchar **plevel_name,
-			    guint32 *prights,
-			    gboolean level_to_rights)
+                            guint32 *prights,
+                            gboolean level_to_rights)
 {
 	struct _known {
 		const gchar *level_name;
@@ -1999,61 +2000,61 @@ ews_level_rights_converter (const gchar **plevel_name,
 	} known[] = {
 		{ "None", 0 },
 		{ "Owner",	E_EWS_PERMISSION_BIT_READ_ANY |
-				E_EWS_PERMISSION_BIT_CREATE |
-				E_EWS_PERMISSION_BIT_CREATE_SUBFOLDER |
-				E_EWS_PERMISSION_BIT_EDIT_OWNED |
-				E_EWS_PERMISSION_BIT_EDIT_ANY |
-				E_EWS_PERMISSION_BIT_DELETE_OWNED |
-				E_EWS_PERMISSION_BIT_DELETE_ANY |
-				E_EWS_PERMISSION_BIT_FOLDER_OWNER |
-				E_EWS_PERMISSION_BIT_FOLDER_CONTACT |
-				E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
-		{ "PublishingEditor", 
-				E_EWS_PERMISSION_BIT_READ_ANY |
-				E_EWS_PERMISSION_BIT_CREATE |
-				E_EWS_PERMISSION_BIT_CREATE_SUBFOLDER |
-				E_EWS_PERMISSION_BIT_EDIT_OWNED |
-				E_EWS_PERMISSION_BIT_EDIT_ANY |
-				E_EWS_PERMISSION_BIT_DELETE_OWNED |
-				E_EWS_PERMISSION_BIT_DELETE_ANY |
-				E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
+			E_EWS_PERMISSION_BIT_CREATE |
+			E_EWS_PERMISSION_BIT_CREATE_SUBFOLDER |
+			E_EWS_PERMISSION_BIT_EDIT_OWNED |
+			E_EWS_PERMISSION_BIT_EDIT_ANY |
+			E_EWS_PERMISSION_BIT_DELETE_OWNED |
+			E_EWS_PERMISSION_BIT_DELETE_ANY |
+			E_EWS_PERMISSION_BIT_FOLDER_OWNER |
+			E_EWS_PERMISSION_BIT_FOLDER_CONTACT |
+			E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
+		{ "PublishingEditor",
+			E_EWS_PERMISSION_BIT_READ_ANY |
+			E_EWS_PERMISSION_BIT_CREATE |
+			E_EWS_PERMISSION_BIT_CREATE_SUBFOLDER |
+			E_EWS_PERMISSION_BIT_EDIT_OWNED |
+			E_EWS_PERMISSION_BIT_EDIT_ANY |
+			E_EWS_PERMISSION_BIT_DELETE_OWNED |
+			E_EWS_PERMISSION_BIT_DELETE_ANY |
+			E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
 		{ "Editor",
-				E_EWS_PERMISSION_BIT_READ_ANY |
-				E_EWS_PERMISSION_BIT_CREATE |
-				E_EWS_PERMISSION_BIT_EDIT_OWNED |
-				E_EWS_PERMISSION_BIT_EDIT_ANY |
-				E_EWS_PERMISSION_BIT_DELETE_OWNED |
-				E_EWS_PERMISSION_BIT_DELETE_ANY |
-				E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
+			E_EWS_PERMISSION_BIT_READ_ANY |
+			E_EWS_PERMISSION_BIT_CREATE |
+			E_EWS_PERMISSION_BIT_EDIT_OWNED |
+			E_EWS_PERMISSION_BIT_EDIT_ANY |
+			E_EWS_PERMISSION_BIT_DELETE_OWNED |
+			E_EWS_PERMISSION_BIT_DELETE_ANY |
+			E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
 		{ "PublishingAuthor",
-				E_EWS_PERMISSION_BIT_READ_ANY |
-				E_EWS_PERMISSION_BIT_CREATE |
-				E_EWS_PERMISSION_BIT_CREATE_SUBFOLDER |
-				E_EWS_PERMISSION_BIT_EDIT_OWNED |
-				E_EWS_PERMISSION_BIT_DELETE_OWNED |
-				E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
+			E_EWS_PERMISSION_BIT_READ_ANY |
+			E_EWS_PERMISSION_BIT_CREATE |
+			E_EWS_PERMISSION_BIT_CREATE_SUBFOLDER |
+			E_EWS_PERMISSION_BIT_EDIT_OWNED |
+			E_EWS_PERMISSION_BIT_DELETE_OWNED |
+			E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
 		{ "Author",
-				E_EWS_PERMISSION_BIT_READ_ANY |
-				E_EWS_PERMISSION_BIT_CREATE |
-				E_EWS_PERMISSION_BIT_EDIT_OWNED |
-				E_EWS_PERMISSION_BIT_DELETE_OWNED |
-				E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
+			E_EWS_PERMISSION_BIT_READ_ANY |
+			E_EWS_PERMISSION_BIT_CREATE |
+			E_EWS_PERMISSION_BIT_EDIT_OWNED |
+			E_EWS_PERMISSION_BIT_DELETE_OWNED |
+			E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
 		{ "NoneditingAuthor",
-				E_EWS_PERMISSION_BIT_READ_ANY |
-				E_EWS_PERMISSION_BIT_CREATE |
-				E_EWS_PERMISSION_BIT_DELETE_OWNED |
-				E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
+			E_EWS_PERMISSION_BIT_READ_ANY |
+			E_EWS_PERMISSION_BIT_CREATE |
+			E_EWS_PERMISSION_BIT_DELETE_OWNED |
+			E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
 		{ "Reviewer",
-				E_EWS_PERMISSION_BIT_READ_ANY |
-				E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
+			E_EWS_PERMISSION_BIT_READ_ANY |
+			E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
 		{ "Contributor",
-				E_EWS_PERMISSION_BIT_CREATE |
-				E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
+			E_EWS_PERMISSION_BIT_CREATE |
+			E_EWS_PERMISSION_BIT_FOLDER_VISIBLE },
 		{ "FreeBusyTimeOnly",
-				E_EWS_PERMISSION_BIT_FREE_BUSY_SIMPLE },
+			E_EWS_PERMISSION_BIT_FREE_BUSY_SIMPLE },
 		{ "FreeBusyTimeAndSubjectAndLocation",
-				E_EWS_PERMISSION_BIT_FREE_BUSY_DETAILED }
-				
+			E_EWS_PERMISSION_BIT_FREE_BUSY_DETAILED }
+
 	};
 	gint ii;
 	guint32 rights;
@@ -2248,9 +2249,9 @@ ews_permissions_parse (ESoapParameter *param)
 }
 
 /* Returns GSList of EEwsPermission * objects, as read from @param.
-   Returned GSList should be freed with e_ews_permissions_free()
-   when done with it. Returns NULL when no permissions recognized
-   from @param.
+ * Returned GSList should be freed with e_ews_permissions_free()
+ * when done with it. Returns NULL when no permissions recognized
+ * from @param.
 */
 GSList *
 e_ews_permissions_from_soap_param (ESoapParameter *param)
diff --git a/src/server/e-ews-message.c b/src/server/e-ews-message.c
index 8c523b6..c7222a7 100644
--- a/src/server/e-ews-message.c
+++ b/src/server/e-ews-message.c
@@ -72,10 +72,10 @@ e_ews_message_new_with_header (const gchar *uri,
 	e_soap_message_end_header (msg);
 
 	e_soap_message_start_body (msg);
-	e_soap_message_add_namespace(
+	e_soap_message_add_namespace (
 		msg, "messages",
 		"http://schemas.microsoft.com/exchange/services/2006/messages";);
-	e_soap_message_start_element(msg, method_name, "messages", NULL);
+	e_soap_message_start_element (msg, method_name, "messages", NULL);
 	e_soap_message_set_default_namespace (
 		msg,
 		"http://schemas.microsoft.com/exchange/services/2006/types";);
diff --git a/src/server/e-soap-message.c b/src/server/e-soap-message.c
index 69301e8..31c2115 100644
--- a/src/server/e-soap-message.c
+++ b/src/server/e-soap-message.c
@@ -118,7 +118,7 @@ fetch_ns (ESoapMessage *msg,
 	else if (prefix && !ns_uri) {
 		ns = xmlSearchNs (priv->doc, priv->last_node, (const xmlChar *) prefix);
 		if (!ns)
-			ns = xmlNewNs (priv->last_node, (const xmlChar *) "", (const xmlChar *)prefix);
+			ns = xmlNewNs (priv->last_node, (const xmlChar *) "", (const xmlChar *) prefix);
 	}
 
 	return ns;
@@ -131,8 +131,9 @@ soap_got_headers (SoupMessage *msg,
 	ESoapMessagePrivate *priv = E_SOAP_MESSAGE_GET_PRIVATE (msg);
 	const gchar *size;
 
-	size = soup_message_headers_get_one (msg->response_headers,
-					     "Content-Length");
+	size = soup_message_headers_get_one (
+		msg->response_headers,
+		"Content-Length");
 
 	if (size)
 		priv->response_size = strtol (size, NULL, 10);
@@ -171,9 +172,10 @@ soap_sax_startElementNs (gpointer _ctxt,
 	ESoapMessagePrivate *priv = ctxt->_private;
 	gchar *fname;
 
-	xmlSAX2StartElementNs (ctxt, localname, prefix, uri, nb_namespaces,
-			       namespaces, nb_attributes, nb_defaulted,
-			       attributes);
+	xmlSAX2StartElementNs (
+		ctxt, localname, prefix, uri, nb_namespaces,
+		namespaces, nb_attributes, nb_defaulted,
+		attributes);
 
 	/* steal_node can contain multiple node name separated by " " */
 	if (priv->steal_node && *priv->steal_node) {
@@ -247,9 +249,10 @@ soap_sax_characters (gpointer _ctxt,
 		guchar *bdata = g_malloc (len);
 		gsize blen;
 
-		blen = g_base64_decode_step ((const gchar *) ch, len,
-					     bdata, &priv->steal_b64_state,
-					     &priv->steal_b64_save);
+		blen = g_base64_decode_step (
+			(const gchar *) ch, len,
+			bdata, &priv->steal_b64_state,
+			&priv->steal_b64_save);
 		if (write (priv->steal_fd, (const gchar *) bdata, blen) != blen) {
 			g_free (bdata);
 			goto write_err;
@@ -276,8 +279,9 @@ soap_got_chunk (SoupMessage *msg,
 	}
 
 	if (!priv->ctxt) {
-		priv->ctxt = xmlCreatePushParserCtxt (NULL, msg, chunk->data,
-						      chunk->length, NULL);
+		priv->ctxt = xmlCreatePushParserCtxt (
+			NULL, msg, chunk->data,
+			chunk->length, NULL);
 		priv->ctxt->_private = priv;
 		priv->ctxt->sax->startElementNs = soap_sax_startElementNs;
 		priv->ctxt->sax->endElementNs = soap_sax_endElementNs;
@@ -316,15 +320,17 @@ e_soap_message_new (const gchar *method,
 	if (!uri)
 		return NULL;
 
-	msg = e_soap_message_new_from_uri (method, uri, standalone,
-					   xml_encoding, env_prefix, env_uri);
+	msg = e_soap_message_new_from_uri (
+		method, uri, standalone,
+		xml_encoding, env_prefix, env_uri);
 
 	soup_uri_free (uri);
 
 	/* Don't accumulate body data into a huge buffer.
 	 * Instead, parse it as it arrives. */
-	soup_message_body_set_accumulate (SOUP_MESSAGE (msg)->response_body,
-					  FALSE);
+	soup_message_body_set_accumulate (
+		SOUP_MESSAGE (msg)->response_body,
+		FALSE);
 	g_signal_connect (msg, "got-headers", G_CALLBACK (soap_got_headers), NULL);
 	g_signal_connect (msg, "got-chunk", G_CALLBACK (soap_got_chunk), NULL);
 	g_signal_connect (msg, "restarted", G_CALLBACK (soap_restarted), NULL);
diff --git a/src/server/e-soap-response.c b/src/server/e-soap-response.c
index 114b759..74edda7 100644
--- a/src/server/e-soap-response.c
+++ b/src/server/e-soap-response.c
@@ -31,7 +31,7 @@ static xmlNode *
 soup_xml_real_node (xmlNode *node)
 {
 	while (node && (node->type == XML_COMMENT_NODE ||
-			xmlIsBlankNode (node)))
+		xmlIsBlankNode (node)))
 		node = node->next;
 	return node;
 }
@@ -150,7 +150,7 @@ parse_parameters (ESoapResponse *response,
 	for (tmp = soup_xml_real_node (xml_method->children);
 	     tmp != NULL;
 	     tmp = soup_xml_real_node (tmp->next)) {
-		if (!strcmp ((const gchar *)tmp->name, "Fault")) {
+		if (!strcmp ((const gchar *) tmp->name, "Fault")) {
 			response->priv->soap_fault = tmp;
 			continue;
 		} else {
@@ -212,16 +212,16 @@ e_soap_response_from_xmldoc (ESoapResponse *response,
 		return FALSE;
 	}
 
-	if (strcmp ((const gchar *)xml_root->name, "Envelope") != 0) {
+	if (strcmp ((const gchar *) xml_root->name, "Envelope") != 0) {
 		xmlFreeDoc (xmldoc);
 		return FALSE;
 	}
 
 	xml_body = soup_xml_real_node (xml_root->children);
 	if (xml_body != NULL) {
-		if (strcmp ((const gchar *)xml_body->name, "Header") == 0)
+		if (strcmp ((const gchar *) xml_body->name, "Header") == 0)
 			xml_body = soup_xml_real_node (xml_body->next);
-		if (strcmp ((const gchar *)xml_body->name, "Body") != 0) {
+		if (strcmp ((const gchar *) xml_body->name, "Body") != 0) {
 			xmlFreeDoc (xmldoc);
 			return FALSE;
 		}
diff --git a/src/server/ews-errors.c b/src/server/ews-errors.c
index 31105e6..5bd23e1 100644
--- a/src/server/ews-errors.c
+++ b/src/server/ews-errors.c
@@ -300,10 +300,11 @@ setup_error_map (gpointer data)
 {
 	gint i;
 
-	ews_error_hash = g_hash_table_new	(g_str_hash, g_str_equal);
+	ews_error_hash = g_hash_table_new (g_str_hash, g_str_equal);
 	for (i = 0; i < G_N_ELEMENTS (ews_conn_errors); i++)
-		g_hash_table_insert	(ews_error_hash, (gpointer) ews_conn_errors[i].error_id,
-					 GINT_TO_POINTER (ews_conn_errors[i].error_code));
+		g_hash_table_insert (
+			ews_error_hash, (gpointer) ews_conn_errors[i].error_id,
+			GINT_TO_POINTER (ews_conn_errors[i].error_code));
 	return NULL;
 }
 
diff --git a/src/server/ews-kerberos.c b/src/server/ews-kerberos.c
index bbececd..746dc71 100644
--- a/src/server/ews-kerberos.c
+++ b/src/server/ews-kerberos.c
@@ -99,10 +99,11 @@ get_init_cred (krb5_context ctx,
 	krb5_get_init_creds_opt_set_forwardable (&opt, 0);
 	krb5_get_init_creds_opt_set_proxiable (&opt, 0);
 
-	result = krb5_get_init_creds_password (ctx, cred, principal,
-					       (gchar *) passwd,
-					       NULL, NULL, 0,
-					       (gchar *) in_tkt_service, &opt);
+	result = krb5_get_init_creds_password (
+		ctx, cred, principal,
+		(gchar *) passwd,
+		NULL, NULL, 0,
+		(gchar *) in_tkt_service, &opt);
 	krb5_free_principal (ctx, principal);
 
 	return krb5_result_to_ews_kerberos_result (result);
@@ -135,17 +136,19 @@ ews_kerberos_change_password (const gchar *user,
 	if (!ctx)
 		return EWS_KERBEROS_FAILED;
 
-	result = get_init_cred (ctx, user, old_password,
-				"kadmin/changepw", &creds);
+	result = get_init_cred (
+		ctx, user, old_password,
+		"kadmin/changepw", &creds);
 	if (result != EWS_KERBEROS_OK) {
 		krb5_free_context (ctx);
 		return result;
 	}
 
-	result = krb5_change_password (ctx, &creds, (gchar *) new_password,
-				       &res_code, &res_code_string, &res_string);
+	result = krb5_change_password (
+		ctx, &creds, (gchar *) new_password,
+		&res_code, &res_code_string, &res_string);
 
-	g_print("%s", res_code_string.data);
+	g_print ("%s", res_code_string.data);
 	krb5_free_cred_contents (ctx, &creds);
 	krb5_free_data_contents (ctx, &res_code_string);
 	krb5_free_data_contents (ctx, &res_string);
diff --git a/src/server/tests/test-autocompletion.c b/src/server/tests/test-autocompletion.c
index 657f7e8..304b932 100644
--- a/src/server/tests/test-autocompletion.c
+++ b/src/server/tests/test-autocompletion.c
@@ -45,8 +45,9 @@ resolve_names_cb (GObject *object,
 	gboolean has_last_item = FALSE;
 	GError *error = NULL;
 
-	e_ews_connection_resolve_names_finish	(cnc, res, &mailboxes, &contact_items,
-						 &has_last_item, &error);
+	e_ews_connection_resolve_names_finish (
+		cnc, res, &mailboxes, &contact_items,
+		&has_last_item, &error);
 	if (error != NULL) {
 		g_warning ("Unable to autocomplete: %s \n", error->message);
 		g_clear_error (&error);
diff --git a/src/server/tests/test-connection.c b/src/server/tests/test-connection.c
index cf71f0c..bf91132 100644
--- a/src/server/tests/test-connection.c
+++ b/src/server/tests/test-connection.c
@@ -125,8 +125,8 @@ con_test_autodiscover ()
 
 	util_get_email_from_env (&email);
 	g_assert_cmpstr (email, !=, NULL);
-	g_print("%s %s : password : %s \n", G_STRLOC, G_STRFUNC, password);
-	g_print("%s %s : email : %s \n", G_STRLOC, G_STRFUNC, email);
+	g_print ("%s %s : password : %s \n", G_STRLOC, G_STRFUNC, password);
+	g_print ("%s %s : email : %s \n", G_STRLOC, G_STRFUNC, email);
 
 	user_data = g_new0 (struct _cb_data, 1);
 	user_data->test_case = g_strdup ("postive case... \n");
diff --git a/src/server/tests/test-createfolder.c b/src/server/tests/test-createfolder.c
index 9337667..795f12d 100644
--- a/src/server/tests/test-createfolder.c
+++ b/src/server/tests/test-createfolder.c
@@ -48,8 +48,7 @@ create_folder_cb (GObject *object,
 	GError *error = NULL;
 	EwsFolderId *fid = NULL;
 
-	e_ews_connection_create_folder_finish	(cnc, res, &fid,
-						 &error);
+	e_ews_connection_create_folder_finish (cnc, res, &fid, &error);
 	if (error != NULL) {
 		g_warning ("Unable to create: %s \n", error->message);
 		g_clear_error (&error);
diff --git a/src/server/tests/test-cuditem.c b/src/server/tests/test-cuditem.c
index c3c80b6..92dadbc 100644
--- a/src/server/tests/test-cuditem.c
+++ b/src/server/tests/test-cuditem.c
@@ -47,7 +47,7 @@ create_item_ready_callback (GObject *object,
 	GError *error = NULL;
 	GSList *ids = NULL, *l;
 
-	e_ews_connection_create_items_finish	(cnc, res, &ids, &error);
+	e_ews_connection_create_items_finish (cnc, res, &ids, &error);
 
 	if (error != NULL) {
 		g_print ("Unable to get item: %s :%d \n", error->message, error->code);
@@ -84,10 +84,10 @@ op_test_create_item_get_soap_msg (ESoapMessage *msg,
 
 	e_soap_message_end_element (msg);
 
-	g_printf("\nSOAP Request message:\n");
+	g_printf ("\nSOAP Request message:\n");
 	doc = e_soap_message_get_xml_doc (msg);
 	xmlDocDumpFormatMemory (doc, &xmlbuff,&size,1);
-	g_printf("%s\n", (gchar *)xmlbuff);
+	g_printf ("%s\n", (gchar *) xmlbuff);
 	xmlFree (xmlbuff);
 }
 
diff --git a/src/server/tests/test-deletefolder.c b/src/server/tests/test-deletefolder.c
index 6bc206f..f9bf5ec 100644
--- a/src/server/tests/test-deletefolder.c
+++ b/src/server/tests/test-deletefolder.c
@@ -45,8 +45,7 @@ delete_folder_cb (GObject *object,
 	EEwsConnection *cnc = E_EWS_CONNECTION (object);
 	GError *error = NULL;
 
-	e_ews_connection_delete_folder_finish	(cnc, res,
-						 &error);
+	e_ews_connection_delete_folder_finish (cnc, res, &error);
 	if (error != NULL) {
 		g_warning ("Unable to create: %s \n", error->message);
 		g_clear_error (&error);
diff --git a/src/server/tests/test-get-oof-settings.c b/src/server/tests/test-get-oof-settings.c
index 38fc3b3..2162a3b 100644
--- a/src/server/tests/test-get-oof-settings.c
+++ b/src/server/tests/test-get-oof-settings.c
@@ -44,8 +44,9 @@ get_oof_settings_cb (GObject *object,
 	OOFSettings *oof_settings;
 	GError *error = NULL;
 
-	e_ews_connection_get_oof_settings_finish (cnc, res, &oof_settings,
-						  &error);
+	e_ews_connection_get_oof_settings_finish (
+		cnc, res, &oof_settings,
+		&error);
 	if (error != NULL) {
 		g_warning ("Unable to get out of office settings: %s \n", error->message);
 		g_clear_error (&error);
diff --git a/src/server/tests/test-getattachment.c b/src/server/tests/test-getattachment.c
index 881aa16..7f6ee98 100644
--- a/src/server/tests/test-getattachment.c
+++ b/src/server/tests/test-getattachment.c
@@ -47,7 +47,7 @@ get_attachments_ready_callback (GObject *object,
 	GError *error = NULL;
 	GSList *ids = NULL, *l;
 
-	e_ews_connection_get_attachments_finish	(cnc, res, &ids, &error);
+	e_ews_connection_get_attachments_finish (cnc, res, &ids, &error);
 
 	if (error != NULL) {
 		g_print ("Unable to get attachment: %s :%d \n", error->message, error->code);
diff --git a/src/server/tests/test-syncfolder.c b/src/server/tests/test-syncfolder.c
index 808f306..6ef9da3 100644
--- a/src/server/tests/test-syncfolder.c
+++ b/src/server/tests/test-syncfolder.c
@@ -53,9 +53,10 @@ folder_items_ready_callback (GObject *object,
 	GError *error = NULL;
 
 	/* Only for test program */
-	e_ews_connection_sync_folder_items_finish	(cnc, res, &sync_state, &last_in_range,
-							 &items_created, &items_updated,
-							 &items_deleted, &error);
+	e_ews_connection_sync_folder_items_finish (
+		cnc, res, &sync_state, &last_in_range,
+		&items_created, &items_updated,
+		&items_deleted, &error);
 
 	if (error != NULL) {
 		g_print ("Unable to sync the folder items: %s :%d \n", error->message, error->code);
@@ -130,9 +131,10 @@ folder_hierarchy_ready_callback (GObject *object,
 	gchar *sync_state = NULL;
 	GError *error = NULL;
 
-	e_ews_connection_sync_folder_hierarchy_finish	(cnc, res, &sync_state, &last_in_range,
-							 &folders_created, &folders_updated,
-							 &folders_deleted, &error);
+	e_ews_connection_sync_folder_hierarchy_finish (
+		cnc, res, &sync_state, &last_in_range,
+		&folders_created, &folders_updated,
+		&folders_deleted, &error);
 
 	if (error != NULL) {
 		g_print ("Unable to fetch the folder hierarchy: %s :%d \n", error->message, error->code);
@@ -206,7 +208,7 @@ get_item_ready_callback (GObject *object,
 	GError *error = NULL;
 	GSList *items = NULL, *l;
 
-	e_ews_connection_get_items_finish	(cnc, res, &items, &error);
+	e_ews_connection_get_items_finish (cnc, res, &items, &error);
 
 	if (error != NULL) {
 		g_print ("Unable to get item: %s :%d \n", error->message, error->code);
diff --git a/src/utils/e-ews-query-to-restriction.c b/src/utils/e-ews-query-to-restriction.c
index a45dff0..9a28575 100644
--- a/src/utils/e-ews-query-to-restriction.c
+++ b/src/utils/e-ews-query-to-restriction.c
@@ -502,9 +502,10 @@ e_ews_make_timestamp (time_t when)
 	struct tm *tm;
 
 	tm = gmtime (&when);
-	return g_strdup_printf ("%04d-%02d-%02dT%02d:%02d:%02dZ",
-				tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
-				tm->tm_hour, tm->tm_min, tm->tm_sec);
+	return g_strdup_printf (
+		"%04d-%02d-%02dT%02d:%02d:%02dZ",
+		tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
+		tm->tm_hour, tm->tm_min, tm->tm_sec);
 }
 
 static ESExpResult *
@@ -520,14 +521,16 @@ calendar_func_occur_in_time_range (ESExp *f,
 	msg = (ESoapMessage *) data;
 
 	if (argv[0]->type != ESEXP_RES_TIME) {
-		e_sexp_fatal_error (f, "occur-in-time-range? expects argument 1 "
-				    "to be a time_t");
+		e_sexp_fatal_error (
+			f, "occur-in-time-range? expects argument 1 "
+			"to be a time_t");
 		return NULL;
 	}
 
 	if (argv[1]->type != ESEXP_RES_TIME) {
-		e_sexp_fatal_error (f, "occur-in-time-range? expects argument 2 "
-				    "to be a time_t");
+		e_sexp_fatal_error (
+			f, "occur-in-time-range? expects argument 2 "
+			"to be a time_t");
 		return NULL;
 	}
 
@@ -616,15 +619,15 @@ common_message_func_header_contains (ESExp *f,
 			const gchar *value;
 			value = argv[1]->value.string;
 
-			if (!g_ascii_strcasecmp(headername, "subject")) {
+			if (!g_ascii_strcasecmp (headername, "subject")) {
 				WRITE_CONTAINS_MESSAGE (msg, mode, "IgnoreCase", "item:Subject", value);
-			} else if (!g_ascii_strcasecmp(headername, "from")) {
+			} else if (!g_ascii_strcasecmp (headername, "from")) {
 				WRITE_CONTAINS_MESSAGE (msg, mode, "IgnoreCase", "message:From", value);
-			} else if (!g_ascii_strcasecmp(headername, "to")) {
+			} else if (!g_ascii_strcasecmp (headername, "to")) {
 				WRITE_CONTAINS_MESSAGE (msg, mode, "IgnoreCase", "message:ToRecipients", value);
-			} else if (!g_ascii_strcasecmp(headername, "cc")) {
+			} else if (!g_ascii_strcasecmp (headername, "cc")) {
 				WRITE_CONTAINS_MESSAGE (msg, mode, "IgnoreCase", "message:CcRecipients", value);
-			} else if (!g_ascii_strcasecmp(headername, "bcc")) {
+			} else if (!g_ascii_strcasecmp (headername, "bcc")) {
 				WRITE_CONTAINS_MESSAGE (msg, mode, "IgnoreCase", "message:BccRecipients", value);
 			}
 		}
@@ -652,15 +655,15 @@ message_func_header_exists (ESExp *f,
 		const gchar *headername;
 		headername = argv[0]->value.string;
 
-		if (!g_ascii_strcasecmp(headername, "subject")) {
+		if (!g_ascii_strcasecmp (headername, "subject")) {
 			WRITE_EXISTS_MESSAGE (msg, "item:Subject");
-		} else if (!g_ascii_strcasecmp(headername, "from")) {
+		} else if (!g_ascii_strcasecmp (headername, "from")) {
 			WRITE_EXISTS_MESSAGE (msg, "message:From");
-		} else if (!g_ascii_strcasecmp(headername, "to")) {
+		} else if (!g_ascii_strcasecmp (headername, "to")) {
 			WRITE_EXISTS_MESSAGE (msg, "message:ToRecipients");
-		} else if (!g_ascii_strcasecmp(headername, "cc")) {
+		} else if (!g_ascii_strcasecmp (headername, "cc")) {
 			WRITE_EXISTS_MESSAGE (msg, "message:CcRecipients");
-		} else if (!g_ascii_strcasecmp(headername, "bcc")) {
+		} else if (!g_ascii_strcasecmp (headername, "bcc")) {
 			WRITE_EXISTS_MESSAGE (msg, "message:BccRecipients");
 		}
 	}
@@ -684,9 +687,9 @@ message_func_system_flag (ESExp *f,
 	if (argv[0]->type == ESEXP_RES_STRING) {
 		const gchar *name;
 		name = argv[0]->value.string;
-		if (!g_ascii_strcasecmp(name, "Attachments")) {
+		if (!g_ascii_strcasecmp (name, "Attachments")) {
 			WRITE_EXISTS_MESSAGE (msg, "item:HasAttachments");
-		} else if (!g_ascii_strcasecmp(name, "deleted") || !g_ascii_strcasecmp(name, "junk")) {
+		} else if (!g_ascii_strcasecmp (name, "deleted") || !g_ascii_strcasecmp (name, "junk")) {
 			r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 			r->value.boolean = FALSE;
 			return r;
@@ -1132,30 +1135,36 @@ e_ews_convert_sexp_to_restriction (ESoapMessage *msg,
 	if (type == EWS_FOLDER_TYPE_CONTACTS) {
 		for (i = 0; i < G_N_ELEMENTS (contact_symbols); i++) {
 			if (contact_symbols[i].immediate)
-				e_sexp_add_ifunction (sexp, 0, contact_symbols[i].name,
-							     (ESExpIFunc *) contact_symbols[i].func, msg);
+				e_sexp_add_ifunction (
+					sexp, 0, contact_symbols[i].name,
+					(ESExpIFunc *) contact_symbols[i].func, msg);
 			else
-				e_sexp_add_function (sexp, 0, contact_symbols[i].name,
-							    contact_symbols[i].func, msg);
+				e_sexp_add_function (
+					sexp, 0, contact_symbols[i].name,
+					contact_symbols[i].func, msg);
 		}
 
 	} else if (type == EWS_FOLDER_TYPE_CALENDAR || type == EWS_FOLDER_TYPE_TASKS) {
 		for (i = 0; i < G_N_ELEMENTS (calendar_symbols); i++) {
 			if (calendar_symbols[i].immediate)
-				e_sexp_add_ifunction (sexp, 0, calendar_symbols[i].name,
-							     (ESExpIFunc *) calendar_symbols[i].func, msg);
+				e_sexp_add_ifunction (
+					sexp, 0, calendar_symbols[i].name,
+					(ESExpIFunc *) calendar_symbols[i].func, msg);
 			else
-				e_sexp_add_function (sexp, 0, calendar_symbols[i].name,
-							    calendar_symbols[i].func, msg);
+				e_sexp_add_function (
+					sexp, 0, calendar_symbols[i].name,
+					calendar_symbols[i].func, msg);
 		}
 	} else if (type == EWS_FOLDER_TYPE_MAILBOX) {
 		for (i = 0; i < G_N_ELEMENTS (message_symbols); i++) {
 			if (message_symbols[i].immediate)
-				e_sexp_add_ifunction (sexp, 0, message_symbols[i].name,
-							     (ESExpIFunc *) message_symbols[i].func, msg);
+				e_sexp_add_ifunction (
+					sexp, 0, message_symbols[i].name,
+					(ESExpIFunc *) message_symbols[i].func, msg);
 			else
-				e_sexp_add_function (sexp, 0, message_symbols[i].name,
-							    message_symbols[i].func, msg);
+				e_sexp_add_function (
+					sexp, 0, message_symbols[i].name,
+					message_symbols[i].func, msg);
 		}
 
 	}
diff --git a/src/utils/ews-camel-common.c b/src/utils/ews-camel-common.c
index 0793e11..64bd411 100644
--- a/src/utils/ews-camel-common.c
+++ b/src/utils/ews-camel-common.c
@@ -57,21 +57,23 @@ create_mime_message_cb (ESoapMessage *msg,
 	 * to stream this directly rather than storing it in RAM. Which right
 	 * now we are doing about four times: the GByteArray in the mem stream,
 	 * then the base64 version, then the xmlDoc, then the soup request. */
-	camel_mime_message_set_best_encoding (create_data->message,
-					      CAMEL_BESTENC_GET_ENCODING,
-					      CAMEL_BESTENC_8BIT);
+	camel_mime_message_set_best_encoding (
+		create_data->message,
+		CAMEL_BESTENC_GET_ENCODING,
+		CAMEL_BESTENC_8BIT);
 
 	mem = camel_stream_mem_new ();
 	filtered = camel_stream_filter_new (mem);
 
-	filter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE,
-				     CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
+	filter = camel_mime_filter_crlf_new (
+		CAMEL_MIME_FILTER_CRLF_ENCODE,
+		CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
 	camel_stream_filter_add (CAMEL_STREAM_FILTER (filtered), filter);
 	g_object_unref (filter);
 
-	camel_data_wrapper_write_to_stream_sync
-				(CAMEL_DATA_WRAPPER (create_data->message),
-				 filtered, NULL, NULL);
+	camel_data_wrapper_write_to_stream_sync (
+		CAMEL_DATA_WRAPPER (create_data->message),
+		filtered, NULL, NULL);
 	camel_stream_flush (filtered, NULL, NULL);
 	camel_stream_flush (mem, NULL, NULL);
 	bytes = camel_stream_mem_get_byte_array (CAMEL_STREAM_MEM (mem));
@@ -168,8 +170,9 @@ camel_ews_utils_create_mime_message (EEwsConnection *cnc,
 
 	item = (EEwsItem *) ids->data;
 	if (!item || !(ewsid = e_ews_item_get_id (item))) {
-		g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
-			    _("CreateItem call failed to return ID for new message"));
+		g_set_error (
+			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+			_("CreateItem call failed to return ID for new message"));
 		return FALSE;
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]