CVS: sylpheedclaws/sylpheed-claws/src/plugins/pgpinline plugin.c,1.1.2.12,1.1.2.13

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

Modified Files:
      Tag: gtk2
	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: plugin.c
===================================================================
RCS file: /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/plugins/pgpinline/Attic/plugin.c,v
retrieving revision 1.1.2.12
retrieving revision 1.1.2.13
diff -u -d -r1.1.2.12 -r1.1.2.13
--- plugin.c	2006/11/27 08:07:13	1.1.2.12
+++ plugin.c	2006/12/15 16:41:07	1.1.2.13
@@ -30,17 +30,13 @@
 #include "version.h"
 #include "pgpinline.h"
 
+#define PLUGIN_NAME (_("PGP/inline"))
+
 gint plugin_init(gchar **error)
 {
-	if ((claws_get_version() > VERSION_NUMERIC)) {
-		*error = g_strdup(_("Your version of Claws Mail is newer than the version the PGP/inline plugin was built with"));
-		return -1;
-	}
-
-	if ((claws_get_version() < MAKE_NUMERIC_VERSION(2, 1, 0, 1))) {
-		*error = g_strdup(_("Your version of Claws Mail is too old for the PGP/inline plugin"));
-		return -1;
-	}
+	if (!check_plugin_version(MAKE_NUMERIC_VERSION(2, 1, 0, 1),
+				VERSION_NUMERIC, PLUGIN_NAME, error))
+  		return -1;
 
 	pgpinline_init();
 
@@ -54,7 +50,7 @@
 
 const gchar *plugin_name(void)
 {
-	return _("PGP/inline");
+	return PLUGIN_NAME;
 }
 
 const gchar *plugin_desc(void)