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 --- ChangeLog | 5 +++++ ChangeLog.ja | 5 +++++ NEWS | 1 + libsylph/folder.c | 6 ++++-- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74407842..49450749 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-09-27 + + * libsylph/folder.c: folder_item_compare(): fixed a bug that virtual + folders were not sorted properly. + 2007-09-27 * src/summaryview.[ch]: fixed the status label so that it will diff --git a/ChangeLog.ja b/ChangeLog.ja index 0b4acd2b..3c3054df 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,8 @@ +2007-09-27 + + * libsylph/folder.c: folder_item_compare(): 仮想フォルダが正しく + ソートされないバグを修正。 + 2007-09-27 * src/summaryview.[ch]: 十分な幅がない場合に自動的にリサイズするように diff --git a/NEWS b/NEWS index 9d145ebf..c0e6a8f9 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ Changes of Sylpheed * The previous focus is kept when separation of view is changed. * The status label is automatically resized now when there is not enough width. + * The bug that virtual folders were not sorted properly was fixed. * 2.4.6 (stable) 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