Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21868/src/gui
Modified Files:
wxSpamOptions.cpp
Log Message:
added spam test for executable attachments
Index: wxSpamOptions.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxSpamOptions.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -b -u -2 -r1.13 -r1.14
--- wxSpamOptions.cpp 15 Mar 2004 23:19:32 -0000 1.13
+++ wxSpamOptions.cpp 15 May 2004 16:42:11 -0000 1.14
@@ -167,4 +167,14 @@
};
+class SpamOptionExeAttach : public SpamOption
+{
+ virtual bool DefaultValue() const { return true; }
+ virtual const wxChar *Token() const
+ { return SPAM_TEST_EXECUTABLE_ATTACHMENT; }
+ virtual const wxChar *ProfileHackName() const
+ { return _T("SpamExeAttachment"); }
+ virtual const wxChar *Title() const
+ { return gettext_noop("E&xecutable attachment"); }
+};
class SpamOptionXAuth : public SpamOption
@@ -293,4 +303,7 @@
SpamOption *PickKorean() { return &m_checkKorean; }
+ SpamOptionExeAttach m_checkExeAttach;
+ SpamOption *PickExeAttach() { return &m_checkExeAttach; }
+
SpamOptionXAuth m_checkXAuthWarn;
SpamOption *PickXAuthWarn() { return &m_checkXAuthWarn; }
@@ -346,4 +359,5 @@
&SpamOptionManagerBody::PickJunkSubject,
&SpamOptionManagerBody::PickKorean,
+ &SpamOptionManagerBody::PickExeAttach,
&SpamOptionManagerBody::PickXAuthWarn,
&SpamOptionManagerBody::PickReceived,
@@ -404,16 +418,20 @@
const wxString& actual = tests[token];
- for ( SpamOptionManagerBody::Iterator option(this);
- !option.IsEnd(); ++option )
+ SpamOptionManagerBody::Iterator option(this);
+ while ( !option.IsEnd() )
{
if ( actual == option->Token() )
{
option->m_active = true;
- goto found;
+ break;
+ }
+
+ ++option;
}
+
+ if ( option.IsEnd() )
+ {
+ FAIL_MSG(String::Format(_T("Unknown spam test \"%s\""), actual.c_str()));
}
- wxLogDebug(_T("Unknown spam test \"%s\""), actual.c_str());
-found:
- ;
}
}
@@ -513,5 +531,5 @@
const wxOptionsPageDesc page(
// title and image
- gettext_noop("Details of spam detection"),
+ gettext_noop("Spam tests"),
_T("spam"),
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates