/*
* 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();
const gchar *plugin_name(void)
{
- return _("PGP/inline");
+ return PLUGIN_NAME;
}
const gchar *plugin_desc(void)