diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-25 06:53:07 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-25 06:53:07 +0000 |
commit | 34a24148d4315d15e092760c983ff45115a32e00 (patch) | |
tree | 0592ef51839ecb8ebc2d01ccff57bc11dcb91eb5 /libsylph/procmsg.c | |
parent | eca7e29772e97171adbcdad759c11dbd945c7f66 (diff) |
don't show 'Empty trash' dialog if trashed messages don't exist.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@927 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/procmsg.c')
-rw-r--r-- | libsylph/procmsg.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libsylph/procmsg.c b/libsylph/procmsg.c index 26abee6a..3487bdf0 100644 --- a/libsylph/procmsg.c +++ b/libsylph/procmsg.c @@ -1188,6 +1188,20 @@ gboolean procmsg_msg_exist(MsgInfo *msginfo) return ret; } +gboolean procmsg_trash_messages_exist(void) +{ + FolderItem *trash; + GList *cur; + + for (cur = folder_get_list(); cur != NULL; cur = cur->next) { + trash = FOLDER(cur->data)->trash; + if (trash && trash->total > 0) + return TRUE; + } + + return FALSE; +} + void procmsg_empty_trash(FolderItem *trash) { if (trash && trash->total > 0) { |