From e9d9c8fcba120d2145617363f13945f494d9575d Mon Sep 17 00:00:00 2001 From: Suman Manjunath Date: Mon, 1 Sep 2008 04:22:45 +0000 Subject: Milan Crha ** Fix for bug #534039 (Make sure search folder's unread count will be tracked properly in a tree even before the folder is opened in the UI). svn path=/trunk/; revision=36239 --- mail/mail-folder-cache.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mail/mail-folder-cache.c') diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index b610a8a2b5..dce2f9f62b 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -206,6 +206,19 @@ real_flush_updates(void *o, void *event_data, void *data) e_event_emit((EEvent *)e, "folder.changed", (EEventTarget *)t); } + if (CAMEL_IS_VEE_STORE (up->store)) { + /* Normally the vfolder store takes care of the folder_opened event itself, + but we add folder to the noting system later, thus we do not know about + search folders to update them in a tree, thus ensure their changes will + be tracked correctly. */ + CamelFolder *folder = camel_store_get_folder (up->store, up->full_name, 0, NULL); + + if (folder) { + mail_note_folder (folder); + camel_object_unref (folder); + } + } + free_update(up); LOCK(info_lock); -- cgit v1.2.3 From 0741eac9d368944621d040ddb2161d49ccce1868 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Fri, 5 Sep 2008 03:13:52 +0000 Subject: Fix infinite loop on deleting vfolders. 2008-09-05 Srinivasa Ragavan * mail-folder-cache.c (real_flush_updates): Fix infinite loop on deleting vfolders. svn path=/trunk/; revision=36257 --- mail/mail-folder-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/mail-folder-cache.c') diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index dce2f9f62b..63a8f2cf90 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -206,7 +206,7 @@ real_flush_updates(void *o, void *event_data, void *data) e_event_emit((EEvent *)e, "folder.changed", (EEventTarget *)t); } - if (CAMEL_IS_VEE_STORE (up->store)) { + if (CAMEL_IS_VEE_STORE (up->store) && !up->remove) { /* Normally the vfolder store takes care of the folder_opened event itself, but we add folder to the noting system later, thus we do not know about search folders to update them in a tree, thus ensure their changes will -- cgit v1.2.3 From 6001e82295b6e218b1cb9b8cf1a950cf61b01919 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 11 Sep 2008 15:11:04 +0000 Subject: ** Fix for bug #534039 2008-09-11 Milan Crha ** Fix for bug #534039 * mail-vfolder.c: (vfolder_load_storage): Load store to mail component first, to have all notifications registered in time of adding rules. * mail-folder-cache.c: (real_flush_updates): Dropped unnecessary and offending code causing infinite loops when deleting search folder. svn path=/trunk/; revision=36304 --- mail/mail-folder-cache.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'mail/mail-folder-cache.c') diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 63a8f2cf90..b610a8a2b5 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -206,19 +206,6 @@ real_flush_updates(void *o, void *event_data, void *data) e_event_emit((EEvent *)e, "folder.changed", (EEventTarget *)t); } - if (CAMEL_IS_VEE_STORE (up->store) && !up->remove) { - /* Normally the vfolder store takes care of the folder_opened event itself, - but we add folder to the noting system later, thus we do not know about - search folders to update them in a tree, thus ensure their changes will - be tracked correctly. */ - CamelFolder *folder = camel_store_get_folder (up->store, up->full_name, 0, NULL); - - if (folder) { - mail_note_folder (folder); - camel_object_unref (folder); - } - } - free_update(up); LOCK(info_lock); -- cgit v1.2.3 From dc4967ab610a6d97258c8e937b0f623bce89856b Mon Sep 17 00:00:00 2001 From: Sankarasivasubramanian Pasupathilingam Date: Thu, 25 Sep 2008 10:03:08 +0000 Subject: License change from GPL to LGPL svn path=/trunk/; revision=36448 --- mail/mail-folder-cache.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'mail/mail-folder-cache.c') diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index b610a8a2b5..855fbc2c07 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -1,23 +1,24 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Authors: Peter Williams - * Michael Zucchi - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * +/* * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see + * + * + * Authors: + * Peter Williams + * Michael Zucchi + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - * USA */ #ifdef HAVE_CONFIG_H -- cgit v1.2.3 From 87b2f1814cf83b10d1efd410f651c847d1a4c6c2 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Mon, 12 Jan 2009 03:58:40 +0000 Subject: ** Fix for bug #566653 2009-01-12 Srinivasa Ragavan ** Fix for bug #566653 * mail-folder-cache.c: (folder_changed): Fix a leaked info svn path=/trunk/; revision=37048 --- mail/mail-folder-cache.c | 1 + 1 file changed, 1 insertion(+) (limited to 'mail/mail-folder-cache.c') diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 855fbc2c07..cd63967090 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -420,6 +420,7 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data) ((flags & CAMEL_MESSAGE_DELETED) == 0) && (camel_message_info_date_received (info) > last_newmail)) new++; + camel_message_info_free (info); } } } -- cgit v1.2.3 From 064ff85b3b8e06a5347b62e5c80c1273875e719a Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Mon, 13 Apr 2009 09:03:19 +0000 Subject: Fixes #471083 (bnc) Do not allow deletion of system folders. Fixes #471083 (bnc) Do not allow deletion of system folders. svn path=/trunk/; revision=37517 --- mail/mail-folder-cache.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'mail/mail-folder-cache.c') diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index cd63967090..165f5941c2 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -56,6 +56,7 @@ #include "mail-ops.h" #include "mail-session.h" #include "mail-component.h" +#include "mail-tools.h" /* For notifications of changes */ #include "mail-vfolder.h" @@ -1043,3 +1044,32 @@ int mail_note_get_folder_from_uri(const char *uri, CamelFolder **folderp) return fi.fi != NULL; } + +gboolean +mail_folder_cache_get_folder_info_flags (CamelFolder *folder, int *flags) +{ + char *uri; + + uri = mail_tools_folder_to_url (folder); + + struct _find_info fi = { uri, NULL, NULL }; + + if (stores == NULL) + return FALSE; + + fi.url = camel_url_new(uri, NULL); + + LOCK(info_lock); + g_hash_table_foreach(stores, (GHFunc)storeinfo_find_folder_info, &fi); + if (flags) { + if (fi.fi) { + *flags = fi.fi->flags; + } + } + UNLOCK(info_lock); + + camel_url_free(fi.url); + g_free (uri); + + return fi.fi != NULL; +} -- cgit v1.2.3