2011-07-30 [mir] 3.7.9cvs38
[claws.git] / src / plugins / pgpmime / plugin.c
index a9a63639372eca8bd645497c48ea46dc54919b0c..f1b271b6f20978d0e160d0210dbd16e379a3bda4 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2011 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
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -13,8 +13,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 
  */
 
 #ifdef HAVE_CONFIG_H
 #include <glib/gi18n.h>
 
 #include "version.h"
-#include "common/sylpheed.h"
+#include "common/claws.h"
 #include "pgpmime.h"
+#include "plugin.h"
+
+#define PLUGIN_NAME (_("PGP/MIME"))
 
 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/MIME 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/MIME plugin"));
+       if (!check_plugin_version(MAKE_NUMERIC_VERSION(2,9,2,72),
+                               VERSION_NUMERIC, PLUGIN_NAME, error))
                return -1;
-       }
 
        pgpmime_init();
 
        return 0;       
 }
 
-void plugin_done(void)
+gboolean plugin_done(void)
 {
        pgpmime_done();
+       return TRUE;
 }
 
 const gchar *plugin_name(void)
 {
-       return _("PGP/MIME");
+       return PLUGIN_NAME;
 }
 
 const gchar *plugin_desc(void)
@@ -78,7 +76,7 @@ const gchar *plugin_type(void)
 
 const gchar *plugin_licence(void)
 {
-       return "GPL";
+       return "GPL3+";
 }
 
 const gchar *plugin_version(void)