#include "prefs_common.h"
#include "addrbook.h"
#include "addr_compl.h"
+#include "tags.h"
#include "log.h"
#define PREFSBUFSIZE 1024
info->to_filter_folder = dest_folder;
return TRUE;
+ case MATCHACTION_SET_TAG:
+ case MATCHACTION_UNSET_TAG:
+ val = tags_get_id_for_str(action->destination);
+ if (val == -1) {
+ debug_print("*** tag '%s' not found\n",
+ action->destination ?action->destination :"");
+ return FALSE;
+ }
+
+ procmsg_msginfo_update_tags(info, (action->type == MATCHACTION_SET_TAG), val);
+ return TRUE;
+
+ case MATCHACTION_CLEAR_TAGS:
+ procmsg_msginfo_clear_tags(info);
+ return TRUE;
+
case MATCHACTION_DELETE:
if (folder_item_remove_msg(info->folder, info->msgnum) == -1)
return FALSE;
case MATCHACTION_MOVE:
case MATCHACTION_COPY:
case MATCHACTION_EXECUTE:
+ case MATCHACTION_SET_TAG:
+ case MATCHACTION_UNSET_TAG:
quoted_dest = matcher_quote_str(action->destination);
g_snprintf(dest, destlen, "%s \"%s\"", command_str, quoted_dest);
g_free(quoted_dest);
case MATCHACTION_STOP:
case MATCHACTION_HIDE:
case MATCHACTION_IGNORE:
+ case MATCHACTION_CLEAR_TAGS:
g_snprintf(dest, destlen, "%s", command_str);
return dest;