CVS: sylpheedclaws/sylpheed-claws/src/plugins/clamav clamav_plugin.c,1.13.2.27,1.13.2.28
[email protected] Fri, 15 Dec 2006 16:41:05 +0000
| Newsgroups | gmane.mail.sylpheed.claws.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/plugins/clamav
In directory sunsite.dk:/tmp/cvs-serv8976/src/plugins/clamav
Modified Files:
Tag: gtk2
clamav_plugin.c
Log Message:
2006-12-15 [wwp] 2.6.1cvs40
* src/wizard.c
* src/common/plugin.c
* src/common/plugin.h
* src/gtk/about.c
* src/plugins/bogofilter/bogofilter.c
* src/plugins/clamav/clamav_plugin.c
* src/plugins/demo/demo.c
* src/plugins/dillo_viewer/dillo_viewer.c
* src/plugins/pgpcore/plugin.c
* src/plugins/pgpinline/plugin.c
* src/plugins/pgpmime/plugin.c
* src/plugins/spamassassin/spamassassin.c
* src/plugins/trayicon/trayicon.c
factorize some translatable strings (plugins-related),
fix missing punctuation in several places,
remove useless translatable \n in about.c,
and factorize plugin init code w/ a new function
check_plugin_version() in common/plugin.c.
Patch by Fabien Vantard <[email protected]>.
Index: clamav_plugin.c
===================================================================
RCS file: /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/plugins/clamav/clamav_plugin.c,v
retrieving revision 1.13.2.27
retrieving revision 1.13.2.28
diff -u -d -r1.13.2.27 -r1.13.2.28
--- clamav_plugin.c 2006/11/27 08:07:01 1.13.2.27
+++ clamav_plugin.c 2006/12/15 16:41:01 1.13.2.28
@@ -40,6 +40,8 @@
#include "clamav_plugin.h"
+#define PLUGIN_NAME (_("Clam AntiVirus"))
+
static guint hook_id;
static MessageCallback message_callback;
@@ -193,16 +195,10 @@
gchar *rcpath;
int ret;
unsigned int no;
-
- if ((claws_get_version() > VERSION_NUMERIC)) {
- *error = g_strdup(_("Your version of Claws Mail is newer than the version the ClamAV plugin was built with"));
- return -1;
- }
- if ((claws_get_version() < MAKE_NUMERIC_VERSION(0, 9, 3, 86))) {
- *error = g_strdup(_("Your version of Claws Mail is too old for the ClamAV plugin"));
+ if (!check_plugin_version(MAKE_NUMERIC_VERSION(0, 9, 3, 86),
+ VERSION_NUMERIC, PLUGIN_NAME, error))
return -1;
- }
hook_id = hooks_register_hook(MAIL_FILTERING_HOOKLIST, mail_filtering_hook, NULL);
if (hook_id == -1) {
@@ -249,7 +245,7 @@
const gchar *plugin_name(void)
{
- return _("Clam AntiVirus");
+ return PLUGIN_NAME;
}
const gchar *plugin_desc(void)