Update of /cvsroot/mahogany/M/include
In directory usw-pr-cvs1:/tmp/cvs-serv3405/include

Modified Files:
        MFilter.h 
Log Message:
patches from Michael A Chase:
1. added new filter test hasflag()
2. and new filter actions set/clearflag()
3. hide unimplemented (in this binary) filter tests in the GUI
4. general clean up of filter code


Index: MFilter.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/MFilter.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -b -u -2 -r1.14 -r1.15
--- MFilter.h   7 Sep 2002 20:35:29 -0000       1.14
+++ MFilter.h   19 Oct 2002 14:12:46 -0000      1.15
@@ -27,4 +27,7 @@
     Do not change the order of these without changing MFilter.cpp
     where corresponding strings are defined.
+
+    Actually, never change the order or remove any of these values,
+    their numeric values are used to store filter settings.
 */
 enum MFDialogTest
@@ -46,8 +49,21 @@
    ORC_T_ScoreBelow,       //                         less
    ORC_T_IsToMe,           // the message is addressed to one of my addresses
+   ORC_T_HasFlag,          // flag is set for message
    ORC_T_Illegal,          // illegal must not occur
    ORC_T_Max = ORC_T_Illegal
 };
 
+enum MFDialogHasFlag
+{
+   ORC_MF_Illegal = -1,
+   ORC_MF_Unseen  = 0, // MailFolder::MSG_STAT_SEEN (inverted)
+   ORC_MF_Deleted,     // MailFolder::MSG_STAT_DELETED
+   ORC_MF_Answered,    // MailFolder::MSG_STAT_ANSWERED
+// ORC_MF_Searched,    // MailFolder::MSG_STAT_SEARCHED
+   ORC_MF_Important,   // MailFolder::MSG_STAT_FLAGGED
+   ORC_MF_Recent,      // MailFolder::MSG_STAT_RECENT
+   ORC_MF_Max
+};
+
 enum MFDialogTarget
 {
@@ -74,11 +90,26 @@
    OAC_T_LogEntry,
    OAC_T_Python,
-   OAC_T_ChangeScore,
+   OAC_T_AddScore,
    OAC_T_SetColour,
    OAC_T_Zap,
    OAC_T_Print,
+   OAC_T_SetFlag,
+   OAC_T_ClearFlag,
+   OAC_T_SetScore,
    OAC_T_Max
 };
 
+enum MFDialogSetFlag
+{
+   OAC_MF_Illegal = -1,
+   OAC_MF_Unseen  = 0, // MailFolder::MSG_STAT_SEEN (inverted)
+   OAC_MF_Deleted,     // MailFolder::MSG_STAT_DELETED
+   OAC_MF_Answered,    // MailFolder::MSG_STAT_ANSWERED
+// OAC_MF_Searched,    // MailFolder::MSG_STAT_SEARCHED
+   OAC_MF_Important,   // MailFolder::MSG_STAT_FLAGGED
+// OAC_MF_Recent,      // MailFolder::MSG_STAT_RECENT (can't set)
+   OAC_MF_Max
+};
+
 enum MFDialogLogical
 {
@@ -90,8 +121,26 @@
 
 /// return true if this filter test requires an argument
-extern bool FilterTestNeedsArgument(int test);
+extern bool FilterTestNeedsArgument(MFDialogTest test);
 
 /// return true if this filter test requires the target to operate on
-extern bool FilterTestNeedsTarget(int test);
+extern bool FilterTestNeedsTarget(MFDialogTest test);
+
+/// return true if this filter test is implemented
+extern bool FilterTestImplemented(MFDialogTest test);
+
+/// return true if this filter action requires an argument
+extern bool FilterActionNeedsArg(MFDialogAction action);
+
+/// return true if this filter action can use the colour popup
+extern bool FilterActionUsesColour(MFDialogAction action);
+
+/// return true if this filter action can use the folder popup
+extern bool FilterActionUsesFolder(MFDialogAction action);
+
+/// return true if this filter action sets a message flag
+extern bool FilterActionMsgFlag(MFDialogAction action);
+
+/// return true if this filter action is implemented
+extern bool FilterActionImplemented(MFDialogAction action);
 
 //@}
@@ -279,5 +328,8 @@
 BEGIN_DECLARE_AUTOPTR(MFilter)
    public:
-      MFilter_obj(const String& name) { m_ptr = MFilter::CreateFromProfile(name); }
+      MFilter_obj(const String& name)
+      {
+         m_ptr = MFilter::CreateFromProfile(name);
+      }
 END_DECLARE_AUTOPTR();
 
@@ -293,3 +345,2 @@
 
 #endif // _MFILTER_H
-



-------------------------------------------------------
This sf.net email is sponsored by:
Access Your PC Securely with GoToMyPC. Try Free Now
https://www.gotomypc.com/s/OSND/DD
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to