aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/camel-object.c15
-rw-r--r--camel/providers/imap/camel-imap-folder.c5
3 files changed, 17 insertions, 11 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index d9b398c703..1f78322279 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,13 @@
2001-10-03 <NotZed@Ximian.com>
+ * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
+ Remove now unused 'recents' array/freeing func.
+
+ * camel-object.c (camel_object_trigger_event): Oops, always run
+ the prep function, even if we have no hooks listening. Causes
+ incoming imap recents to get ignored bythe camel-folder filter
+ inbox code.
+
* providers/local/camel-local-folder.c (local_sync): Dont
explicitly save metadata, its saved in summary_sync.
diff --git a/camel/camel-object.c b/camel/camel-object.c
index 85be0bcf61..68b9278d8f 100644
--- a/camel/camel-object.c
+++ b/camel/camel-object.c
@@ -882,10 +882,6 @@ camel_object_trigger_event (CamelObject * obj, const char * name, void *event_da
g_return_if_fail (CAMEL_IS_OBJECT (obj));
g_return_if_fail (name);
- /* no hooks, dont bother going anywhere */
- if (obj->hooks == NULL)
- return;
-
/* get event name static pointer/prep func */
if (obj->classfuncs->event_to_preplist == NULL
|| !g_hash_table_lookup_extended(obj->classfuncs->event_to_preplist, name,
@@ -895,12 +891,19 @@ camel_object_trigger_event (CamelObject * obj, const char * name, void *event_da
return;
}
+ /* try prep function, if false, then quit */
+ if (prep != NULL_PREP_VALUE && !prep(obj, event_data))
+ return;
+
+ /* also, no hooks, dont bother going further */
+ if (obj->hooks == NULL)
+ return;
+
/* lock the object for hook emission */
camel_object_ref(obj);
hooks = camel_object_get_hooks(obj);
- if ((prep == NULL_PREP_VALUE || prep(obj, event_data))
- && hooks->list) {
+ if (hooks->list) {
/* first, copy the items in the list, and say we're in an event */
hooks->depth++;
pair = hooks->list;
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 6b4b65c4b7..902c52c3d9 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -1804,7 +1804,6 @@ camel_imap_folder_changed (CamelFolder *folder, int exists,
CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
CamelFolderChangeInfo *changes;
CamelMessageInfo *info;
- GPtrArray *recents = NULL;
int len;
CAMEL_IMAP_STORE_ASSERT_LOCKED (folder->parent_store, command_lock);
@@ -1839,10 +1838,6 @@ camel_imap_folder_changed (CamelFolder *folder, int exists,
camel_object_trigger_event (CAMEL_OBJECT (folder), "folder_changed", changes);
camel_folder_change_info_free (changes);
-
- if (recents)
- g_ptr_array_free (recents, TRUE);
-
camel_folder_summary_save (folder->summary);
}