[Commits] [SCM] claws branch, master, updated. 3.11.1-176-g4e67def

holger at claws-mail.org holger at claws-mail.org
Sun Jun 28 10:01:43 CEST 2015


The branch, master has been updated
       via  4e67def9e4c58a5f46e0ba01fa38264a9b8693f8 (commit)
      from  016e2b04824b444aa8941544179b8fd801e83d67 (commit)

Summary of changes:
 configure.ac                          |    2 +-
 src/plugins/gdata/cm_gdata_contacts.c |   12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit 4e67def9e4c58a5f46e0ba01fa38264a9b8693f8
Author: Holger Berndt <hb at claws-mail.org>
Date:   Fri Jun 26 00:08:33 2015 +0200

    GData plugin: Make it possible to compile with libgdata 0.17.1
    
    This version of libgdata does not yet support cold start, but
    has the advantage that it's already released. For an acceptable
    user experience, it's still required to have a more recent
    libgdata version.

diff --git a/configure.ac b/configure.ac
index 716a753..d8e3260 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1114,7 +1114,7 @@ AC_CHECK_LIB([archive], [archive_read_new],
 		       )
 
 dnl libgdata *******************************************************************
-PKG_CHECK_MODULES(GDATA, libgdata >= 0.17.2, HAVE_GDATA=yes, HAVE_GDATA=no)
+PKG_CHECK_MODULES(GDATA, libgdata >= 0.17.1, 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
index 00289d3..b6f39ff 100644
--- a/src/plugins/gdata/cm_gdata_contacts.c
+++ b/src/plugins/gdata/cm_gdata_contacts.c
@@ -480,6 +480,7 @@ 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;
@@ -502,6 +503,8 @@ static void cm_gdata_refresh_ready(GDataOAuth2Authorizer *auth, GAsyncResult *re
 
   query_after_auth();
 }
+#endif
+
 
 /* returns allocated string which must be freed */
 static guchar* decode(const gchar *in)
@@ -514,6 +517,7 @@ static guchar* decode(const gchar *in)
   return tmp;
 }
 
+
 static void query()
 {
   if(cm_gdata_contacts_query_running)
@@ -524,8 +528,6 @@ static void query()
 
   if(!authorizer)
   {
-    GError *error = NULL;
-
     gchar *c1 = decode(GDATA_C1);
     gchar *c2 = decode(GDATA_C2);
     gchar *c3 = decode(GDATA_C3);
@@ -546,6 +548,7 @@ static void query()
 
   if(!gdata_service_is_authorized(GDATA_SERVICE(service)))
   {
+#if GDATA_CHECK_VERSION(0,17,2)
     /* Try to restore from saved refresh token.*/
     if(cm_gdata_config.oauth2_refresh_token)
     {
@@ -557,6 +560,9 @@ static void query()
     {
       cm_gdata_interactive_auth();
     }
+#else
+    cm_gdata_interactive_auth();
+#endif
   }
   else
   {
@@ -620,8 +626,10 @@ void cm_gdata_contacts_done(void)
 
   if(authorizer)
   {
+#if GDATA_CHECK_VERSION(0,17,2)
     /* store refresh token */
     cm_gdata_config.oauth2_refresh_token = gdata_oauth2_authorizer_dup_refresh_token(authorizer);
+#endif
 
     g_object_unref(G_OBJECT(authorizer));
     authorizer = NULL;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list