evolution-data-server r10000 - in branches/gnome-2-24/camel: . providers/local
- From: sragavan svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r10000 - in branches/gnome-2-24/camel: . providers/local
- Date: Fri, 30 Jan 2009 06:47:32 +0000 (UTC)
Author: sragavan
Date: Fri Jan 30 06:47:32 2009
New Revision: 10000
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=10000&view=rev
Log:
2009-01-30 Srinivasa Ragavan <sragavan novell com>
** Fix for bug #557348
* camel-folder-summary.c: (camel_folder_summary_add),
(camel_folder_summary_insert),
(camel_folder_summary_update_flag_cache):
* camel-folder-summary.h:
Modified:
branches/gnome-2-24/camel/ChangeLog
branches/gnome-2-24/camel/camel-folder-summary.c
branches/gnome-2-24/camel/camel-folder-summary.h
branches/gnome-2-24/camel/providers/local/ChangeLog
branches/gnome-2-24/camel/providers/local/camel-local-summary.c
Modified: branches/gnome-2-24/camel/camel-folder-summary.c
==============================================================================
--- branches/gnome-2-24/camel/camel-folder-summary.c (original)
+++ branches/gnome-2-24/camel/camel-folder-summary.c Fri Jan 30 06:47:32 2009
@@ -1771,7 +1771,8 @@
#warning "FIXME: SHould we ref it or redesign it later on"
/* The uid array should have its own memory. We will unload the infos when not reqd.*/
g_ptr_array_add (s->uids, (gpointer) camel_pstring_strdup((camel_message_info_uid(info))));
-
+ g_hash_table_replace (_PRIVATE(s)->flag_cache, (char *)info->uid, GUINT_TO_POINTER(camel_message_info_flags(info)));
+
g_hash_table_insert (s->loaded_infos, (gpointer) camel_message_info_uid (info), info);
s->flags |= CAMEL_SUMMARY_DIRTY;
@@ -1802,9 +1803,13 @@
g_ptr_array_add (s->uids, (char *) camel_pstring_strdup(camel_message_info_uid(info)));
g_hash_table_insert (s->loaded_infos, (char *) camel_message_info_uid (info), info);
+ if (load) {
+ g_hash_table_replace (_PRIVATE(s)->flag_cache, (char *)info->uid, GUINT_TO_POINTER(camel_message_info_flags(info)));
+ }
+
if (!load)
s->flags |= CAMEL_SUMMARY_DIRTY;
-
+
CAMEL_SUMMARY_UNLOCK(s, summary_lock);
}
@@ -4665,7 +4670,11 @@
return TRUE;
}
-
+void
+camel_folder_summary_update_flag_cache (CamelFolderSummary *s, const char *uid, guint32 flag)
+{
+ g_hash_table_replace (_PRIVATE(s)->flag_cache, uid, flag);
+}
/**
* camel_message_info_set_flags:
* @mi: a #CamelMessageInfo
Modified: branches/gnome-2-24/camel/camel-folder-summary.h
==============================================================================
--- branches/gnome-2-24/camel/camel-folder-summary.h (original)
+++ branches/gnome-2-24/camel/camel-folder-summary.h Fri Jan 30 06:47:32 2009
@@ -408,6 +408,7 @@
GHashTable *camel_folder_summary_get_hashtable(CamelFolderSummary *s);
void camel_folder_summary_free_hashtable (GHashTable *ht);
GHashTable *camel_folder_summary_get_flag_cache (CamelFolderSummary *summary);
+void camel_folder_summary_update_flag_cache (CamelFolderSummary *s, const char *uid, guint32 flag);
/* basically like strings, but certain keywords can be compressed and de-cased */
int camel_folder_summary_encode_token(FILE *out, const char *str);
Modified: branches/gnome-2-24/camel/providers/local/camel-local-summary.c
==============================================================================
--- branches/gnome-2-24/camel/providers/local/camel-local-summary.c (original)
+++ branches/gnome-2-24/camel/providers/local/camel-local-summary.c Fri Jan 30 06:47:32 2009
@@ -484,6 +484,7 @@
update_summary (s, (CamelMessageInfoBase *) mi, (CamelMessageInfoBase *) info);
mi->info.flags |= (camel_message_info_flags(info) & 0xffff);
+ camel_folder_summary_update_flag_cache (s, mi->info.uid, mi->info.flags);
mi->info.size = camel_message_info_size(info);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]