* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#include "intl.h"
+#include "version.h"
+#include "sylpheed.h"
#include "plugin.h"
#include "utils.h"
#include "hooks.h"
gint plugin_init(gchar **error)
{
+ if ((sylpheed_get_version() > VERSION_NUMERIC)) {
+ *error = g_strdup("Your sylpheed version is never then the version the plugin was build with");
+ return -1;
+ }
+
+ if ((sylpheed_get_version() < MAKE_NUMERIC_VERSION(0, 8, 11, 39))) {
+ *error = g_strdup("Your sylpheed version is too old");
+ return -1;
+ }
+
hook_id = hooks_register_hook(LOG_APPEND_TEXT_HOOKLIST, my_log_hook, NULL);
if (hook_id == -1) {
*error = g_strdup("Failed to register log text hook");
return _("This Plugin is only a demo of how to write plugins for Sylpheed. "
"It installs a hook for new log output and writes it to stdout."
"\n\n"
- "It is not really usefull");
+ "It is not really useful");
}
const gchar *plugin_type(void)