talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit abf4b98214ac7a744899c0c2b7d42d95577ce56d
parent a0fbaacf1748f052cedcf34b213e1bad005ac213
Author: Holger Berndt <hb@claws-mail.org>
Date:   Tue,  3 Jan 2017 11:20:11 +0100

GData plugin: Require libgdata at least 0.17.2

Version 0.17.2 is required for auth token save/restore accross restarts.
Without this functionality, the plugin has such bad usability, it's not
worth maintaining. This also fixes the previous compile-error when only
0.17.1 was present.

Diffstat:
Mconfigure.ac | 2+-
Msrc/plugins/gdata/cm_gdata_contacts.c | 8--------
2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac @@ -1149,7 +1149,7 @@ AC_CHECK_LIB([archive], [archive_read_new], ) dnl libgdata ******************************************************************* -PKG_CHECK_MODULES(GDATA, libgdata >= 0.17.1, HAVE_GDATA=yes, HAVE_GDATA=no) +PKG_CHECK_MODULES(GDATA, libgdata >= 0.17.2, HAVE_GDATA=yes, HAVE_GDATA=no) AC_SUBST(GDATA_CFLAGS) AC_SUBST(GDATA_LIBS) diff --git a/src/plugins/gdata/cm_gdata_contacts.c b/src/plugins/gdata/cm_gdata_contacts.c @@ -485,7 +485,6 @@ static void cm_gdata_interactive_auth() } -#if GDATA_CHECK_VERSION(0,17,2) static void cm_gdata_refresh_ready(GDataOAuth2Authorizer *auth, GAsyncResult *res, gpointer data) { GError *error = NULL; @@ -510,7 +509,6 @@ static void cm_gdata_refresh_ready(GDataOAuth2Authorizer *auth, GAsyncResult *re query_after_auth(); } -#endif /* returns allocated string which must be freed */ @@ -570,7 +568,6 @@ static void query() } else if(!gdata_service_is_authorized(GDATA_SERVICE(service))) { -#if GDATA_CHECK_VERSION(0,17,2) /* Try to restore from saved refresh token.*/ if((token = passwd_store_get(PWS_PLUGIN, "GData", GDATA_TOKEN_PWD_STRING)) != NULL) { @@ -584,9 +581,6 @@ static void query() { cm_gdata_interactive_auth(); } -#else - cm_gdata_interactive_auth(); -#endif } else { @@ -652,7 +646,6 @@ void cm_gdata_contacts_done(void) if(authorizer) { -#if GDATA_CHECK_VERSION(0,17,2) /* store refresh token */ pass = gdata_oauth2_authorizer_dup_refresh_token(authorizer); passwd_store_set(PWS_PLUGIN, "GData", GDATA_TOKEN_PWD_STRING, pass, FALSE); @@ -661,7 +654,6 @@ void cm_gdata_contacts_done(void) g_free(pass); } passwd_store_write_config(); -#endif g_object_unref(G_OBJECT(authorizer)); authorizer = NULL;