~ubuntu-branches/ubuntu/saucy/evolution-data-server/saucy

« back to all changes in this revision

Viewing changes to camel/providers/imap/camel-imap-journal.c

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-10-08 12:58:16 UTC
  • mfrom: (181.1.7 quantal)
  • Revision ID: package-import@ubuntu.com-20121008125816-i3n76e8c0m64e7xp
Tags: 3.6.0-0ubuntu2
* Fix LP: #1038047 part 1 - Don't abort in e_source_registry_new* when a
  problem occurs connecting to the Dbus service
  - add debian/patches/dont-abort-in-e_source_registry_new.patch
  - update debian/patches/series
* Fix LP: #1038047 part 2 - libedataserver depends on
  evolution-data-server-common to ensure that the GSettings schemas are
  present
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
185
185
{
186
186
        CamelIMAPJournalEntry *entry;
187
187
 
188
 
        d(g_print ("DEBUG: Loading to  the journal \n"));
 
188
        d (g_print ("DEBUG: Loading to  the journal \n"));
189
189
 
190
190
        entry = g_malloc0 (sizeof (CamelIMAPJournalEntry));
191
191
 
254
254
        if (camel_file_util_encode_uint32 (out, imap_entry->type) == -1)
255
255
                return -1;
256
256
 
257
 
        d(g_print ("DEBUG: Writing to  the journal \n"));
 
257
        d (g_print ("DEBUG: Writing to  the journal \n"));
258
258
        switch (imap_entry->type) {
259
259
        case CAMEL_IMAP_JOURNAL_ENTRY_EXPUNGE:
260
260
                uids = imap_entry->uids;
304
304
                folder = camel_store_get_folder_sync (
305
305
                        parent_store, name, 0, cancellable, &local_error);
306
306
                if (folder)
307
 
                        g_hash_table_insert (journal->folders, (gchar *) name, folder);
 
307
                        g_hash_table_insert (
 
308
                                journal->folders,
 
309
                                (gchar *) name, folder);
308
310
                else {
309
 
                        msg = g_strdup_printf (_("Could not open '%s':\n%s\nChanges made to this folder will not be resynchronized."),
310
 
                                               name, local_error->message);
 
311
                        msg = g_strdup_printf (
 
312
                                _("Could not open '%s':\n%s\n"
 
313
                                "Changes made to this folder "
 
314
                                "will not be resynchronized."),
 
315
                                name, local_error->message);
311
316
                        g_clear_error (&local_error);
312
317
                        camel_session_alert_user (
313
 
                                camel_service_get_session (CAMEL_SERVICE (parent_store)),
 
318
                                camel_service_get_session (
 
319
                                CAMEL_SERVICE (parent_store)),
314
320
                                CAMEL_SESSION_ALERT_WARNING,
315
321
                                msg, NULL);
316
322
                        g_free (msg);
328
334
{
329
335
        CamelIMAPJournalEntry *imap_entry = entry;
330
336
 
331
 
        d(g_print ("DEBUG: PLaying the journal \n"));
 
337
        d (g_print ("DEBUG: PLaying the journal \n"));
332
338
 
333
339
        switch (imap_entry->type) {
334
340
        case CAMEL_IMAP_JOURNAL_ENTRY_EXPUNGE:
373
379
                        (CamelIMAPJournal *) journal,
374
380
                        imap_entry->dest_folder_name, cancellable);
375
381
                if (!destination) {
376
 
                        d(g_print ("Destination folder not found \n"));
 
382
                        d (g_print ("Destination folder not found \n"));
377
383
                        return -1;
378
384
                }
379
385
 
391
397
                        }
392
398
                        g_ptr_array_free (ret_uids, TRUE);
393
399
                }
394
 
                d(g_print ("Replay success \n"));
 
400
                d (g_print ("Replay success \n"));
395
401
                return 0;
396
402
        }
397
403
        default:
408
414
 
409
415
        g_return_val_if_fail (CAMEL_IS_IMAP_FOLDER (folder), NULL);
410
416
 
411
 
        d(g_print ("Creating the journal \n"));
 
417
        d (g_print ("Creating the journal \n"));
412
418
        journal = g_object_new (CAMEL_TYPE_IMAP_JOURNAL, NULL);
413
419
        camel_offline_journal_construct (journal, (CamelFolder *) folder, filename);
414
420
 
429
435
        entry = g_new0 (CamelIMAPJournalEntry, 1);
430
436
        entry->type = action;
431
437
 
432
 
        d(g_print ("logging the journal \n"));
 
438
        d (g_print ("logging the journal \n"));
433
439
 
434
440
        va_start (ap, action);
435
441
        switch (entry->type) {
491
497
                               const gchar *old_uid,
492
498
                               const gchar *new_uid)
493
499
{
494
 
        g_hash_table_insert (journal->uidmap, g_strdup (old_uid),
495
 
                             g_strdup (new_uid));
 
500
        g_hash_table_insert (
 
501
                journal->uidmap,
 
502
                g_strdup (old_uid),
 
503
                g_strdup (new_uid));
496
504
}
497
505
 
498
506
const gchar *