diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-07-19 02:07:42 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-07-19 02:07:42 +0800 |
commit | fa360fde289f9b850191f89059d1a5e6d67c07c7 (patch) | |
tree | d1d8a43364d21daf94d5b9ac1f352faffd03dcd2 /addressbook | |
parent | becd78e26ed61ff386d0b229f85bdcf590c28e94 (diff) | |
download | gsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.tar gsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.tar.gz gsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.tar.bz2 gsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.tar.lz gsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.tar.xz gsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.tar.zst gsoc2013-evolution-fa360fde289f9b850191f89059d1a5e6d67c07c7.zip |
More whitespace cleanup.
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/conduit/address-conduit.c | 34 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor-fullname.c | 2 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 10 | ||||
-rw-r--r-- | addressbook/gui/merging/eab-contact-compare.c | 10 | ||||
-rw-r--r-- | addressbook/gui/merging/eab-contact-merging.c | 24 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-model.c | 2 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-reflow-adapter.c | 2 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 4 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard-label.c | 4 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard-view-widget.c | 2 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard-view.c | 4 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 10 | ||||
-rw-r--r-- | addressbook/gui/widgets/ea-minicard-view.c | 10 | ||||
-rw-r--r-- | addressbook/gui/widgets/ea-minicard.c | 10 | ||||
-rw-r--r-- | addressbook/importers/evolution-csv-importer.c | 62 | ||||
-rw-r--r-- | addressbook/importers/evolution-ldif-importer.c | 4 |
16 files changed, 97 insertions, 97 deletions
diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index d7b97233e3..67bba341e7 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -172,18 +172,18 @@ e_pilot_add_category_if_possible(gchar *cat_to_add, struct CategoryAppInfo *cate gint retval = 0; /* 0 is the Unfiled category */ LOG(g_message("e_pilot_add_category_if_possible\n")); - for(i=0; i<PILOT_MAX_CATEGORIES; i++){ + for (i=0; i<PILOT_MAX_CATEGORIES; i++) { /* if strlen is 0, then the category is empty the PalmOS doesn't let 0-length strings for categories */ - if(strlen(category->name[i]) == 0){ + if (strlen(category->name[i]) == 0) { gint cat_to_add_len; gint desktopUniqueID; cat_to_add_len = strlen(cat_to_add); retval = i; - if(cat_to_add_len > 15){ + if (cat_to_add_len > 15) { gchar tmpstr[16]; strncpy(tmpstr, cat_to_add,16); tmpstr[16] = '\0'; @@ -197,11 +197,11 @@ e_pilot_add_category_if_possible(gchar *cat_to_add, struct CategoryAppInfo *cate * '\0' can't do direct mem transfer due to * declaration type */ - for(j=0; j<cat_to_add_len; j++){ + for (j=0; j<cat_to_add_len; j++) { category->name[i][j] = cat_to_add[j]; } - for(j=cat_to_add_len; j<16; j++) { + for (j=cat_to_add_len; j<16; j++) { category->name[i][j] = '\0'; } @@ -213,7 +213,7 @@ e_pilot_add_category_if_possible(gchar *cat_to_add, struct CategoryAppInfo *cate */ for (desktopUniqueID = 128; desktopUniqueID <= 255; desktopUniqueID++) { gint found = 0; - for(j=0; j<PILOT_MAX_CATEGORIES; j++){ + for (j=0; j<PILOT_MAX_CATEGORIES; j++) { if (category->ID[j] == desktopUniqueID) { found = 1; } @@ -233,7 +233,7 @@ e_pilot_add_category_if_possible(gchar *cat_to_add, struct CategoryAppInfo *cate } } - if(retval == 0){ + if (retval == 0) { LOG (g_warning ("*** not adding category - category list already full ***")); } @@ -263,7 +263,7 @@ void e_pilot_local_category_to_remote(gint * pilotCategory, first_category = e_pilot_utf8_to_pchar((const gchar *)c_list->data); } l = c_list; - while(l && *pilotCategory == 0) { + while (l && *pilotCategory == 0) { /* list != 0, so at least 1 category is assigned */ category_string = e_pilot_utf8_to_pchar((const gchar *)l->data); for (i=0; i < PILOT_MAX_CATEGORIES; i++) { @@ -307,7 +307,7 @@ void e_pilot_remote_category_to_local(gint pilotCategory, LOG(g_message("PDA Category: %s\n", category_string)); - if(e_categories_exist(category_string) == FALSE){ + if (e_categories_exist(category_string) == FALSE) { /* add if it doesn't exist */ LOG(g_message("Category created on pc\n")); e_categories_add(category_string, NULL, NULL, TRUE); @@ -329,7 +329,7 @@ void e_pilot_remote_category_to_local(gint pilotCategory, /* remove old item from list so we don't have duplicate entries */ newcat_in_list = g_list_find_custom(c_list, category_string, (GCompareFunc)strcmp); - if(newcat_in_list != NULL) + if (newcat_in_list != NULL) { g_free(newcat_in_list->data); c_list = g_list_remove(c_list, newcat_in_list->data); @@ -756,11 +756,11 @@ static gchar *print_remote (GnomePilotRecord *remote) memset (&addr, 0, sizeof (struct Address)); #ifdef PILOT_LINK_0_12 buffer = pi_buffer_new(DLP_BUF_SIZE); - if(buffer == NULL){ + if (buffer == NULL) { sprintf (buff, "[NULL]"); return buff; } - if(pi_buffer_append(buffer, remote->record, remote->length)==NULL){ + if (pi_buffer_append(buffer, remote->record, remote->length)==NULL) { sprintf (buff, "[NULL]"); return buff; } @@ -1112,7 +1112,7 @@ local_record_to_pilot_record (EAddrLocalRecord *local, #ifdef PILOT_LINK_0_12 buffer = pi_buffer_new(DLP_BUF_SIZE); - if(buffer == NULL){ + if (buffer == NULL) { pi_set_error(ctxt->dbi->pilot_socket, PI_ERR_GENERIC_MEMORY); return p; } @@ -1159,7 +1159,7 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui #ifdef PILOT_LINK_0_12 pi_buffer_t * record; record = pi_buffer_new(DLP_BUF_SIZE); - if(record == NULL){ + if (record == NULL) { pi_set_error(ctxt->dbi->pilot_socket, PI_ERR_GENERIC_MEMORY); return; } @@ -1371,12 +1371,12 @@ ecard_from_remote_record(EAddrConduitContext *ctxt, memset (&address, 0, sizeof (struct Address)); #ifdef PILOT_LINK_0_12 buffer = pi_buffer_new(DLP_BUF_SIZE); - if(buffer == NULL){ + if (buffer == NULL) { pi_set_error(ctxt->dbi->pilot_socket, PI_ERR_GENERIC_MEMORY); return NULL; } - if(pi_buffer_append(buffer, remote->record, remote->length)==NULL){ + if (pi_buffer_append(buffer, remote->record, remote->length)==NULL) { pi_set_error(ctxt->dbi->pilot_socket, PI_ERR_GENERIC_MEMORY); return NULL; } @@ -1676,7 +1676,7 @@ pre_sync (GnomePilotConduit *conduit, #ifdef PILOT_LINK_0_12 buffer = pi_buffer_new(DLP_BUF_SIZE); - if(buffer == NULL){ + if (buffer == NULL) { return pi_set_error(dbi->pilot_socket, PI_ERR_GENERIC_MEMORY); } diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c index 5040b96570..2ffe6fcc4a 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c @@ -176,7 +176,7 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id, e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object); - switch (prop_id){ + switch (prop_id) { case PROP_NAME: e_contact_name_free(e_contact_editor_fullname->name); diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 1d1d16c55b..00a89e32db 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -396,7 +396,7 @@ style_makes_sense (const EContactName *name, const gchar *company, gint style) case 1: return TRUE; case 2: - if(name) { + if (name) { if (name->additional && *name->additional) return TRUE; else @@ -450,7 +450,7 @@ name_to_style (const EContactName *name, const gchar *company, gint style) break; case 2: midstrptr=midstring; - if(name){ + if (name) { if (name->family && *name->family) *(midstrptr++) = name->family; if (name->given && *name->given) @@ -2347,7 +2347,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) prompt_response = e_error_run (GTK_WINDOW (editor->app), "addressbook:prompt-resize", NULL); - if (prompt_response == GTK_RESPONSE_YES){ + if (prompt_response == GTK_RESPONSE_YES) { if ( width > height) { height = height * 96 / width; width = 96; @@ -2764,7 +2764,7 @@ categories_clicked (GtkWidget *button, EContactEditor *editor) else if (editor->contact) categories = e_contact_get (editor->contact, E_CONTACT_CATEGORIES); - if (editor->categories_dialog != NULL){ + if (editor->categories_dialog != NULL) { gtk_window_present (GTK_WINDOW(editor->categories_dialog)); g_free (categories); return; @@ -3594,7 +3594,7 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val editor = E_CONTACT_EDITOR (object); - switch (prop_id){ + switch (prop_id) { case PROP_SOURCE_BOOK: { gboolean writable; gboolean changed = FALSE; diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c index 010b0dcdba..86ed4e9de6 100644 --- a/addressbook/gui/merging/eab-contact-compare.c +++ b/addressbook/gui/merging/eab-contact-compare.c @@ -86,7 +86,7 @@ name_fragment_match_with_synonyms (const gchar *a, const gchar *b, gboolean stri if (!(a && b && *a && *b)) return FALSE; - if(!e_utf8_casefold_collate (a, b)) + if (!e_utf8_casefold_collate (a, b)) return TRUE; /* Check for nicknames. Yes, the linear search blows. */ @@ -425,7 +425,7 @@ match_email_hostname (const gchar *addr1, const gchar *addr2) --addr1; --addr2; } - if((*addr1 == '@' && *addr2 != '@' ) || (*addr2 == '@' && *addr1 != '@')) + if ((*addr1 == '@' && *addr2 != '@' ) || (*addr2 == '@' && *addr1 != '@')) return FALSE; return TRUE; @@ -526,10 +526,10 @@ eab_contact_compare (EContact *contact1, EContact *contact2) g_return_val_if_fail (contact2 && E_IS_CONTACT (contact2), EAB_CONTACT_MATCH_NOT_APPLICABLE); result = EAB_CONTACT_MATCH_NONE; - if(!e_contact_get (contact1, E_CONTACT_IS_LIST)){ + if (!e_contact_get (contact1, E_CONTACT_IS_LIST)) { result = combine_comparisons (result, eab_contact_compare_name (contact1, contact2)); result = combine_comparisons (result, eab_contact_compare_nickname (contact1, contact2)); - if(!e_contact_get (contact2, E_CONTACT_IS_LIST)) + if (!e_contact_get (contact2, E_CONTACT_IS_LIST)) result = combine_comparisons (result, eab_contact_compare_email (contact1, contact2)); result = combine_comparisons (result, eab_contact_compare_address (contact1, contact2)); result = combine_comparisons (result, eab_contact_compare_telephone (contact1, contact2)); @@ -691,7 +691,7 @@ use_common_book_cb (EBook *book, gpointer closure) /* Build up our full query from the parts. */ query_parts[p] = NULL; qj = g_strjoinv (" ", query_parts); - for(i = 0; query_parts[i] != NULL; i++) + for (i = 0; query_parts[i] != NULL; i++) g_free(query_parts[i]); if (p > 1) { gchar *s; diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c index 78f179c176..b927918d22 100644 --- a/addressbook/gui/merging/eab-contact-merging.c +++ b/addressbook/gui/merging/eab-contact-merging.c @@ -102,7 +102,7 @@ free_lookup (EContactMergingLookup *lookup) g_object_unref (lookup->book); g_object_unref (lookup->contact); g_list_free (lookup->avoid); - if(lookup->match) + if (lookup->match) g_object_unref (lookup->match); g_free (lookup); } @@ -217,7 +217,7 @@ mergeit (EContactMergingLookup *lookup) num_of_email = g_list_length (email_attr_list); /*we match all the string fields of the already existing contact and the new contact.*/ - for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1); field++) { + for (field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1); field++) { dropdown_data *data = NULL; string = (gchar *)e_contact_get_const (lookup->contact, field); string1 = (gchar *)e_contact_get_const (lookup->match, field); @@ -230,14 +230,14 @@ mergeit (EContactMergingLookup *lookup) || field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email < 4)) { row++; str = (gchar *)e_contact_get_const (lookup->contact, field); - switch(num_of_email) + switch (num_of_email) { case 0: field = E_CONTACT_EMAIL_1; break; case 1: /*New contact has email that is NOT equal to email in duplicate contact*/ - if((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str))) { + if ((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str))) { field = E_CONTACT_EMAIL_2; break; } @@ -245,7 +245,7 @@ mergeit (EContactMergingLookup *lookup) continue; case 2: /*New contact has email and it is equal to neither of the 2 emails in the duplicate contact*/ - if((str && *str) && + if ((str && *str) && (g_ascii_strcasecmp(str,e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1))) && (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str))) { field = E_CONTACT_EMAIL_3; @@ -255,7 +255,7 @@ mergeit (EContactMergingLookup *lookup) continue; case 3: /*New contact has email and it is equal to none of the 3 emails in the duplicate contact*/ - if((str && *str) && + if ((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str)) && (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str)) && (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_3),str))) @@ -302,7 +302,7 @@ mergeit (EContactMergingLookup *lookup) } /*for all string fields except name and email*/ - if(!(string1 && *string1) || (g_ascii_strcasecmp(string, string1))) { + if (!(string1 && *string1) || (g_ascii_strcasecmp(string, string1))) { row++; label = gtk_label_new (e_contact_pretty_name(field)); hbox = gtk_hbox_new (FALSE, 0); @@ -368,26 +368,26 @@ check_if_same (EContact *contact, EContact *match) gint num_of_email; gchar *str = NULL, *string = NULL, *string1 = NULL; - for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1); field++) { + for (field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1); field++) { email_attr_list = e_contact_get_attributes (match, E_CONTACT_EMAIL); num_of_email = g_list_length (email_attr_list); if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2 || field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email<4)) { str = (gchar *)e_contact_get_const (contact, field); - switch(num_of_email) + switch (num_of_email) { case 0: return FALSE; case 1: - if((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str))) + if ((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str))) return FALSE; case 2: - if((str && *str) && (g_ascii_strcasecmp(str,e_contact_get_const (match, E_CONTACT_EMAIL_1))) && + if ((str && *str) && (g_ascii_strcasecmp(str,e_contact_get_const (match, E_CONTACT_EMAIL_1))) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_2),str))) return FALSE; case 3: - if((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)) && + if ((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_2),str)) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_3),str))) return FALSE; diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index 7ae371d411..71de495f13 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -391,7 +391,7 @@ addressbook_model_set_property (GObject *object, const GValue *value, GParamSpec *pspec) { - switch (property_id){ + switch (property_id) { case PROP_BOOK: e_addressbook_model_set_book ( E_ADDRESSBOOK_MODEL (object), diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c index e562d9989f..500b045077 100644 --- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c @@ -148,7 +148,7 @@ addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent) height = text_height (layout, string ? string : "") + 10.0; g_free(string); - for(field = E_CONTACT_FULL_NAME; field != E_CONTACT_LAST_SIMPLE_STRING && count < 5; field++) { + for (field = E_CONTACT_FULL_NAME; field != E_CONTACT_LAST_SIMPLE_STRING && count < 5; field++) { if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME) continue; diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index ae79ead397..601e7f9546 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -491,7 +491,7 @@ addressbook_view_set_property (GObject *object, const GValue *value, GParamSpec *pspec) { - switch (property_id){ + switch (property_id) { case PROP_SHELL_VIEW: addressbook_view_set_shell_view ( E_ADDRESSBOOK_VIEW (object), @@ -1095,7 +1095,7 @@ e_addressbook_view_print (EAddressbookView *view, static void delete_contacts_cb (EBook *book, EBookStatus status, gpointer closure) { - switch(status) { + switch (status) { case E_BOOK_ERROR_OK : case E_BOOK_ERROR_CANCELLED : break; diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c index 414b760e1e..074bf9f8e3 100644 --- a/addressbook/gui/widgets/e-minicard-label.c +++ b/addressbook/gui/widgets/e-minicard-label.c @@ -205,7 +205,7 @@ e_minicard_label_set_property (GObject *object, guint prop_id, const GValue *va e_minicard_label = E_MINICARD_LABEL (object); item = GNOME_CANVAS_ITEM (object); - switch (prop_id){ + switch (prop_id) { case PROP_WIDTH: e_minicard_label->width = g_value_get_double (value); e_minicard_label_resize_children(e_minicard_label); @@ -347,7 +347,7 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event) e_minicard_label = E_MINICARD_LABEL (item); - switch( event->type ) { + switch ( event->type ) { case GDK_KEY_PRESS: if (event->key.keyval == GDK_Escape) { GnomeCanvasItem *parent; diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c index 5030793938..cb3904728e 100644 --- a/addressbook/gui/widgets/e-minicard-view-widget.c +++ b/addressbook/gui/widgets/e-minicard-view-widget.c @@ -220,7 +220,7 @@ e_minicard_view_widget_set_property (GObject *object, emvw = E_MINICARD_VIEW_WIDGET (object); - switch (prop_id){ + switch (prop_id) { case PROP_BOOK: if (emvw->book) g_object_unref (emvw->book); diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c index d849d9fe47..80d7291113 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/e-minicard-view.c @@ -228,7 +228,7 @@ e_minicard_view_set_property (GObject *object, view = E_MINICARD_VIEW (object); - switch (prop_id){ + switch (prop_id) { case PROP_ADAPTER: if (view->adapter) { if (view->writable_status_id || view->stop_state_id) { @@ -378,7 +378,7 @@ e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event) view = E_MINICARD_VIEW (item); - switch( event->type ) { + switch ( event->type ) { case GDK_2BUTTON_PRESS: if (((GdkEventButton *)event)->button == 1) { gboolean editable; diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index b47acd0938..1f6bc14117 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -311,7 +311,7 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G item = GNOME_CANVAS_ITEM (object); e_minicard = E_MINICARD (object); - switch (prop_id){ + switch (prop_id) { case PROP_WIDTH: if (e_minicard->width != g_value_get_double (value)) { e_minicard->width = g_value_get_double (value); @@ -548,7 +548,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) e_minicard = E_MINICARD (item); - switch( event->type ) { + switch ( event->type ) { case GDK_FOCUS_CHANGE: { GdkEventFocus *focus_event = (GdkEventFocus *) event; @@ -882,7 +882,7 @@ get_left_width (EMinicard *e_minicard, gboolean is_list) return 0; layout = gtk_widget_create_pango_layout (GTK_WIDGET (GNOME_CANVAS_ITEM (e_minicard)->canvas), ""); - for(field = E_CONTACT_FULL_NAME; field != E_CONTACT_LAST_SIMPLE_STRING; field++) { + for (field = E_CONTACT_FULL_NAME; field != E_CONTACT_LAST_SIMPLE_STRING; field++) { gint this_width; if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME) @@ -932,7 +932,7 @@ remodel( EMinicard *e_minicard ) list = e_minicard->fields; e_minicard->fields = NULL; - for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) && count < 5; field++) { + for (field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) && count < 5; field++) { EMinicardField *minicard_field = NULL; gboolean is_email=FALSE; @@ -1022,7 +1022,7 @@ e_minicard_reflow(GnomeCanvasItem *item, gint flags) "y2", text_height + 9.0, NULL); - for(list = e_minicard->fields; list; list = g_list_next(list)) { + for (list = e_minicard->fields; list; list = g_list_next(list)) { EMinicardField *field = E_MINICARD_FIELD(list->data); /* Why not use the item that is passed in? */ GnomeCanvasItem *item = field->label; diff --git a/addressbook/gui/widgets/ea-minicard-view.c b/addressbook/gui/widgets/ea-minicard-view.c index 07d76c3a77..ffccbfa1d1 100644 --- a/addressbook/gui/widgets/ea-minicard-view.c +++ b/addressbook/gui/widgets/ea-minicard-view.c @@ -217,11 +217,11 @@ static AtkStateSet *ea_minicard_view_ref_state_set (AtkObject *obj) GObject *gobj = NULL; state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (obj); - if( !state_set ) + if ( !state_set ) state_set = atk_state_set_new (); gobj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (obj)); - if( !gobj ) + if ( !gobj ) return state_set; atk_state_set_add_state (state_set, ATK_STATE_ENABLED); @@ -303,7 +303,7 @@ selection_interface_clear_selection (AtkSelection *selection) atk_gobj = ATK_GOBJECT_ACCESSIBLE (selection); reflow = E_REFLOW(atk_gobject_accessible_get_object (atk_gobj)); - if( !reflow ) + if ( !reflow ) return FALSE; e_selection_model_clear (reflow->selection); @@ -341,7 +341,7 @@ selection_interface_is_child_selected (AtkSelection *selection, gint i) atk_gobj = ATK_GOBJECT_ACCESSIBLE (selection); reflow = E_REFLOW(atk_gobject_accessible_get_object (atk_gobj)); - if( !reflow ) + if ( !reflow ) return FALSE; return e_selection_model_is_row_selected (reflow->selection, i); @@ -404,7 +404,7 @@ atk_action_interface_get_description (AtkAction *iface, gint i) static G_CONST_RETURN gchar * atk_action_interface_get_name (AtkAction *iface, gint i) { - if( i >= G_N_ELEMENTS (action_name) || i < 0) + if ( i >= G_N_ELEMENTS (action_name) || i < 0) return NULL; return action_name[i]; diff --git a/addressbook/gui/widgets/ea-minicard.c b/addressbook/gui/widgets/ea-minicard.c index b1b1ebbe33..8791a68e73 100644 --- a/addressbook/gui/widgets/ea-minicard.c +++ b/addressbook/gui/widgets/ea-minicard.c @@ -191,11 +191,11 @@ static AtkStateSet *ea_minicard_ref_state_set (AtkObject *obj) GObject *gobj = NULL; state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (obj); - if( !state_set ) + if ( !state_set ) state_set = atk_state_set_new (); gobj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (obj)); - if( !gobj ) + if ( !gobj ) return state_set; atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE); @@ -233,10 +233,10 @@ static gboolean atk_action_interface_do_action (AtkAction *iface, gint i) EMinicard *minicard = NULL; minicard = E_MINICARD (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (iface))); - if( minicard == NULL ) + if ( minicard == NULL ) return FALSE; - if( i >= G_N_ELEMENTS (action_name) || i < 0 ) + if ( i >= G_N_ELEMENTS (action_name) || i < 0 ) return FALSE; switch (i) { @@ -265,7 +265,7 @@ atk_action_interface_get_description (AtkAction *iface, gint i) static G_CONST_RETURN gchar * atk_action_interface_get_name (AtkAction *iface, gint i) { - if( i >= G_N_ELEMENTS (action_name) || i < 0) + if ( i >= G_N_ELEMENTS (action_name) || i < 0) return NULL; return action_name[i]; diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c index 6f88bb9cbd..231d799957 100644 --- a/addressbook/importers/evolution-csv-importer.c +++ b/addressbook/importers/evolution-csv-importer.c @@ -283,7 +283,7 @@ add_to_notes(EContact *contact, gint i, gchar *val) { return; new_text = g_string_new(old_text); - if(strlen(new_text->str) != 0) + if (strlen(new_text->str) != 0) new_text = g_string_append_c(new_text, '\n'); new_text = g_string_append(new_text, field_text); new_text = g_string_append_c(new_text, ':'); @@ -357,12 +357,12 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) { ptr = do_free; } - while(*ptr != '\n') { + while (*ptr != '\n') { value = g_string_new(""); - while(*ptr != delimiter) { - if(*ptr == '\n') + while (*ptr != delimiter) { + if (*ptr == '\n') break; - if(*ptr != '"') { + if (*ptr != '"') { g_string_append_unichar (value, g_utf8_get_char (ptr)); } else { @@ -381,13 +381,13 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) { contact_field = NOMAP; flags = FLAG_INVALID; - if(importer == OUTLOOK_IMPORTER) { + if (importer == OUTLOOK_IMPORTER) { if (i >= 0 && i < G_N_ELEMENTS (csv_fields_outlook)) { contact_field = csv_fields_outlook[i].contact_field; flags = csv_fields_outlook[i].flags; } } - else if(importer == MOZILLA_IMPORTER) { + else if (importer == MOZILLA_IMPORTER) { if (i >= 0 && i < G_N_ELEMENTS (csv_fields_mozilla)) { contact_field = csv_fields_mozilla[i].contact_field; flags = csv_fields_mozilla[i].flags; @@ -400,12 +400,12 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) { } } - if(strlen(value->str) != 0) { + if (strlen(value->str) != 0) { if (contact_field != NOMAP) { - if(importer == OUTLOOK_IMPORTER) { + if (importer == OUTLOOK_IMPORTER) { if (i >= 0 && i < G_N_ELEMENTS (csv_fields_outlook)) e_contact_set (contact, csv_fields_outlook[i].contact_field, value->str); - } else if(importer == MOZILLA_IMPORTER) { + } else if (importer == MOZILLA_IMPORTER) { if (i >= 0 && i < G_N_ELEMENTS (csv_fields_mozilla)) e_contact_set (contact, csv_fields_mozilla[i].contact_field, value->str); } else { @@ -421,7 +421,7 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) { switch (flags) { case FLAG_HOME_ADDRESS|FLAG_STREET: - if(strlen(home_street->str) != 0) { + if (strlen(home_street->str) != 0) { home_street = g_string_append(home_street, ",\n"); } home_street = g_string_append(home_street, value->str); @@ -443,7 +443,7 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) { break; case FLAG_WORK_ADDRESS|FLAG_STREET: - if(strlen(work_street->str) != 0) { + if (strlen(work_street->str) != 0) { work_street = g_string_append(work_street, ",\n"); } work_street = g_string_append(work_street, value->str); @@ -465,7 +465,7 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) { break; case FLAG_OTHER_ADDRESS|FLAG_STREET: - if(strlen(other_street->str) != 0) { + if (strlen(other_street->str) != 0) { other_street = g_string_append(other_street, ",\n"); } other_street = g_string_append(other_street, value->str); @@ -515,30 +515,30 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) { } i++; g_string_free(value, TRUE); - if(*ptr != '\n') + if (*ptr != '\n') ptr = g_utf8_next_char (ptr); } - if(strlen(home_street->str) != 0) + if (strlen(home_street->str) != 0) home_address->street = g_strdup(home_street->str); - if(strlen(work_street->str) != 0) + if (strlen(work_street->str) != 0) work_address->street = g_strdup(work_street->str); - if(strlen(other_street->str) != 0) + if (strlen(other_street->str) != 0) other_address->street = g_strdup(other_street->str); g_string_free(home_street, TRUE); g_string_free(work_street, TRUE); g_string_free(other_street, TRUE); - if(home_address->locality || home_address->country || + if (home_address->locality || home_address->country || home_address->code || home_address->region || home_address->street) e_contact_set (contact, E_CONTACT_ADDRESS_HOME, home_address); - if(work_address->locality || work_address->country || + if (work_address->locality || work_address->country || work_address->code || work_address->region || work_address->street) e_contact_set (contact, E_CONTACT_ADDRESS_WORK, work_address); - if(other_address->locality || other_address->country || + if (other_address->locality || other_address->country || other_address->code || other_address->region || other_address->street) e_contact_set (contact, E_CONTACT_ADDRESS_OTHER, other_address); - if(importer != OUTLOOK_IMPORTER) { + if (importer != OUTLOOK_IMPORTER) { if (bday->day || bday->year || bday->month) e_contact_set(contact, E_CONTACT_BIRTH_DATE, bday); } @@ -557,11 +557,11 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) { gchar c; /* - if(!fgets(line, sizeof(line),f)) + if (!fgets(line, sizeof(line),f)) return NULL; - if(gci->count == 0 && importer != MOZILLA_IMPORTER) { - if(!fgets(line, sizeof(line),f)) + if (gci->count == 0 && importer != MOZILLA_IMPORTER) { + if (!fgets(line, sizeof(line),f)) return NULL; gci->count ++; } @@ -589,7 +589,7 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) { g_string_append_c (line, c); } - if(gci->count == 0 && importer != MOZILLA_IMPORTER) { + if (gci->count == 0 && importer != MOZILLA_IMPORTER) { g_string_free (line, TRUE); line = g_string_new(""); while (1) { @@ -620,7 +620,7 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) { g_string_free (line, TRUE); - if(strlen(str->str) == 0) { + if (strlen(str->str) == 0) { g_string_free(str, TRUE); return NULL; } @@ -629,7 +629,7 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) { buf = str->str; - if(!parseLine (gci, contact, buf)) { + if (!parseLine (gci, contact, buf)) { g_object_unref(contact); return NULL; } @@ -649,10 +649,10 @@ csv_import_contacts(gpointer d) { e_book_add_contact(gci->book, contact, NULL); gci->contacts = g_slist_prepend(gci->contacts, contact); } - if(contact == NULL) { + if (contact == NULL) { gci->state = 1; } - if(gci->state == 1) { + if (gci->state == 1) { csv_import_done(gci); return FALSE; } @@ -769,7 +769,7 @@ csv_import (EImport *ei, EImportTarget *target, EImportImporter *im) EImportTargetURI *s = (EImportTargetURI *) target; book = e_book_new(g_datalist_get_data(&target->data, "csv-source"), NULL); - if(book == NULL) { + if (book == NULL) { g_message("Couldn't Create EBook"); e_import_complete(ei, target); return; @@ -824,7 +824,7 @@ static void csv_cancel(EImport *ei, EImportTarget *target, EImportImporter *im) { CSVImporter *gci = g_datalist_get_data(&target->data, "csv-data"); - if(gci) + if (gci) gci->state = 1; } diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c index 2c8b24cac5..efc4a2bf71 100644 --- a/addressbook/importers/evolution-ldif-importer.c +++ b/addressbook/importers/evolution-ldif-importer.c @@ -137,7 +137,7 @@ getValue( gchar **src ) gboolean need_base64 = (*s == ':'); copy_line: - while( *s != 0 && *s != '\n' && *s != '\r' ) + while ( *s != 0 && *s != '\n' && *s != '\r' ) dest = g_string_append_c (dest, *s++); if (*s == '\r') s++; @@ -250,7 +250,7 @@ parseLine (LDIFImporter *gci, EContact *contact, } /* first, check for a 'continuation' line */ - if( ptr[0] == ' ' && ptr[1] != '\n' ) { + if ( ptr[0] == ' ' && ptr[1] != '\n' ) { g_warning ("unexpected continuation line"); return FALSE; } |