From 0c87c491460125f6fd0bcf74b135cec7ae04c00e Mon Sep 17 00:00:00 2001 From: Helder Martins Date: Wed, 10 Jul 2013 18:29:10 +0100 Subject: Implemented clear functionality for DCC download manager. Created clear button in DCC downloaded manager interface. --- src/common/dcc.c | 9 +++++++++ src/common/dcc.h | 1 + 2 files changed, 10 insertions(+) (limited to 'src/common') diff --git a/src/common/dcc.c b/src/common/dcc.c index c0527510..57c0d477 100644 --- a/src/common/dcc.c +++ b/src/common/dcc.c @@ -227,6 +227,15 @@ is_dcc (struct DCC *dcc) return FALSE; } +gboolean +is_dcc_fcompleted (struct DCC *dcc) +{ + if (dcc != NULL) + return (dcc->dccstat == STAT_FAILED || dcc->dccstat == STAT_DONE || dcc->dccstat == STAT_ABORTED); + + return FALSE; +} + /* this is called from hexchat.c:hexchat_misc_checks() every 1 second. */ void diff --git a/src/common/dcc.h b/src/common/dcc.h index e3163c8a..6f3b152f 100644 --- a/src/common/dcc.h +++ b/src/common/dcc.h @@ -117,6 +117,7 @@ struct dccstat_info extern struct dccstat_info dccstat[]; gboolean is_dcc (struct DCC *dcc); +gboolean is_dcc_fcompleted (struct DCC *dcc); void dcc_abort (session *sess, struct DCC *dcc); void dcc_get (struct DCC *dcc); int dcc_resume (struct DCC *dcc); -- cgit 1.4.1