Actually encrypt passwords before storing them
[claws.git] / src / plugins / vcalendar / plugin.c
index ce28372..575181d 100644 (file)
@@ -23,7 +23,6 @@
 #include "claws-features.h"
 #endif
 
-#include <stddef.h>
 #include <glib.h>
 #include <glib/gi18n.h>
 
 #include "plugin.h"
 
 #include "vcal_dbus.h"
+#include "vcal_prefs.h"
 
 gint plugin_init(gchar **error)
 {
-       if (!check_plugin_version(MAKE_NUMERIC_VERSION(3,8,1,46),
+       if (!check_plugin_version(MAKE_NUMERIC_VERSION(3,13,2,39),
                                VERSION_NUMERIC, _("vCalendar"), error))
                return -1;
 
@@ -48,15 +48,18 @@ gint plugin_init(gchar **error)
 
        curl_global_init(CURL_GLOBAL_DEFAULT);
        vcalendar_init();
-       connect_dbus();
+       if (vcalprefs.calendar_server)
+               connect_dbus();
 
-       return 0;       
+       return 0;
 }
 
 gboolean plugin_done(void)
 {
-       disconnect_dbus();
+       if (vcalprefs.calendar_server)
+               disconnect_dbus();
        vcalendar_done();
+
        return TRUE;
 }