~ubuntu-branches/ubuntu/precise/evolution/precise

« back to all changes in this revision

Viewing changes to addressbook/gui/merging/eab-contact-merging.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2011-08-18 11:10:01 UTC
  • mfrom: (1.1.83 upstream)
  • Revision ID: james.westby@ubuntu.com-20110818111001-559uzyuqsoyj7xjg
Tags: 3.1.5-0ubuntu1
* New upstream release.
* debian/control: bump e-d-s Build-Depends to 3.1.5.
* debian/patches/03_lpi.patch: refreshed.
* debian/patches/11_remove_upstream_submit_bugreport.patch: refreshed.
* debian/patches/bogofilter_init_903b8e6.patch,
  debian/patches/evo_fbee43e_to_f4505a2.patch,
  debian/patches/spamassassin_init_4fc04af.patch: dropped, included upstream.
* debian/patches/spamd_sbin_path.patch: correct the path to spamd as
  /usr/sbin/spamd, which is the correct path in Ubuntu. (LP: #828693)

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
                merging_queue = g_list_remove_link (merging_queue, merging_queue);
97
97
 
98
98
                running_merge_requests++;
99
 
                eab_contact_locate_match_full (lookup->book_client, lookup->contact, lookup->avoid, match_query_callback, lookup);
 
99
                eab_contact_locate_match_full (
 
100
                        lookup->book_client, lookup->contact,
 
101
                        lookup->avoid, match_query_callback, lookup);
100
102
        }
101
103
}
102
104
 
112
114
}
113
115
 
114
116
static void
115
 
final_id_cb (EBookClient *book_client, const GError *error, const gchar *id, gpointer closure)
 
117
final_id_cb (EBookClient *book_client,
 
118
             const GError *error,
 
119
             const gchar *id,
 
120
             gpointer closure)
116
121
{
117
122
        EContactMergingLookup *lookup = closure;
118
123
 
125
130
}
126
131
 
127
132
static void
128
 
final_cb_as_id (EBookClient *book_client, const GError *error, gpointer closure)
 
133
final_cb_as_id (EBookClient *book_client,
 
134
                const GError *error,
 
135
                gpointer closure)
129
136
{
130
137
        EContactMergingLookup *lookup = closure;
131
138
 
132
139
        if (lookup->id_cb)
133
 
                lookup->id_cb (lookup->book_client, error, lookup->contact ? e_contact_get_const (lookup->contact, E_CONTACT_UID) : NULL, lookup->closure);
 
140
                lookup->id_cb (
 
141
                        lookup->book_client, error,
 
142
                        lookup->contact ?
 
143
                                e_contact_get_const (
 
144
                                lookup->contact, E_CONTACT_UID) : NULL,
 
145
                        lookup->closure);
134
146
 
135
147
        free_lookup (lookup);
136
148
 
138
150
}
139
151
 
140
152
static void
141
 
final_cb (EBookClient *book_client, const GError *error, gpointer closure)
 
153
final_cb (EBookClient *book_client,
 
154
          const GError *error,
 
155
          gpointer closure)
142
156
{
143
157
        EContactMergingLookup *lookup = closure;
144
158
 
151
165
}
152
166
 
153
167
static void
154
 
modify_contact_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
 
168
modify_contact_ready_cb (GObject *source_object,
 
169
                         GAsyncResult *result,
 
170
                         gpointer user_data)
155
171
{
156
172
        EBookClient *book_client = E_BOOK_CLIENT (source_object);
157
173
        EContactMergingLookup *lookup = user_data;
172
188
}
173
189
 
174
190
static void
175
 
add_contact_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
 
191
add_contact_ready_cb (GObject *source_object,
 
192
                      GAsyncResult *result,
 
193
                      gpointer user_data)
176
194
{
177
195
        EBookClient *book_client = E_BOOK_CLIENT (source_object);
178
196
        EContactMergingLookup *lookup = user_data;
251
269
}
252
270
 
253
271
static void
254
 
remove_contact_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
 
272
remove_contact_ready_cb (GObject *source_object,
 
273
                         GAsyncResult *result,
 
274
                         gpointer user_data)
255
275
{
256
276
        EBookClient *book_client = E_BOOK_CLIENT (source_object);
257
277
        EContactMergingLookup *lookup = user_data;
262
282
 
263
283
        e_book_client_remove_contact_finish (book_client, result, &error);
264
284
 
265
 
        if (error) {
266
 
                g_debug ("%s: Failed to remove contact: %s", G_STRFUNC, error->message);
 
285
        if (error != NULL) {
 
286
                g_warning (
 
287
                        "%s: Failed to remove contact: %s",
 
288
                        G_STRFUNC, error->message);
267
289
                g_error_free (error);
268
290
        }
269
291
 
270
 
        e_book_client_add_contact (book_client, lookup->contact, NULL, add_contact_ready_cb, lookup);
 
292
        e_book_client_add_contact (
 
293
                book_client, lookup->contact, NULL,
 
294
                add_contact_ready_cb, lookup);
271
295
}
272
296
 
273
297
static gint