ignore threads
[claws.git] / src / procmsg.h
index b7ed1208d59340fc90a4cc7f6eda63b8a937a4f7..7a16adc7cb02c9d9ccff54f205fd5ce5710ae246 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999,2000 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2001 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -39,6 +39,19 @@ typedef enum
        MSG_DELETED     = 1 << 3,
        MSG_REPLIED     = 1 << 4,
        MSG_FORWARDED   = 1 << 5,
+       MSG_REALLY_DELETED = 1 << 6,
+
+       MSG_LABEL         = 1 << 9 | 1 << 8 | 1 << 7,
+       MSG_LABEL_NONE    = 0 << 9 | 0 << 8 | 0 << 7,
+       MSG_LABEL_ORANGE  = 0 << 9 | 0 << 8 | 1 << 7,
+       MSG_LABEL_RED     = 0 << 9 | 1 << 8 | 0 << 7,
+       MSG_LABEL_PINK    = 0 << 9 | 1 << 8 | 1 << 7,
+       MSG_LABEL_SKYBLUE = 1 << 9 | 0 << 8 | 0 << 7,
+       MSG_LABEL_BLUE    = 1 << 9 | 0 << 8 | 1 << 7,
+       MSG_LABEL_GREEN   = 1 << 9 | 1 << 8 | 0 << 7,
+       MSG_LABEL_BROWN   = 1 << 9 | 1 << 8 | 1 << 7,
+
+       MSG_IGNORE_THREAD = 1 << 10,
 
        /* temporary flags (0xffff0000) */
        MSG_MOVE        = 1 << 16,
@@ -58,7 +71,10 @@ typedef enum
                                         MSG_MARKED    | \
                                         MSG_DELETED   | \
                                         MSG_REPLIED   | \
-                                        MSG_FORWARDED)
+                                        MSG_FORWARDED | \
+                                         MSG_REALLY_DELETED | \
+                                         MSG_LABEL     | \
+                                        MSG_IGNORE_THREAD)
 #define MSG_CACHED_FLAG_MASK           (MSG_MIME)
 
 #define MSG_SET_FLAGS(msg, flags)      { (msg) |= (flags); }
@@ -72,6 +88,7 @@ typedef enum
 
 #define MSG_IS_MOVE(msg)               ((msg & MSG_MOVE) != 0)
 #define MSG_IS_COPY(msg)               ((msg & MSG_COPY) != 0)
+#define MSG_IS_REALLY_DELETED(msg)     ((msg & MSG_REALLY_DELETED) != 0)
 
 #define MSG_IS_QUEUED(msg)             ((msg & MSG_QUEUED) != 0)
 #define MSG_IS_DRAFT(msg)              ((msg & MSG_DRAFT) != 0)
@@ -80,6 +97,8 @@ typedef enum
 #define MSG_IS_MIME(msg)               ((msg & MSG_MIME) != 0)
 #define MSG_IS_NEWS(msg)               ((msg & MSG_NEWS) != 0)
 #define MSG_IS_CACHED(msg)             ((msg & MSG_CACHED) != 0)
+#define MSG_GET_LABEL(msg)             (msg & MSG_LABEL)
+#define MSG_IS_IGNORE_THREAD(msg)      ((msg & MSG_IGNORE_THREAD) != 0)
 
 #define WRITE_CACHE_DATA_INT(n, fp) \
        fwrite(&n, sizeof(n), 1, fp)
@@ -134,8 +153,6 @@ struct _MsgInfo
        /* used only for encrypted messages */
        gchar *plaintext_file;
        guint decryption_failed : 1;
-
-       void * data;
 };
 
 GHashTable *procmsg_msg_hash_table_create      (GSList         *mlist);
@@ -148,6 +165,7 @@ GSList *procmsg_read_cache          (FolderItem     *item,
 void   procmsg_set_flags               (GSList         *mlist,
                                         FolderItem     *item);
 gint   procmsg_get_last_num_in_cache   (GSList         *mlist);
+void   procmsg_msg_list_free           (GSList         *mlist);
 void   procmsg_write_cache             (MsgInfo        *msginfo,
                                         FILE           *fp);
 void   procmsg_write_flags             (MsgInfo        *msginfo,