aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/merging
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-10-05 19:57:30 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-10-05 19:57:30 +0800
commit4ec46cc05fcb94d181fb9c2412984a1446647c85 (patch)
treed16ce30e77dd539c03509237dd4c723d46aea97a /addressbook/gui/merging
parent5ea7e23aef0c239af2600c95419ba0bda0f08b3c (diff)
parent19163c2b71e6128fc9b32287b99b1f4422324c2d (diff)
downloadgsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.gz
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.bz2
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.lz
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.xz
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.zst
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.zip
Merge from master
Diffstat (limited to 'addressbook/gui/merging')
-rw-r--r--addressbook/gui/merging/Makefile.am5
-rw-r--r--addressbook/gui/merging/eab-contact-compare.c4
-rw-r--r--addressbook/gui/merging/eab-contact-compare.h62
-rw-r--r--addressbook/gui/merging/eab-contact-merging.c20
-rw-r--r--addressbook/gui/merging/eab-contact-merging.h15
5 files changed, 77 insertions, 29 deletions
diff --git a/addressbook/gui/merging/Makefile.am b/addressbook/gui/merging/Makefile.am
index 01af6b2534..b1c2b45cf4 100644
--- a/addressbook/gui/merging/Makefile.am
+++ b/addressbook/gui/merging/Makefile.am
@@ -7,8 +7,9 @@ libeabbookmerging_la_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/widgets \
-I$(top_srcdir)/addressbook \
- $(EVOLUTION_ADDRESSBOOK_CFLAGS) \
- $(GNOME_PLATFORM_CFLAGS)
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
+ $(GNOME_PLATFORM_CFLAGS) \
+ $(GTKHTML_CFLAGS)
libeabbookmerging_la_SOURCES = \
eab-contact-compare.c \
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c
index a25ad4e403..b936c9810d 100644
--- a/addressbook/gui/merging/eab-contact-compare.c
+++ b/addressbook/gui/merging/eab-contact-compare.c
@@ -833,8 +833,8 @@ eab_contact_locate_match_full (EBookClient *book_client,
return;
source = e_source_list_peek_default_source (info->source_list);
-
- e_client_utils_open_new (source, E_CLIENT_SOURCE_TYPE_CONTACTS, FALSE, NULL,
+ e_client_utils_open_new (
+ source, E_CLIENT_SOURCE_TYPE_CONTACTS, FALSE, NULL,
e_client_utils_authenticate_handler, NULL,
book_loaded_cb, info);
}
diff --git a/addressbook/gui/merging/eab-contact-compare.h b/addressbook/gui/merging/eab-contact-compare.h
index 7ce31eddb9..8c07a56f08 100644
--- a/addressbook/gui/merging/eab-contact-compare.h
+++ b/addressbook/gui/merging/eab-contact-compare.h
@@ -26,8 +26,8 @@
#ifndef __EAB_CONTACT_COMPARE_H__
#define __EAB_CONTACT_COMPARE_H__
-#include <libebook/e-book-client.h>
#include <libebook/e-contact.h>
+#include <libebook/e-book-client.h>
typedef enum {
EAB_CONTACT_MATCH_NOT_APPLICABLE = 0,
@@ -45,26 +45,56 @@ typedef enum {
EAB_CONTACT_MATCH_PART_FAMILY_NAME = 1 << 3
} EABContactMatchPart;
-typedef void (*EABContactMatchQueryCallback) (EContact *contact, EContact *match, EABContactMatchType type, gpointer closure);
+typedef void (*EABContactMatchQueryCallback) (EContact *contact,
+ EContact *match,
+ EABContactMatchType type,
+ gpointer closure);
-EABContactMatchType eab_contact_compare_name_to_string (EContact *contact, const gchar *str);
+EABContactMatchType
+ eab_contact_compare_name_to_string
+ (EContact *contact,
+ const gchar *str);
-EABContactMatchType eab_contact_compare_name_to_string_full (EContact *contact, const gchar *str,
- gboolean allow_partial_matches,
- gint *matched_parts, EABContactMatchPart *first_matched_part,
- gint *matched_character_count);
+EABContactMatchType
+ eab_contact_compare_name_to_string_full
+ (EContact *contact,
+ const gchar *str,
+ gboolean allow_partial_matches,
+ gint *matched_parts,
+ EABContactMatchPart *first_matched_part,
+ gint *matched_character_count);
-EABContactMatchType eab_contact_compare_file_as (EContact *contact1, EContact *contact2);
-EABContactMatchType eab_contact_compare_name (EContact *contact1, EContact *contact2);
-EABContactMatchType eab_contact_compare_nickname (EContact *contact1, EContact *contact2);
-EABContactMatchType eab_contact_compare_email (EContact *contact1, EContact *contact2);
-EABContactMatchType eab_contact_compare_address (EContact *contact1, EContact *contact2);
-EABContactMatchType eab_contact_compare_telephone (EContact *contact1, EContact *contact2);
+EABContactMatchType
+ eab_contact_compare_file_as (EContact *contact1,
+ EContact *contact2);
+EABContactMatchType
+ eab_contact_compare_name (EContact *contact1,
+ EContact *contact2);
+EABContactMatchType
+ eab_contact_compare_nickname (EContact *contact1,
+ EContact *contact2);
+EABContactMatchType
+ eab_contact_compare_email (EContact *contact1,
+ EContact *contact2);
+EABContactMatchType
+ eab_contact_compare_address (EContact *contact1,
+ EContact *contact2);
+EABContactMatchType
+ eab_contact_compare_telephone (EContact *contact1,
+ EContact *contact2);
-EABContactMatchType eab_contact_compare (EContact *contact1, EContact *contact2);
+EABContactMatchType
+ eab_contact_compare (EContact *contact1,
+ EContact *contact2);
-void eab_contact_locate_match (EContact *contact, EABContactMatchQueryCallback cb, gpointer closure);
-void eab_contact_locate_match_full (EBookClient *book_client, EContact *contact, GList *avoid, EABContactMatchQueryCallback cb, gpointer closure);
+void eab_contact_locate_match (EContact *contact,
+ EABContactMatchQueryCallback cb,
+ gpointer closure);
+void eab_contact_locate_match_full (EBookClient *book_client,
+ EContact *contact,
+ GList *avoid,
+ EABContactMatchQueryCallback cb,
+ gpointer closure);
#endif /* __E_CONTACT_COMPARE_H__ */
diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c
index f791eab114..1e70b97d77 100644
--- a/addressbook/gui/merging/eab-contact-merging.c
+++ b/addressbook/gui/merging/eab-contact-merging.c
@@ -73,7 +73,10 @@ add_lookup (EContactMergingLookup *lookup)
{
if (running_merge_requests < SIMULTANEOUS_MERGING_REQUESTS) {
running_merge_requests++;
- eab_contact_locate_match_full (lookup->book_client, lookup->contact, lookup->avoid, match_query_callback, lookup);
+ eab_contact_locate_match_full (
+ lookup->book_client,
+ lookup->contact, lookup->avoid,
+ match_query_callback, lookup);
}
else {
merging_queue = g_list_append (merging_queue, lookup);
@@ -97,8 +100,9 @@ finished_lookup (void)
running_merge_requests++;
eab_contact_locate_match_full (
- lookup->book_client, lookup->contact,
- lookup->avoid, match_query_callback, lookup);
+ lookup->book_client,
+ lookup->contact, lookup->avoid,
+ match_query_callback, lookup);
}
}
@@ -138,8 +142,8 @@ final_cb_as_id (EBookClient *book_client,
if (lookup->id_cb)
lookup->id_cb (
- lookup->book_client, error,
- lookup->contact ?
+ lookup->book_client,
+ error, lookup->contact ?
e_contact_get_const (
lookup->contact, E_CONTACT_UID) : NULL,
lookup->closure);
@@ -566,7 +570,11 @@ match_query_callback (EContact *contact,
if (lookup->op == E_CONTACT_MERGING_FIND) {
if (lookup->c_cb)
- lookup->c_cb (lookup->book_client, NULL, (gint) type <= (gint) EAB_CONTACT_MATCH_VAGUE ? NULL : match, lookup->closure);
+ lookup->c_cb (
+ lookup->book_client, NULL,
+ (gint) type <= (gint)
+ EAB_CONTACT_MATCH_VAGUE ? NULL : match,
+ lookup->closure);
free_lookup (lookup);
finished_lookup ();
diff --git a/addressbook/gui/merging/eab-contact-merging.h b/addressbook/gui/merging/eab-contact-merging.h
index c8e2ddb3ef..a922d6b9fb 100644
--- a/addressbook/gui/merging/eab-contact-merging.h
+++ b/addressbook/gui/merging/eab-contact-merging.h
@@ -30,9 +30,18 @@
G_BEGIN_DECLS
-typedef void (*EABMergingAsyncCallback) (EBookClient *book_client, const GError *error, gpointer closure);
-typedef void (*EABMergingIdAsyncCallback) (EBookClient *book_client, const GError *error, const gchar *id, gpointer closure);
-typedef void (*EABMergingContactAsyncCallback) (EBookClient *book_client, const GError *error, EContact *contact, gpointer closure);
+typedef void (*EABMergingAsyncCallback) (EBookClient *book_client,
+ const GError *error,
+ gpointer closure);
+typedef void (*EABMergingIdAsyncCallback) (EBookClient *book_client,
+ const GError *error,
+ const gchar *id,
+ gpointer closure);
+typedef void (*EABMergingContactAsyncCallback)
+ (EBookClient *book_client,
+ const GError *error,
+ EContact *contact,
+ gpointer closure);
gboolean eab_merging_book_add_contact (EBookClient *book_client,
EContact *contact,