Changeset 3677

Show
Ignore:
Timestamp:
05/21/08 09:43:12
Author:
svillar
Message:
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • releases/modest/diablo-pe1/ChangeLog

    r3676 r3677  
     12008-05-20  Philip Van Hoof <pvanhoof@gnome.org> 
     2 
     3        * Fixed a fallback envelope fetch, don't do the clear on the summary. 
     4        Instead mark all as expunged 
     5 
    162008-05-20  Jose Dapena Paz  <jdapena@igalia.com> 
    27 
  • releases/modest/diablo-pe1/libtinymail-camel/camel-lite/camel/camel-folder-summary.c

    r3570 r3677  
    347347        g_ptr_array_foreach (s->expunged, foreach_msginfo, (gpointer)s->message_info_size); 
    348348 
    349         /* camel_folder_summary_clear(s); */ 
    350349        g_ptr_array_free(s->messages, TRUE); 
    351350        g_ptr_array_free(s->expunged, TRUE); 
     
    16231622} 
    16241623 
     1624void 
     1625camel_folder_summary_dispose_all (CamelFolderSummary *s) 
     1626{ 
     1627        int i; 
     1628 
     1629        if (s->messages && s->messages->len > 0) 
     1630        { 
     1631                GPtrArray *items = g_ptr_array_sized_new (s->messages->len); 
     1632 
     1633                CAMEL_SUMMARY_LOCK(s, summary_lock); 
     1634                g_static_rec_mutex_lock (&global_lock); 
     1635 
     1636                for (i=0; i<s->messages->len; i++) { 
     1637                        CamelMessageInfo *info = (CamelMessageInfo *) s->messages->pdata[i]; 
     1638                        CamelMessageInfoBase *mi = (CamelMessageInfoBase *) s->messages->pdata[i]; 
     1639 
     1640                        mi->flags |= CAMEL_MESSAGE_EXPUNGED; 
     1641                        mi->flags |= CAMEL_MESSAGE_FREED; 
     1642                        destroy_possible_pstring_stuff (s, info, FALSE); 
     1643                        mi->subject = "Expunged"; 
     1644                        mi->to = "Expunged"; 
     1645                        mi->from = "Expunged"; 
     1646                        mi->cc = "Expunged"; 
     1647 
     1648                        g_ptr_array_add (items, info); 
     1649                } 
     1650 
     1651                for (i=0; i<items->len; i++) { 
     1652                        CamelMessageInfo *info = (CamelMessageInfo *) items->pdata[i]; 
     1653                        g_ptr_array_remove(s->messages, info); 
     1654                        g_ptr_array_add (s->expunged, info); 
     1655                } 
     1656 
     1657                s->had_expunges = TRUE; 
     1658                s->flags |= CAMEL_SUMMARY_DIRTY; 
     1659 
     1660                g_static_rec_mutex_unlock (&global_lock); 
     1661                CAMEL_SUMMARY_UNLOCK(s, summary_lock); 
     1662 
     1663                g_ptr_array_free (items, TRUE); 
     1664 
     1665        } 
     1666} 
    16251667 
    16261668/** 
  • releases/modest/diablo-pe1/libtinymail-camel/camel-lite/camel/camel-folder-summary.h

    r3635 r3677  
    410410void camel_folder_summary_unlock (); 
    411411 
     412void camel_folder_summary_dispose_all (CamelFolderSummary *s); 
     413 
    412414G_END_DECLS 
    413415 
  • releases/modest/diablo-pe1/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c

    r3646 r3677  
    624624        else if (validity != imap_summary->validity) { 
    625625                imap_summary->validity = validity; 
    626                 camel_folder_summary_clear (folder->summary); 
     626                camel_folder_summary_dispose_all (folder->summary); 
    627627                CAMEL_IMAP_FOLDER_REC_LOCK (imap_folder, cache_lock); 
    628628                camel_imap_message_cache_clear (imap_folder->cache); 
     
    33523352                if (tcnt < (exists - seq)) 
    33533353                { 
     3354                        int i; 
     3355 
    33543356                        g_ptr_array_foreach (needheaders, (GFunc)g_free, NULL); 
    33553357                        g_ptr_array_free (needheaders, TRUE); 
     
    33673369                                        return; 
    33683370                                } 
    3369                         camel_folder_summary_clear (folder->summary); 
     3371 
     3372                        camel_folder_summary_dispose_all (folder->summary); 
     3373 
    33703374                        tcnt = cnt = imap_get_uids (folder, store, ex, needheaders, (exists - seq) - tcnt); 
    33713375 
  • releases/modest/diablo-pe1/libtinymail-camel/camel-lite/camel/providers/local/camel-local-summary.c

    r3453 r3677  
    163163        } 
    164164 
    165 /*      if (forceindex 
    166             || g_stat(s->summary_path, &st) == -1 
    167             || ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->load(cls, forceindex, ex) == -1) { 
    168                 w(g_warning("Could not load summary: flags may be reset")); 
    169                 camel_folder_summary_clear((CamelFolderSummary *)cls); 
    170                 return -1; 
    171         }*/ 
    172  
    173165        return 0; 
    174166} 
  • releases/modest/diablo-pe1/libtinymail-camel/camel-lite/camel/providers/local/camel-mbox-summary.c

    r3258 r3677  
    553553        /* check if the summary is up-to-date */ 
    554554        if (g_stat(cls->folder_path, &st) == -1) { 
    555                 camel_folder_summary_clear(s); 
     555                camel_folder_summary_dispose_all (s); 
    556556                camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, 
    557557                                      _("Cannot check folder: %s: %s"), 
     
    576576                        } 
    577577                } 
    578                 camel_folder_summary_clear(s); 
     578                camel_folder_summary_dispose_all (s); 
    579579                ret = 0; 
    580580        } else {