Actually encrypt passwords before storing them
[claws.git] / src / plugins / vcalendar / plugin.c
index 023620b..575181d 100644 (file)
 #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;
 
@@ -47,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;
 }