From a7102dc008b3526236fd976a63fb61816dde7ed3 Mon Sep 17 00:00:00 2001 From: hiro Date: Thu, 27 Sep 2007 08:19:55 +0000 Subject: 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 --- libsylph/folder.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libsylph/folder.c') 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 -- cgit v1.2.3