--- filter.c.orig	Tue Nov 13 08:46:03 2001
+++ filter.c	Tue Nov 13 08:49:10 2001
@@ -46,6 +46,13 @@
 */
 #include "misc.h"
 
+/* FIXME : src/main-window.h is include because we need the status definitions
+ * for the "move mesg to trash" filter match
+ */
+
+#include "src/main-window.h"
+
+
 /* FIXME : filtering takes time, we should notify progress to user */
 
 /* in_string returns TRUE if s2 is a substring of s1
@@ -281,8 +288,16 @@
 		    libbalsa_information(LIBBALSA_INFORMATION_ERROR,"Error when copying messages");
 		break;
 	    case FILTER_TRASH:
-		if (!balsa_app.trash || !libbalsa_messages_move(filt->matching_messages,balsa_app.trash))
+		/*		if (!balsa_app.trash || !libbalsa_messages_move(filt->matching_messages,balsa_app.trash))
+				libbalsa_information(LIBBALSA_INFORMATION_ERROR,"Error when trashing messages");*/
+
+		if (!balsa_app.trash || 
+		    !libbalsa_messages_move(filt->matching_messages,balsa_app.trash)) {
 		    libbalsa_information(LIBBALSA_INFORMATION_ERROR,"Error when trashing messages");
+		} else {
+		    enable_empty_trash(TRASH_FULL);
+		}
+
 		break;
 	    case FILTER_MOVE:
 		mbox = mblist_find_mbox_by_name(balsa_app.mblist,filt->action_string);
