#include "main.h"
#include "mainwindow.h"
#include "addr_compl.h"
+#include "passwordstore.h"
#include "cm_gdata_contacts.h"
#include "cm_gdata_prefs.h"
gchar *rcpath;
/* Version check */
- if(!check_plugin_version(MAKE_NUMERIC_VERSION(3,7,1,55),
+ if(!check_plugin_version(MAKE_NUMERIC_VERSION(3,13,2,39),
VERSION_NUMERIC, _("GData"), error))
return -1;
prefs_read_config(cm_gdata_param, "GDataPlugin", rcpath, NULL);
g_free(rcpath);
+ /* If the refresh token is still stored in config, save it to
+ * password store. */
+ if(cm_gdata_config.oauth2_refresh_token != NULL) {
+ passwd_store_set(PWS_PLUGIN, "GData", GDATA_TOKEN_PWD_STRING,
+ cm_gdata_config.oauth2_refresh_token, FALSE);
+ passwd_store_write_config();
+ }
+
cm_gdata_prefs_init();
debug_print("GData plugin loaded\n");