diff options
Diffstat (limited to 'libsylph')
-rw-r--r-- | libsylph/procmsg.c | 14 | ||||
-rw-r--r-- | libsylph/procmsg.h | 1 |
2 files changed, 15 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) { diff --git a/libsylph/procmsg.h b/libsylph/procmsg.h index 87af5b75..19de310e 100644 --- a/libsylph/procmsg.h +++ b/libsylph/procmsg.h @@ -287,6 +287,7 @@ FILE *procmsg_open_message_decrypted (MsgInfo *msginfo, gboolean procmsg_msg_exist (MsgInfo *msginfo); +gboolean procmsg_trash_messages_exist (void); void procmsg_empty_trash (FolderItem *trash); void procmsg_empty_all_trash (void); |