CVS: sylpheedclaws/sylpheed-claws/src/plugins/bogofilter bogofilter.c,1.1.2.18,1.1.2.19

[email protected] Fri, 15 Dec 2006 16:41:03 +0000
Newsgroups gmane.mail.sylpheed.claws.cvs
Message-ID <[email protected]>
Update of /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/plugins/bogofilter
In directory sunsite.dk:/tmp/cvs-serv8976/src/plugins/bogofilter

Modified Files:
      Tag: gtk2
	bogofilter.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: bogofilter.c
===================================================================
RCS file: /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/plugins/bogofilter/Attic/bogofilter.c,v
retrieving revision 1.1.2.18
retrieving revision 1.1.2.19
diff -u -d -r1.1.2.18 -r1.1.2.19
--- bogofilter.c	2006/12/15 15:34:52	1.1.2.18
+++ bogofilter.c	2006/12/15 16:41:00	1.1.2.19
@@ -73,6 +73,8 @@
 #include <pwd.h>
 #endif
 
+#define PLUGIN_NAME (_("Bogofilter"))
+
 static guint hook_id = -1;
 static MessageCallback message_callback;
 
@@ -759,16 +761,10 @@
 	gchar *rcpath;
 
 	hook_id = -1;
-
-	if ((claws_get_version() > VERSION_NUMERIC)) {
-		*error = g_strdup(_("Your version of Claws Mail is newer than the version the Bogofilter 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 Bogofilter plugin"));
+	if (!check_plugin_version(MAKE_NUMERIC_VERSION(0, 9, 3, 86),
+				VERSION_NUMERIC, PLUGIN_NAME, error))
 		return -1;
-	}
 
 	prefs_set_default(param);
 	rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMON_RC, NULL);
@@ -811,7 +807,7 @@
 
 const gchar *plugin_name(void)
 {
-	return _("Bogofilter");
+	return PLUGIN_NAME;
 }
 
 const gchar *plugin_desc(void)