diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-07-19 02:05:05 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-07-19 02:05:38 +0800 |
commit | dcf2c0e754d6e251733cea74c2427738122620af (patch) | |
tree | 358d2c639c2a5b5cf5fc8f28c515076f8b4d4e5d /addressbook/gui | |
parent | 76fc1247ba88575c0f6e0040672e19e66f53da4f (diff) | |
download | gsoc2013-evolution-dcf2c0e754d6e251733cea74c2427738122620af.tar.gz gsoc2013-evolution-dcf2c0e754d6e251733cea74c2427738122620af.tar.zst gsoc2013-evolution-dcf2c0e754d6e251733cea74c2427738122620af.zip |
More whitespace cleanup.
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/component/addressbook-config.c | 2 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-view.c | 2 | ||||
-rw-r--r-- | addressbook/gui/component/openldap-extract.h | 98 | ||||
-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/eab-contact-display.c | 6 |
15 files changed, 91 insertions, 91 deletions
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index 850a9c6f06..248a9de9ea 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -1239,7 +1239,7 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source) target = eab_config_target_new_source(ec, sdialog->source); e_config_set_target((EConfig *)ec, (EConfigTarget *)target); - if(source) + if (source) sdialog->window = e_config_create_window((EConfig *)ec, NULL, _("Address Book Properties")); else sdialog->window = e_config_create_window((EConfig *)ec, NULL, _("New Address Book")); diff --git a/addressbook/gui/component/addressbook-view.c b/addressbook/gui/component/addressbook-view.c index e76c871287..6a66a94913 100644 --- a/addressbook/gui/component/addressbook-view.c +++ b/addressbook/gui/component/addressbook-view.c @@ -456,7 +456,7 @@ folder_can_delete (AddressbookView *view) const gchar *source_uri; source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector)); - if(source) { + if (source) { source_uri = e_source_peek_relative_uri (source); if (source_uri && !strcmp("system", source_uri)) return 0; diff --git a/addressbook/gui/component/openldap-extract.h b/addressbook/gui/component/openldap-extract.h index 2d8c34b242..29175fb494 100644 --- a/addressbook/gui/component/openldap-extract.h +++ b/addressbook/gui/component/openldap-extract.h @@ -742,8 +742,8 @@ ldap_str2objectclass( LDAP_CONST gchar * s, static gchar *ldap_utf8_strchr( const gchar *str, const gchar *chr ) { - for(; *str != '\0'; LDAP_UTF8_INCR(str) ) { - if( ldap_x_utf8_to_ucs4( str ) == ldap_x_utf8_to_ucs4( chr ) ) { + for (; *str != '\0'; LDAP_UTF8_INCR(str) ) { + if ( ldap_x_utf8_to_ucs4( str ) == ldap_x_utf8_to_ucs4( chr ) ) { return (gchar *) str; } } @@ -756,9 +756,9 @@ static gsize ldap_utf8_strcspn( const gchar *str, const gchar *set ) const gchar *cstr; const gchar *cset; - for( cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr) ) { - for( cset = set; *cset != '\0'; LDAP_UTF8_INCR(cset) ) { - if( ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset ) ) { + for ( cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr) ) { + for ( cset = set; *cset != '\0'; LDAP_UTF8_INCR(cset) ) { + if ( ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset ) ) { return cstr - str; } } @@ -772,13 +772,13 @@ static gsize ldap_utf8_strspn( const gchar *str, const gchar *set ) const gchar *cstr; const gchar *cset; - for( cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr) ) { - for( cset = set; ; LDAP_UTF8_INCR(cset) ) { - if( *cset == '\0' ) { + for ( cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr) ) { + for ( cset = set; ; LDAP_UTF8_INCR(cset) ) { + if ( *cset == '\0' ) { return cstr - str; } - if( ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset ) ) { + if ( ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset ) ) { break; } } @@ -792,20 +792,20 @@ static gchar *ldap_utf8_strtok(gchar *str, const gchar *sep, gchar **last) gchar *begin; gchar *end; - if( last == NULL ) return NULL; + if ( last == NULL ) return NULL; begin = str ? str : *last; begin += ldap_utf8_strspn( begin, sep ); - if( *begin == '\0' ) { + if ( *begin == '\0' ) { *last = NULL; return NULL; } end = &begin[ ldap_utf8_strcspn( begin, sep ) ]; - if( *end != '\0' ) { + if ( *end != '\0' ) { gchar *next = LDAP_UTF8_NEXT( end ); *end = '\0'; end = next; @@ -1023,7 +1023,7 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr ) /* protect the input string from strtok */ str = LDAP_STRDUP( str_in ); - if( str == NULL ) { + if ( str == NULL ) { return NULL; } @@ -1036,7 +1036,7 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr ) res = (gchar **) LDAP_MALLOC( (i + 1) * sizeof(gchar *) ); - if( res == NULL ) { + if ( res == NULL ) { LDAP_FREE( str ); return NULL; } @@ -1049,8 +1049,8 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr ) { res[i] = LDAP_STRDUP( s ); - if(res[i] == NULL) { - for( --i; i >= 0; i-- ) { + if (res[i] == NULL) { + for ( --i; i >= 0; i-- ) { LDAP_FREE( res[i] ); } LDAP_FREE( res ); @@ -1081,7 +1081,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) const gchar *url_tmp; gchar *url; - if( url_in == NULL || ludpp == NULL ) { + if ( url_in == NULL || ludpp == NULL ) { return LDAP_URL_ERR_PARAM; } @@ -1104,7 +1104,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) if ( enclosed ) { p = &url[strlen(url)-1]; - if( *p != '>' ) { + if ( *p != '>' ) { LDAP_FREE( url ); return LDAP_URL_ERR_BADENCLOSURE; } @@ -1141,7 +1141,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) /* scan forward for '/' that marks end of hostport and begin. of dn */ p = strchr( url, '/' ); - if( p != NULL ) { + if ( p != NULL ) { /* terminate hostport; point to start of dn */ *p++ = '\0'; } @@ -1166,7 +1166,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) *q++ = '\0'; ldap_pvt_hex_unescape( q ); - if( *q == '\0' ) { + if ( *q == '\0' ) { LDAP_FREE( url ); ldap_free_urldesc( ludp ); return LDAP_URL_ERR_BADURL; @@ -1185,7 +1185,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) /* If [ip address]:port syntax, url is [ip and we skip the [ */ ludp->lud_host = LDAP_STRDUP( url + ( *url == '[' ) ); - if( ludp->lud_host == NULL ) { + if ( ludp->lud_host == NULL ) { LDAP_FREE( url ); ldap_free_urldesc( ludp ); return LDAP_URL_ERR_MEM; @@ -1200,12 +1200,12 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) * but we need to account for it. Fortunately it can't be confused with * anything real. */ - if( (p == NULL) && (q != NULL) && ((q = strchr( q, '?')) != NULL)) { + if ( (p == NULL) && (q != NULL) && ((q = strchr( q, '?')) != NULL)) { q++; /* ? immediately followed by question */ - if( *q == '?') { + if ( *q == '?') { q++; - if( *q != '\0' ) { + if ( *q != '\0' ) { /* parse dn part */ ldap_pvt_hex_unescape( q ); ludp->lud_dn = LDAP_STRDUP( q ); @@ -1213,7 +1213,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) ludp->lud_dn = LDAP_STRDUP( "" ); } - if( ludp->lud_dn == NULL ) { + if ( ludp->lud_dn == NULL ) { LDAP_FREE( url ); ldap_free_urldesc( ludp ); return LDAP_URL_ERR_MEM; @@ -1221,7 +1221,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) } } - if( p == NULL ) { + if ( p == NULL ) { LDAP_FREE( url ); *ludpp = ludp; return LDAP_URL_SUCCESS; @@ -1230,12 +1230,12 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) /* scan forward for '?' that may marks end of dn */ q = strchr( p, '?' ); - if( q != NULL ) { + if ( q != NULL ) { /* terminate dn part */ *q++ = '\0'; } - if( *p != '\0' ) { + if ( *p != '\0' ) { /* parse dn part */ ldap_pvt_hex_unescape( p ); ludp->lud_dn = LDAP_STRDUP( p ); @@ -1243,13 +1243,13 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) ludp->lud_dn = LDAP_STRDUP( "" ); } - if( ludp->lud_dn == NULL ) { + if ( ludp->lud_dn == NULL ) { LDAP_FREE( url ); ldap_free_urldesc( ludp ); return LDAP_URL_ERR_MEM; } - if( q == NULL ) { + if ( q == NULL ) { /* no more */ LDAP_FREE( url ); *ludpp = ludp; @@ -1260,17 +1260,17 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) p = q; q = strchr( p, '?' ); - if( q != NULL ) { + if ( q != NULL ) { /* terminate attributes part */ *q++ = '\0'; } - if( *p != '\0' ) { + if ( *p != '\0' ) { /* parse attributes */ ldap_pvt_hex_unescape( p ); ludp->lud_attrs = ldap_str2charray( p, "," ); - if( ludp->lud_attrs == NULL ) { + if ( ludp->lud_attrs == NULL ) { LDAP_FREE( url ); ldap_free_urldesc( ludp ); return LDAP_URL_ERR_BADATTRS; @@ -1288,17 +1288,17 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) p = q; q = strchr( p, '?' ); - if( q != NULL ) { + if ( q != NULL ) { /* terminate the scope part */ *q++ = '\0'; } - if( *p != '\0' ) { + if ( *p != '\0' ) { /* parse the scope */ ldap_pvt_hex_unescape( p ); ludp->lud_scope = str2scope( p ); - if( ludp->lud_scope == -1 ) { + if ( ludp->lud_scope == -1 ) { LDAP_FREE( url ); ldap_free_urldesc( ludp ); return LDAP_URL_ERR_BADSCOPE; @@ -1316,16 +1316,16 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) p = q; q = strchr( p, '?' ); - if( q != NULL ) { + if ( q != NULL ) { /* terminate the filter part */ *q++ = '\0'; } - if( *p != '\0' ) { + if ( *p != '\0' ) { /* parse the filter */ ldap_pvt_hex_unescape( p ); - if( ! *p ) { + if ( ! *p ) { /* missing filter */ LDAP_FREE( url ); ldap_free_urldesc( ludp ); @@ -1335,7 +1335,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) LDAP_FREE( ludp->lud_filter ); ludp->lud_filter = LDAP_STRDUP( p ); - if( ludp->lud_filter == NULL ) { + if ( ludp->lud_filter == NULL ) { LDAP_FREE( url ); ldap_free_urldesc( ludp ); return LDAP_URL_ERR_MEM; @@ -1353,7 +1353,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) p = q; q = strchr( p, '?' ); - if( q != NULL ) { + if ( q != NULL ) { /* extra '?' */ LDAP_FREE( url ); ldap_free_urldesc( ludp ); @@ -1363,22 +1363,22 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) /* parse the extensions */ ludp->lud_exts = ldap_str2charray( p, "," ); - if( ludp->lud_exts == NULL ) { + if ( ludp->lud_exts == NULL ) { LDAP_FREE( url ); ldap_free_urldesc( ludp ); return LDAP_URL_ERR_BADEXTS; } - for( i=0; ludp->lud_exts[i] != NULL; i++ ) { + for ( i=0; ludp->lud_exts[i] != NULL; i++ ) { ldap_pvt_hex_unescape( ludp->lud_exts[i] ); - if( *ludp->lud_exts[i] == '!' ) { + if ( *ludp->lud_exts[i] == '!' ) { /* count the number of critical extensions */ ludp->lud_crit_exts++; } } - if( i == 0 ) { + if ( i == 0 ) { /* must have 1 or more */ LDAP_FREE( url ); ldap_free_urldesc( ludp ); @@ -1396,7 +1396,7 @@ ldap_url_parse( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) { gint rc = ldap_url_parse_ext( url_in, ludpp ); - if( rc != LDAP_URL_SUCCESS ) { + if ( rc != LDAP_URL_SUCCESS ) { return rc; } @@ -1410,13 +1410,13 @@ ldap_url_parse( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) } if ((*ludpp)->lud_port == 0) { - if( strcmp((*ludpp)->lud_scheme, "ldap") == 0 ) { + if ( strcmp((*ludpp)->lud_scheme, "ldap") == 0 ) { (*ludpp)->lud_port = LDAP_PORT; #ifdef LDAP_CONNECTIONLESS - } else if( strcmp((*ludpp)->lud_scheme, "cldap") == 0 ) { + } else if ( strcmp((*ludpp)->lud_scheme, "cldap") == 0 ) { (*ludpp)->lud_port = LDAP_PORT; #endif - } else if( strcmp((*ludpp)->lud_scheme, "ldaps") == 0 ) { + } else if ( strcmp((*ludpp)->lud_scheme, "ldaps") == 0 ) { (*ludpp)->lud_port = LDAPS_PORT; } } 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 205f30b26b..abcfe8cb19 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -345,7 +345,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 @@ -399,7 +399,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) @@ -2296,7 +2296,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; @@ -2713,7 +2713,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; @@ -3545,7 +3545,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 1e219f0ceb..236c6acd0c 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 2b62299b65..aabea67bdb 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 965beb7e27..786c4d994d 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -566,7 +566,7 @@ eab_model_set_property (GObject *object, guint prop_id, const GValue *value, GPa model = EAB_MODEL (object); - switch (prop_id){ + switch (prop_id) { case PROP_BOOK: if (model->book) { if (model->writable_status_id) diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c index 4a85b69fa4..536d065c10 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 7805cb19f8..25e55666d4 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -671,7 +671,7 @@ eab_view_set_property (GObject *object, guint prop_id, const GValue *value, GPar { EABView *eav = EAB_VIEW(object); - switch (prop_id){ + switch (prop_id) { case PROP_BOOK: if (eav->book) { g_object_unref (eav->book); @@ -1731,7 +1731,7 @@ eab_view_print (EABView *view, GtkPrintOperationAction action) */ 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 7a95d5ecb5..62778b4bf3 100644 --- a/addressbook/gui/widgets/e-minicard-view-widget.c +++ b/addressbook/gui/widgets/e-minicard-view-widget.c @@ -200,7 +200,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 cf0e511aeb..c33b1f3045 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/e-minicard-view.c @@ -225,7 +225,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) { @@ -375,7 +375,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 41c6ac6809..c4568aac3b 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -303,7 +303,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); @@ -578,7 +578,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; @@ -910,7 +910,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) @@ -960,7 +960,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; @@ -1050,7 +1050,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/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index c7d80b4d51..bea167cc45 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -100,7 +100,7 @@ eab_uri_popup_email_address_copy(EPopup *ep, EPopupItem *item, gpointer data) email_list = e_contact_get (p->contact, E_CONTACT_EMAIL); for (l = email_list; l; l=l->next) { - if(i==email_num) + if (i==email_num) html = e_text_to_html (l->data, 0); i++; } @@ -175,7 +175,7 @@ static EPopupItem eab_uri_popups[] = { static void eab_uri_popup_free(EPopup *ep, GSList *list, gpointer data) { - while (list){ + while (list) { GSList *n = list->next; struct _EPopupItem *item = list->data; @@ -929,7 +929,7 @@ eab_html_press_event (GtkWidget *widget, GdkEvent *event,EABContactDisplay *disp return FALSE; uri = gtk_html_get_url_at (GTK_HTML (widget), event->button.x, event->button.y); - if (uri){ + if (uri) { eab_uri_popup_event(display,event,uri); } |