aboutsummaryrefslogtreecommitdiff
path: root/libsylph/mh.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-07-29 07:01:32 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2010-07-29 07:01:32 +0000
commit03d5278cdd2fd4fd7b6caef33aa53b28e71ffc1c (patch)
tree56859ef1a0ac0310a47f9670113e2b2f2e0f7524 /libsylph/mh.c
parentf105a6dc818de10f476cf5f48c9c590428c661ef (diff)
added 'Junk' special folder and automatically create it when not exist.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2638 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/mh.c')
-rw-r--r--libsylph/mh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libsylph/mh.c b/libsylph/mh.c
index d3be1cf7..89ba6baa 100644
--- a/libsylph/mh.c
+++ b/libsylph/mh.c
@@ -1229,6 +1229,7 @@ static gint mh_create_tree(Folder *folder)
MAKE_DIR_IF_NOT_EXIST(QUEUE_DIR);
MAKE_DIR_IF_NOT_EXIST(DRAFT_DIR);
MAKE_DIR_IF_NOT_EXIST(TRASH_DIR);
+ MAKE_DIR_IF_NOT_EXIST(JUNK_DIR);
return 0;
}
@@ -1820,6 +1821,10 @@ static void mh_scan_tree_recursive(FolderItem *item)
!strcmp(dir_name, TRASH_DIR)) {
new_item->stype = F_TRASH;
folder->trash = new_item;
+ } else if (!folder_get_junk(folder) &&
+ !strcmp(dir_name, JUNK_DIR)) {
+ new_item->stype = F_JUNK;
+ folder_set_junk(folder, new_item);
}
}