Update of /cvsroot/mahogany/M/src/modules/spam
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8377/src/modules/spam
Modified Files:
DspamFilter.cpp
Log Message:
added interface for showing spam filters options dialog
Index: DspamFilter.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/spam/DspamFilter.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -u -2 -r1.3 -r1.4
--- DspamFilter.cpp 10 Jul 2004 23:22:17 -0000 1.3
+++ DspamFilter.cpp 11 Jul 2004 19:04:36 -0000 1.4
@@ -31,4 +31,6 @@
#include "SpamFilter.h"
+#include "gui/wxOptionsPage.h"
+
extern "C"
{
@@ -82,4 +84,6 @@
const String& param,
String *result);
+ virtual const wxChar *GetOptionPageIconName() const { return _T("dspam"); }
+ virtual wxOptionsPage *CreateOptionPage(wxListOrNoteBook *notebook) const;
private:
@@ -240,2 +244,58 @@
}
+// ----------------------------------------------------------------------------
+// DspamFilter user-configurable options
+// ----------------------------------------------------------------------------
+
+enum
+{
+ DspamPageField_Help,
+ DspamPageField_ShowStats,
+ DspamPageField_Max
+};
+
+wxOptionsPage *DspamFilter::CreateOptionPage(wxListOrNoteBook *notebook) const
+{
+ static const wxOptionsPage::FieldInfo s_fields[] =
+ {
+ {
+ gettext_noop("This page allows you to configure DSPAM,\n"
+ "a powerful statistical hybrid anti-spam filter."),
+ wxOptionsPage::Field_Message,
+ -1
+ },
+ {
+ gettext_noop("Show &statistics"),
+ wxOptionsPage::Field_SubDlg,
+ -1
+ },
+ };
+
+ wxCOMPILE_TIME_ASSERT2( WXSIZEOF(s_fields) == DspamPageField_Max,
+ FieldsNotInSync, DspamFields );
+
+
+ static const ConfigValueDefault s_values[] =
+ {
+ ConfigValueNone(),
+ ConfigValueNone(),
+ };
+
+ wxCOMPILE_TIME_ASSERT2( WXSIZEOF(s_fields) == DspamPageField_Max,
+ ValuesNotInSync, DspamValues );
+
+
+ return new wxOptionsPageDynamic
+ (
+ notebook,
+ gettext_noop("DSPAM"),
+ mApplication->GetProfile(),
+ s_fields,
+ s_values,
+ DspamPageField_Max,
+ 0, // offset
+ -1, // help id
+ notebook->GetPageCount() // image id
+ );
+}
+
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates