aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-object.c
diff options
context:
space:
mode:
author3 <NotZed@Ximian.com>2001-10-04 07:57:41 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-10-04 07:57:41 +0800
commitfc2062d77e868f0e9ebd6aa8ce7ca9f81c583bd7 (patch)
tree97cc632bca6d4164ffee7871eccea08f3eaf0e29 /camel/camel-object.c
parenta39364e258908a69c25dc890788203b2663263f6 (diff)
downloadgsoc2013-evolution-fc2062d77e868f0e9ebd6aa8ce7ca9f81c583bd7.tar
gsoc2013-evolution-fc2062d77e868f0e9ebd6aa8ce7ca9f81c583bd7.tar.gz
gsoc2013-evolution-fc2062d77e868f0e9ebd6aa8ce7ca9f81c583bd7.tar.bz2
gsoc2013-evolution-fc2062d77e868f0e9ebd6aa8ce7ca9f81c583bd7.tar.lz
gsoc2013-evolution-fc2062d77e868f0e9ebd6aa8ce7ca9f81c583bd7.tar.xz
gsoc2013-evolution-fc2062d77e868f0e9ebd6aa8ce7ca9f81c583bd7.tar.zst
gsoc2013-evolution-fc2062d77e868f0e9ebd6aa8ce7ca9f81c583bd7.zip
Remove now unused 'recents' array/freeing func.
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. svn path=/trunk/; revision=13398
Diffstat (limited to 'camel/camel-object.c')
-rw-r--r--camel/camel-object.c15
1 files changed, 9 insertions, 6 deletions
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;