aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-store.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-10-30 07:23:12 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-10-30 07:23:12 +0800
commit921c64fb60dfb696590d45f2521a041213a91b0a (patch)
treef7330ec3ce785b6dddaed0f29675bd9606a5d189 /camel/camel-store.c
parentc2f642c4e1c1dea3aef8bd0dedf11c4fb0d2f542 (diff)
downloadgsoc2013-evolution-921c64fb60dfb696590d45f2521a041213a91b0a.tar
gsoc2013-evolution-921c64fb60dfb696590d45f2521a041213a91b0a.tar.gz
gsoc2013-evolution-921c64fb60dfb696590d45f2521a041213a91b0a.tar.bz2
gsoc2013-evolution-921c64fb60dfb696590d45f2521a041213a91b0a.tar.lz
gsoc2013-evolution-921c64fb60dfb696590d45f2521a041213a91b0a.tar.xz
gsoc2013-evolution-921c64fb60dfb696590d45f2521a041213a91b0a.tar.zst
gsoc2013-evolution-921c64fb60dfb696590d45f2521a041213a91b0a.zip
Don't emit a folder_subscribed signal if we are in the process of renaming
2001-10-29 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (subscribe_folder): Don't emit a folder_subscribed signal if we are in the process of renaming folders. (unsubscribe_folder): Same here but for the unsubscribe signal. (rename_folder): Unsubscribe from the folder being renamed and any subfolders it may have before actually renaming. Once the folder has been renamed, re-subscribe to it and it's subfolders with the new name. * camel-store.c (camel_folder_info_build): Sort the folder info's before constructing the tree. svn path=/trunk/; revision=14378
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r--camel/camel-store.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c
index d98df75d55..5fd2032239 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -802,6 +802,15 @@ camel_folder_info_build_path (CamelFolderInfo *fi, char separator)
}
}
+static int
+folder_info_cmp (const void *ap, const void *bp)
+{
+ const CamelFolderInfo *a = ((CamelFolderInfo **)ap)[0];
+ const CamelFolderInfo *b = ((CamelFolderInfo **)bp)[0];
+
+ return strcmp (a->full_name, b->full_name);
+}
+
/**
* camel_folder_info_build:
* @folders: an array of CamelFolderInfo
@@ -833,6 +842,8 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace,
namespace = "";
nlen = strlen (namespace);
+ qsort (folders->pdata, folders->len, sizeof (folders->pdata[0]), folder_info_cmp);
+
/* Hash the folders. */
hash = g_hash_table_new (g_str_hash, g_str_equal);
for (i = 0; i < folders->len; i++) {