aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-folder-cache.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2009-04-13 17:03:19 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2009-04-13 17:03:19 +0800
commit064ff85b3b8e06a5347b62e5c80c1273875e719a (patch)
treec6a44f922ea443c1b7d4d4e40f081538f88a5b50 /mail/mail-folder-cache.c
parent6759311c28f02a38fdb9a48f400a0e3c1a496f03 (diff)
downloadgsoc2013-evolution-064ff85b3b8e06a5347b62e5c80c1273875e719a.tar.gz
gsoc2013-evolution-064ff85b3b8e06a5347b62e5c80c1273875e719a.tar.zst
gsoc2013-evolution-064ff85b3b8e06a5347b62e5c80c1273875e719a.zip
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
Diffstat (limited to 'mail/mail-folder-cache.c')
-rw-r--r--mail/mail-folder-cache.c30
1 files changed, 30 insertions, 0 deletions
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;
+}