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

« back to all changes in this revision

Viewing changes to camel/camel-vee-summary.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2011-02-07 14:11:56 UTC
  • mfrom: (1.1.84 upstream)
  • Revision ID: james.westby@ubuntu.com-20110207141156-jakojbbkzee62447
Tags: 2.32.2-0ubuntu1
* New upstream release
* debian/patches/01_various_linking_issues.patch:
* debian/patches/02_fix_sources_migration.patch:
* debian/patches/199-git-backport-2.32.1-b08a6a1_to_2d0f4a3.patch:
* debian/patches/199-git-backport-2.32.1-to-b08a6a1.patch:
* debian/patches/199-git-skip-empty-cache-files-ee21a86.patch:
  - Fixed upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
247
247
                hacked_unread_folder = TRUE;
248
248
 
249
249
        if (mi->uid) {
250
 
                guint32 old_visible, old_unread, old_deleted, old_junked, old_junked_not_deleted;
251
 
                guint32 visible, unread, deleted, junked, junked_not_deleted;
 
250
                guint32 old_visible, visible, old_unread;
252
251
                CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *)mi)->summary, mi->uid+8);
253
252
                CamelVeeSummary *vsummary = (CamelVeeSummary *)mi->summary;
254
253
 
255
254
                HANDLE_NULL_INFO(FALSE);
256
255
 
257
 
                old_unread = rmi->summary->unread_count;
258
 
                old_deleted = rmi->summary->deleted_count;
259
 
                old_junked = rmi->summary->junk_count;
260
 
                old_junked_not_deleted = rmi->summary->junk_not_deleted_count;
261
256
                old_visible = rmi->summary->visible_count;
 
257
                old_unread = mi->summary->unread_count;
 
258
                camel_folder_summary_update_counts_by_flags (mi->summary, camel_message_info_flags (rmi), TRUE);
262
259
 
263
260
                if (hacked_unread_folder)
264
261
                        camel_vee_folder_mask_event_folder_changed ((CamelVeeFolder *)mi->summary->folder, rmi->summary->folder);
271
268
                if (hacked_unread_folder)
272
269
                        camel_vee_folder_unmask_event_folder_changed ((CamelVeeFolder *)mi->summary->folder, rmi->summary->folder);
273
270
 
274
 
                unread = rmi->summary->unread_count;
275
 
                deleted = rmi->summary->deleted_count;
276
 
                junked = rmi->summary->junk_count;
277
 
                junked_not_deleted = rmi->summary->junk_not_deleted_count;
278
271
                visible = rmi->summary->visible_count;
279
272
 
 
273
                /* Keep the summary in sync */
 
274
                camel_folder_summary_update_counts_by_flags (mi->summary, camel_message_info_flags (rmi), FALSE);
 
275
 
280
276
                if (hacked_unread_folder && !vsummary->fake_visible_count)
281
277
                        vsummary->fake_visible_count = mi->summary->visible_count;
282
278
 
283
 
                /* Keep the summary in sync */
284
 
                mi->summary->unread_count += unread - old_unread;
285
 
                mi->summary->deleted_count += deleted - old_deleted;
286
 
                mi->summary->junk_count += junked - old_junked;
287
 
                mi->summary->junk_not_deleted_count += junked_not_deleted - old_junked_not_deleted;
288
 
                mi->summary->visible_count += visible - old_visible;
289
 
 
290
279
                if (vsummary->fake_visible_count || hacked_unread_folder)
291
280
                        vsummary->fake_visible_count += visible - old_visible;
292
281
 
293
282
                d(printf("VF %d %d %d %d %d\n", mi->summary->unread_count, mi->summary->deleted_count, mi->summary->junk_count, mi->summary->junk_not_deleted_count, mi->summary->visible_count));
294
283
 
295
284
                /* This is where the ugly-created-hack is used */
296
 
                if (hacked_unread_folder && unread - old_unread != 0) {
 
285
                if (hacked_unread_folder && mi->summary->unread_count - old_unread != 0) {
297
286
                        CamelFolderChangeInfo *changes = camel_folder_change_info_new();
298
287
                        GPtrArray *match, *array;
299
288