2006-12-26 [wwp] 2.6.1cvs70
[claws.git] / src / plugins / pgpinline / plugin.c
index 437965444eec8789d19e2b6ee650558efcc1fa8d..b1a093139fdbf4731f48191c706362296d7000fa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
+ * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #include <glib.h>
 #include <glib/gi18n.h>
 
-#include "sylpheed.h"
 #include "version.h"
 #include "pgpinline.h"
+#include "plugin.h"
+
+#define PLUGIN_NAME (_("PGP/inline"))
 
 gint plugin_init(gchar **error)
 {
-       if ((sylpheed_get_version() > VERSION_NUMERIC)) {
-               *error = g_strdup(_("Your version of Sylpheed-Claws is newer than the version the PGP/inline plugin was built with"));
-               return -1;
-       }
-
-       if ((sylpheed_get_version() < MAKE_NUMERIC_VERSION(2, 1, 0, 1))) {
-               *error = g_strdup(_("Your version of Sylpheed-Claws 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 @@ void plugin_done(void)
 
 const gchar *plugin_name(void)
 {
-       return _("PGP/inline");
+       return PLUGIN_NAME;
 }
 
 const gchar *plugin_desc(void)