diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-05-27 22:29:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-05-27 22:29:19 +0800 |
commit | 948235c3d1076dbe6ed2e57a24c16a083bbd9f01 (patch) | |
tree | 4133b1adfd94d8f889ca7ad4ad851346518f4171 /addressbook/gui/merging | |
parent | cc3a98fc1ad5bb87aa7335f3de404ee7feee1541 (diff) | |
download | gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.gz gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.bz2 gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.lz gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.xz gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.zst gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.zip |
Prefer GLib basic types over C types.
Diffstat (limited to 'addressbook/gui/merging')
-rw-r--r-- | addressbook/gui/merging/eab-contact-compare.c | 8 | ||||
-rw-r--r-- | addressbook/gui/merging/eab-contact-merging.c | 40 |
2 files changed, 24 insertions, 24 deletions
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c index 6a3132f5a5..bdf385f0ba 100644 --- a/addressbook/gui/merging/eab-contact-compare.c +++ b/addressbook/gui/merging/eab-contact-compare.c @@ -476,11 +476,11 @@ eab_contact_compare_email (EContact *contact1, EContact *contact2) we find an exact match, there is no reason to keep checking. */ while (i1 && match != EAB_CONTACT_MATCH_EXACT) { - char *addr1 = (char *) i1->data; + gchar *addr1 = (gchar *) i1->data; i2 = contact2_email; while (i2 && match != EAB_CONTACT_MATCH_EXACT) { - char *addr2 = (char *) i2->data; + gchar *addr2 = (gchar *) i2->data; match = combine_comparisons (match, compare_email_addresses (addr1, addr2)); @@ -640,7 +640,7 @@ use_common_book_cb (EBook *book, gpointer closure) gint p=0; gchar *contact_file_as, *qj; EBookQuery *query = NULL; - int i; + gint i; if (book == NULL) { info->cb (info->contact, NULL, EAB_CONTACT_MATCH_NONE, info->closure); @@ -699,7 +699,7 @@ use_common_book_cb (EBook *book, gpointer closure) for(i = 0; query_parts[i] != NULL; i++) g_free(query_parts[i]); if (p > 1) { - char *s; + gchar *s; s = g_strdup_printf ("(or %s)", qj); query = e_book_query_from_string (s); g_free (s); diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c index 5a6ac2cdac..0bcee0be38 100644 --- a/addressbook/gui/merging/eab-contact-merging.c +++ b/addressbook/gui/merging/eab-contact-merging.c @@ -62,7 +62,7 @@ static void match_query_callback (EContact *contact, EContact *match, EABContact #define SIMULTANEOUS_MERGING_REQUESTS 20 static GList *merging_queue = NULL; -static int running_merge_requests = 0; +static gint running_merge_requests = 0; static void @@ -109,7 +109,7 @@ free_lookup (EContactMergingLookup *lookup) } static void -final_id_cb (EBook *book, EBookStatus status, const char *id, gpointer closure) +final_id_cb (EBook *book, EBookStatus status, const gchar *id, gpointer closure) { EContactMergingLookup *lookup = closure; @@ -156,7 +156,7 @@ cancelit (EContactMergingLookup *lookup) static void dialog_map (GtkWidget *window, GdkEvent *event, GtkWidget *table) { - int h, w; + gint h, w; /* Spacing around the table */ w = table->allocation.width + 30; @@ -173,7 +173,7 @@ dialog_map (GtkWidget *window, GdkEvent *event, GtkWidget *table) static void dropdown_changed (GtkWidget *dropdown, dropdown_data *data) { - char *str; + gchar *str; str = gtk_combo_box_get_active_text (GTK_COMBO_BOX (dropdown)); if (g_ascii_strcasecmp(str, "")) @@ -190,11 +190,11 @@ mergeit (EContactMergingLookup *lookup) GtkDialog *dialog; GtkTable *table; EContactField field; - char *str = NULL, *string = NULL, *string1 = NULL; - int num_of_email; + gchar *str = NULL, *string = NULL, *string1 = NULL; + gint num_of_email; GList *email_attr_list; - int row = -1; - int value = 0, result; + gint row = -1; + gint value = 0, result; dialog = (GtkDialog *)(gtk_dialog_new_with_buttons (_("Merge Contact"), NULL, GTK_DIALOG_NO_SEPARATOR, NULL)); gtk_container_set_border_width (GTK_CONTAINER(dialog), 5); @@ -220,8 +220,8 @@ mergeit (EContactMergingLookup *lookup) /*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++) { dropdown_data *data = NULL; - string = (char *)e_contact_get_const (lookup->contact, field); - string1 = (char *)e_contact_get_const (lookup->match, field); + string = (gchar *)e_contact_get_const (lookup->contact, field); + string1 = (gchar *)e_contact_get_const (lookup->match, field); /*the field must exist in the new as well as the duplicate contact*/ if (string && *string) { @@ -230,7 +230,7 @@ mergeit (EContactMergingLookup *lookup) 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)) { row++; - str = (char *)e_contact_get_const (lookup->contact, field); + str = (gchar *)e_contact_get_const (lookup->contact, field); switch(num_of_email) { case 0: @@ -366,8 +366,8 @@ check_if_same (EContact *contact, EContact *match) { EContactField field; GList *email_attr_list; - int num_of_email; - char *str = NULL, *string = NULL, *string1 = NULL; + 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++) { email_attr_list = e_contact_get_attributes (match, E_CONTACT_EMAIL); @@ -375,7 +375,7 @@ check_if_same (EContact *contact, EContact *match) 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 = (char *)e_contact_get_const (contact, field); + str = (gchar *)e_contact_get_const (contact, field); switch(num_of_email) { case 0: @@ -395,8 +395,8 @@ check_if_same (EContact *contact, EContact *match) } } else { - string = (char *)e_contact_get_const (contact, field); - string1 = (char *)e_contact_get_const (match, field); + string = (gchar *)e_contact_get_const (contact, field); + string1 = (gchar *)e_contact_get_const (match, field); if ((string && *string) && (string1 && *string1) && (g_ascii_strcasecmp(string1,string))) return FALSE; /*if the field entry exist in either of the contacts,we'll have to give the choice and thus merge button should be sensitive*/ @@ -409,9 +409,9 @@ check_if_same (EContact *contact, EContact *match) } static void -response (GtkWidget *dialog, int response, EContactMergingLookup *lookup) +response (GtkWidget *dialog, gint response, EContactMergingLookup *lookup) { - static int merge_response; + static gint merge_response; switch (response) { case 0: @@ -437,8 +437,8 @@ static void match_query_callback (EContact *contact, EContact *match, EABContactMatchType type, gpointer closure) { EContactMergingLookup *lookup = closure; - char *gladefile; - int flag; + gchar *gladefile; + gint flag; if ((gint) type <= (gint) EAB_CONTACT_MATCH_VAGUE) { doit (lookup); |