aboutsummaryrefslogtreecommitdiff
path: root/libsylph/folder.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-09-27 08:19:55 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-09-27 08:19:55 +0000
commita7102dc008b3526236fd976a63fb61816dde7ed3 (patch)
treeeb910bfb03b44b9a01a101ecdb4393ef5c83b5d3 /libsylph/folder.c
parentbce6f2354ef08244bf99f6cdccc2b83d17299280 (diff)
fixed a bug that virtual folders were not sorted properly.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1916 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/folder.c')
-rw-r--r--libsylph/folder.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libsylph/folder.c b/libsylph/folder.c
index cb630521..ea8dbe6d 100644
--- a/libsylph/folder.c
+++ b/libsylph/folder.c
@@ -335,8 +335,10 @@ gint folder_item_compare(FolderItem *item_a, FolderItem *item_b)
/* if both a and b are special folders, sort them according to
* their types (which is in-order). Note that this assumes that
- * there are no multiple folders of a special type. */
- if (item_a->stype != F_NORMAL && item_b->stype != F_NORMAL)
+ * there are no multiple folders of a special type. As a special
+ * case, two virtual folders are compared like normal ones. */
+ if (item_a->stype != F_NORMAL && item_b->stype != F_NORMAL &&
+ (item_a->stype != F_VIRTUAL || item_b->stype != F_VIRTUAL))
return item_a->stype - item_b->stype;
/* if b is normal folder, and a is not, b is smaller (ends up