aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-vfolder.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2008-01-28 11:41:49 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2008-01-28 11:41:49 +0800
commit0d3da13635b50c5ab26d121c7dfe939713cc2f91 (patch)
tree4cf8c9642d7788a74342fcfd63499aa160985450 /mail/mail-vfolder.c
parentc7235d29c634f57ae7caf832484fb7a6d9f5861f (diff)
downloadgsoc2013-evolution-0d3da13635b50c5ab26d121c7dfe939713cc2f91.tar
gsoc2013-evolution-0d3da13635b50c5ab26d121c7dfe939713cc2f91.tar.gz
gsoc2013-evolution-0d3da13635b50c5ab26d121c7dfe939713cc2f91.tar.bz2
gsoc2013-evolution-0d3da13635b50c5ab26d121c7dfe939713cc2f91.tar.lz
gsoc2013-evolution-0d3da13635b50c5ab26d121c7dfe939713cc2f91.tar.xz
gsoc2013-evolution-0d3da13635b50c5ab26d121c7dfe939713cc2f91.tar.zst
gsoc2013-evolution-0d3da13635b50c5ab26d121c7dfe939713cc2f91.zip
** Fix for bug #511488
2008-01-24 Srinivasa Ragavan <sragavan@novell.com> ** Fix for bug #511488 * em-folder-tree-model.c: (em_folder_tree_model_signal_block): * em-folder-tree-model.h: Function to block folder-created function. * mail-vfolder.c: (vfolder_load_storage): Block the signal handler when loading. svn path=/trunk/; revision=34905
Diffstat (limited to 'mail/mail-vfolder.c')
-rw-r--r--mail/mail-vfolder.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 75e0dc11f8..7ed1dfb93b 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -36,6 +36,7 @@
#include "e-util/e-error.h"
#include "e-util/e-util-private.h"
+#include "em-folder-tree-model.h"
#include "em-utils.h"
#include "em-vfolder-context.h"
#include "em-vfolder-editor.h"
@@ -63,7 +64,6 @@ static GHashTable *vfolder_hash;
/* This is a slightly hacky solution to shutting down, we poll this variable in various
loops, and just quit processing if it is set. */
static volatile int shutdown; /* are we shutting down? */
-
/* more globals ... */
extern CamelSession *session;
@@ -902,6 +902,7 @@ vfolder_load_storage(void)
char *user, *storeuri;
FilterRule *rule;
char *xmlfile;
+ struct _EMFolderTreeModel *model = mail_component_peek_tree_model (mail_component_peek ());
pthread_mutex_lock (&lock);
@@ -950,12 +951,21 @@ vfolder_load_storage(void)
/* and setup the rules we have */
rule = NULL;
+
+ d(printf("rule added: %s\n", rule->name));
+
+ /* Note: We block the signal handlers to be exact folder_created, since
+ * there is a race betweeen folder_created emitted through camel_store_get_folder and
+ * the store info that is fetched and added for vfolder. Due to this, two vfolders
+ * appear on the search folder. See bug BGO #511488 */
+ em_folder_tree_model_signal_block (model, vfolder_store, TRUE);
while ( (rule = rule_context_next_rule((RuleContext *)context, rule, NULL)) ) {
if (rule->name)
context_rule_added((RuleContext *)context, rule);
else
d(printf("invalid rule (%p) encountered: rule->name is NULL\n", rule));
}
+ em_folder_tree_model_signal_block (model, vfolder_store, FALSE);
g_free(storeuri);
}