[evolution-data-server] Coding style and whitespace cleanups.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Coding style and whitespace cleanups.
- Date: Sun, 3 Jul 2011 02:15:25 +0000 (UTC)
commit b13ee9d881e3d679163cc2d6075cd7cf4d7c9906
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Jul 2 11:46:04 2011 -0400
Coding style and whitespace cleanups.
.../backends/google/e-book-backend-google.c | 4 +-
.../backends/google/e-gdata-goa-authorizer.c | 4 +-
addressbook/libebook/e-contact.c | 4 +-
addressbook/libebook/e-destination.c | 7 ++--
addressbook/libebook/e-vcard.c | 32 +++++++++---------
calendar/libecal/e-cal-client.c | 4 +-
libebackend/e-data-server-module.c | 29 ++++++++++++-----
libebackend/e-file-cache.c | 33 ++++++++++++++------
libebackend/e-offline-listener.c | 20 +++++++++---
libedataserverui/e-client-utils.c | 2 +-
libedataserverui/e-contact-store.c | 2 +-
11 files changed, 88 insertions(+), 53 deletions(-)
---
diff --git a/addressbook/backends/google/e-book-backend-google.c b/addressbook/backends/google/e-book-backend-google.c
index 568acc9..5fb71f1 100644
--- a/addressbook/backends/google/e-book-backend-google.c
+++ b/addressbook/backends/google/e-book-backend-google.c
@@ -1128,7 +1128,7 @@ e_book_backend_google_remove_contacts (EBookBackend *backend, EDataBook *book, g
cancellable = start_operation (backend, opid, cancellable, _("Deleting contactâ"));
#ifdef HAVE_LIBGDATA_0_9
gdata_service_delete_entry_async (GDATA_SERVICE (priv->service), gdata_contacts_service_get_primary_authorization_domain (),
- entry, cancellable, (GAsyncReadyCallback) remove_contact_cb, data);
+ entry, cancellable, (GAsyncReadyCallback) remove_contact_cb, data);
#else
gdata_service_delete_entry_async (GDATA_SERVICE (priv->service), entry, cancellable, (GAsyncReadyCallback) remove_contact_cb, data);
#endif
@@ -1240,7 +1240,7 @@ e_book_backend_google_modify_contact (EBookBackend *backend, EDataBook *book, gu
cancellable = start_operation (backend, opid, cancellable, _("Modifying contactâ"));
#ifdef HAVE_LIBGDATA_0_9
gdata_service_update_entry_async (GDATA_SERVICE (priv->service), gdata_contacts_service_get_primary_authorization_domain (),
- entry, cancellable, (GAsyncReadyCallback) modify_contact_cb, data);
+ entry, cancellable, (GAsyncReadyCallback) modify_contact_cb, data);
#else
gdata_service_update_entry_async (GDATA_SERVICE (priv->service), entry, cancellable, (GAsyncReadyCallback) modify_contact_cb, data);
#endif
diff --git a/addressbook/backends/google/e-gdata-goa-authorizer.c b/addressbook/backends/google/e-gdata-goa-authorizer.c
index b43df79..6b568d8 100644
--- a/addressbook/backends/google/e-gdata-goa-authorizer.c
+++ b/addressbook/backends/google/e-gdata-goa-authorizer.c
@@ -103,7 +103,7 @@ gdata_goa_authorizer_get_parameters (SoupMessage *message,
string = oauth_gen_nonce ();
key = (gpointer) "oauth_nonce";
g_hash_table_insert (parameters, key, g_strdup (string));
- free (string); /* do not use g_free() */
+ free (string); /* do not use g_free () */
key = (gpointer) "oauth_timestamp";
string = g_strdup_printf ("%" G_GINT64_FORMAT, (gint64) time (NULL));
@@ -167,7 +167,7 @@ gdata_goa_authorizer_get_parameters (SoupMessage *message,
key = (gpointer) "oauth_signature";
string = oauth_sign_hmac_sha1 (base_string->str, signing_key->str);
g_hash_table_insert (parameters, key, g_strdup (string));
- free (string); /* do not use g_free() */
+ free (string); /* do not use g_free () */
g_free (request_uri);
diff --git a/addressbook/libebook/e-contact.c b/addressbook/libebook/e-contact.c
index 1094d96..8ea4904 100644
--- a/addressbook/libebook/e-contact.c
+++ b/addressbook/libebook/e-contact.c
@@ -550,7 +550,7 @@ fileas_getter (EContact *contact, EVCardAttribute *attr)
if (!attr) {
/* Generate a FILE_AS field */
EContactName *name;
- gchar* new_file_as = NULL;
+ gchar *new_file_as = NULL;
name = e_contact_get (contact, E_CONTACT_NAME);
@@ -602,7 +602,7 @@ static void
fileas_setter (EContact *contact, EVCardAttribute *attr, gpointer data)
{
/* Default implementation */
- const gchar* file_as = data;
+ const gchar *file_as = data;
e_vcard_attribute_add_value (attr, file_as ? : "");
}
diff --git a/addressbook/libebook/e-destination.c b/addressbook/libebook/e-destination.c
index aff42df..8739cd1 100644
--- a/addressbook/libebook/e-destination.c
+++ b/addressbook/libebook/e-destination.c
@@ -418,7 +418,7 @@ e_destination_set_contact (EDestination *dest, EContact *contact, gint email_num
lists_count++;
type = CONTACT_LIST;
} else if (g_ascii_strcasecmp (EVC_EMAIL, e_vcard_attribute_get_name (attr->data)) == 0) {
- type = CONTACT;
+ type = CONTACT;
} else {
type = NONE;
remove = TRUE;
@@ -969,7 +969,6 @@ e_destination_get_email (const EDestination *dest)
return priv->email;
}
-
/* Helper function to e_destination_get_address capable of recursively
* iterating through structured destinations list */
static void
@@ -1183,7 +1182,7 @@ e_destination_list_get_root_dests (const EDestination *dest)
const GList *
e_destination_list_get_dests (const EDestination *dest)
{
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
+ g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
if (!e_destination_is_evolution_list (dest))
return NULL;
@@ -1192,7 +1191,7 @@ e_destination_list_get_dests (const EDestination *dest)
GList *iter;
for (iter = dest->priv->list_dests; iter; iter = iter->next) {
if (e_destination_is_evolution_list (iter->data)) {
- GList *l = g_list_copy ((GList*)e_destination_list_get_dests (iter->data));
+ GList *l = g_list_copy ((GList*) e_destination_list_get_dests (iter->data));
dest->priv->list_alldests = g_list_concat (dest->priv->list_alldests, l);
} else {
dest->priv->list_alldests = g_list_append (dest->priv->list_alldests, iter->data);
diff --git a/addressbook/libebook/e-vcard.c b/addressbook/libebook/e-vcard.c
index c6a51ab..644f170 100644
--- a/addressbook/libebook/e-vcard.c
+++ b/addressbook/libebook/e-vcard.c
@@ -658,21 +658,20 @@ parse (EVCard *evc, const gchar *str)
static GList*
e_vcard_ensure_attributes (EVCard *evc)
{
- if (evc->priv->vcard) {
- gchar *vcs = evc->priv->vcard;
+ if (evc->priv->vcard) {
+ gchar *vcs = evc->priv->vcard;
- /* detach vCard to avoid loops */
- evc->priv->vcard = NULL;
+ /* detach vCard to avoid loops */
+ evc->priv->vcard = NULL;
- /* Parse the vCard */
- parse (evc, vcs);
- g_free (vcs);
- }
+ /* Parse the vCard */
+ parse (evc, vcs);
+ g_free (vcs);
+ }
- return evc->priv->attributes;
+ return evc->priv->attributes;
}
-
/**
* e_vcard_escape_string:
* @s: the string to escape
@@ -975,7 +974,7 @@ e_vcard_to_string (EVCard *evc, EVCardFormat format)
/* If the vcard is not parsed yet, return it directly */
/* XXX: The format is ignored but it does not really matter
- since only 3.0 is supported at the moment */
+ * since only 3.0 is supported at the moment */
if (evc->priv->vcard)
return g_strdup (evc->priv->vcard);
@@ -1178,8 +1177,9 @@ e_vcard_remove_attribute (EVCard *evc, EVCardAttribute *attr)
g_return_if_fail (E_IS_VCARD (evc));
g_return_if_fail (attr != NULL);
- /* No need to call e_vcard_ensure_attributes() here. It has already been
- called if this is a valid call and attr is among our attributes */
+ /* No need to call e_vcard_ensure_attributes() here. It has
+ * already been called if this is a valid call and attr is among
+ * our attributes. */
evc->priv->attributes = g_list_remove (evc->priv->attributes, attr);
e_vcard_attribute_free (attr);
}
@@ -2136,10 +2136,10 @@ e_vcard_attribute_get_param (EVCardAttribute *attr, const gchar *name)
gboolean
e_vcard_is_parsed (EVCard *evc)
{
- g_return_val_if_fail (E_IS_VCARD (evc), FALSE);
- return (!evc->priv->vcard && evc->priv->attributes);
-}
+ g_return_val_if_fail (E_IS_VCARD (evc), FALSE);
+ return (!evc->priv->vcard && evc->priv->attributes);
+}
/**
* e_vcard_attribute_param_get_name:
diff --git a/calendar/libecal/e-cal-client.c b/calendar/libecal/e-cal-client.c
index 4b498e7..f56a770 100644
--- a/calendar/libecal/e-cal-client.c
+++ b/calendar/libecal/e-cal-client.c
@@ -924,9 +924,9 @@ copy_timezone (icaltimezone *ozone)
{
icaltimezone *zone = NULL;
const gchar *tzid;
-
+
tzid = icaltimezone_get_tzid (ozone);
-
+
if (g_strcmp0 (tzid, "UTC") != 0) {
icalcomponent *comp;
diff --git a/libebackend/e-data-server-module.c b/libebackend/e-data-server-module.c
index f4a4934..ee39644 100644
--- a/libebackend/e-data-server-module.c
+++ b/libebackend/e-data-server-module.c
@@ -42,14 +42,27 @@
#include "libedataserver/libedataserver-private.h"
-#define E_DATA_SERVER_TYPE_MODULE (e_data_server_module_get_type ())
-#define E_DATA_SERVER_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_DATA_SERVER_TYPE_MODULE, EDataServerModule))
-#define E_DATA_SERVER_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_DATA_SERVER_TYPE_MODULE, EDataServerModule))
-#define E_DATA_SERVER_IS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_DATA_SERVER_TYPE_MODULE))
-#define E_DATA_SERVER_IS_MODULE_CLASS(klass) (G_TYPE_CLASS_CHECK_CLASS_TYPE ((klass), E_DATA_SERVER_TYPE_MODULE))
-
-typedef struct _EDataServerModule EDataServerModule;
-typedef struct _EDataServerModuleClass EDataServerModuleClass;
+/* Standard GObject macros */
+#define E_DATA_SERVER_TYPE_MODULE \
+ (e_data_server_module_get_type ())
+#define E_DATA_SERVER_MODULE(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_DATA_SERVER_TYPE_MODULE, EDataServerModule))
+#define E_DATA_SERVER_MODULE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_DATA_SERVER_TYPE_MODULE, EDataServerModuleClass))
+#define E_DATA_SERVER_IS_MODULE(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_DATA_SERVER_TYPE_MODULE))
+#define E_DATA_SERVER_IS_MODULE_CLASS(cls) \
+ (G_TYPE_CLASS_CHECK_CLASS_TYPE \
+ ((cls), E_DATA_SERVER_TYPE_MODULE))
+#define E_DATA_SERVER_MODULE_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_DATA_SERVER_TYPE_MODULE, EDataServerModuleClass))
+
+typedef struct _EDataServerModule EDataServerModule;
+typedef struct _EDataServerModuleClass EDataServerModuleClass;
struct _EDataServerModule {
GTypeModule parent;
diff --git a/libebackend/e-file-cache.c b/libebackend/e-file-cache.c
index 93def7f..beaaca2 100644
--- a/libebackend/e-file-cache.c
+++ b/libebackend/e-file-cache.c
@@ -54,7 +54,10 @@ enum {
G_DEFINE_TYPE (EFileCache, e_file_cache, G_TYPE_OBJECT)
static void
-e_file_cache_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+e_file_cache_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
EFileCache *cache;
EFileCachePrivate *priv;
@@ -89,8 +92,9 @@ e_file_cache_set_property (GObject *object, guint property_id, const GValue *val
g_unlink (g_value_get_string (value));
priv->xml_hash = e_xmlhash_new (g_value_get_string (value));
if (priv->xml_hash) {
- g_message (G_STRLOC ": could not open not re-create cache file %s",
- g_value_get_string (value));
+ g_message (
+ "%s: could not re-create cache file %s",
+ G_STRFUNC, g_value_get_string (value));
}
}
break;
@@ -100,7 +104,10 @@ e_file_cache_set_property (GObject *object, guint property_id, const GValue *val
}
static void
-e_file_cache_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+e_file_cache_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
EFileCache *cache;
EFileCachePrivate *priv;
@@ -145,11 +152,11 @@ e_file_cache_finalize (GObject *object)
}
static void
-e_file_cache_class_init (EFileCacheClass *klass)
+e_file_cache_class_init (EFileCacheClass *class)
{
GObjectClass *object_class;
- object_class = G_OBJECT_CLASS (klass);
+ object_class = G_OBJECT_CLASS (class);
object_class->finalize = e_file_cache_finalize;
object_class->set_property = e_file_cache_set_property;
object_class->get_property = e_file_cache_get_property;
@@ -159,10 +166,16 @@ e_file_cache_class_init (EFileCacheClass *klass)
*
* The filename of the cache.
**/
- g_object_class_install_property (object_class, PROP_FILENAME,
- g_param_spec_string ("filename", NULL, NULL, "",
- G_PARAM_READABLE | G_PARAM_WRITABLE
- | G_PARAM_CONSTRUCT_ONLY));
+ g_object_class_install_property (
+ object_class, PROP_FILENAME,
+ g_param_spec_string (
+ "filename",
+ NULL,
+ NULL,
+ "",
+ G_PARAM_READABLE |
+ G_PARAM_WRITABLE |
+ G_PARAM_CONSTRUCT_ONLY));
}
static void
diff --git a/libebackend/e-offline-listener.c b/libebackend/e-offline-listener.c
index 2f5064f..213fde5 100644
--- a/libebackend/e-offline-listener.c
+++ b/libebackend/e-offline-listener.c
@@ -98,12 +98,22 @@ setup_offline_listener (EOfflineListener *eol)
EOfflineListenerPrivate *priv = eol->priv;
priv->default_client = gconf_client_get_default ();
- gconf_client_add_dir (priv->default_client, "/apps/evolution/shell", GCONF_CLIENT_PRELOAD_RECURSIVE,NULL);
- gconf_client_notify_add (priv->default_client, "/apps/evolution/shell/start_offline",
- (GConfClientNotifyFunc) online_status_changed,
- eol, NULL, NULL);
- priv->is_offline_now = gconf_client_get_bool (priv->default_client, "/apps/evolution/shell/start_offline", NULL);
+ gconf_client_add_dir (
+ priv->default_client,
+ "/apps/evolution/shell",
+ GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
+
+ gconf_client_notify_add (
+ priv->default_client,
+ "/apps/evolution/shell/start_offline",
+ (GConfClientNotifyFunc) online_status_changed,
+ eol, NULL, NULL);
+
+ priv->is_offline_now = gconf_client_get_bool (
+ priv->default_client,
+ "/apps/evolution/shell/start_offline", NULL);
+
set_online_status (eol, priv->is_offline_now);
}
diff --git a/libedataserverui/e-client-utils.c b/libedataserverui/e-client-utils.c
index 6df1d22..6d0a619 100644
--- a/libedataserverui/e-client-utils.c
+++ b/libedataserverui/e-client-utils.c
@@ -829,7 +829,7 @@ e_client_utils_forget_password (EClient *client)
source = e_client_get_source (client);
g_return_if_fail (source != NULL);
-
+
auth_domain = get_auth_domain (client);
prompt_key = get_prompt_key (client, e_source_get_property (source, "username"));
diff --git a/libedataserverui/e-contact-store.c b/libedataserverui/e-contact-store.c
index e98d690..d248350 100644
--- a/libedataserverui/e-contact-store.c
+++ b/libedataserverui/e-contact-store.c
@@ -810,7 +810,7 @@ client_view_ready_cb (GObject *source_object, GAsyncResult *result, gpointer use
ContactSource *source;
source = &g_array_index (contact_store->priv->contact_sources, ContactSource, source_idx);
-
+
if (source->client_view) {
if (source->client_view_pending) {
stop_view (contact_store, source->client_view_pending);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]