aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2011-06-14 15:21:27 +0800
committerMilan Crha <mcrha@redhat.com>2011-06-14 15:21:27 +0800
commit810b301080ba5e47af062494e6d2b98f884953b2 (patch)
tree94dedab4dec11da4955a18781a800780fcfebfb2 /plugins
parent38790d8478e906a5c59d0c4a5216f297f305bfeb (diff)
downloadgsoc2013-evolution-810b301080ba5e47af062494e6d2b98f884953b2.tar
gsoc2013-evolution-810b301080ba5e47af062494e6d2b98f884953b2.tar.gz
gsoc2013-evolution-810b301080ba5e47af062494e6d2b98f884953b2.tar.bz2
gsoc2013-evolution-810b301080ba5e47af062494e6d2b98f884953b2.tar.lz
gsoc2013-evolution-810b301080ba5e47af062494e6d2b98f884953b2.tar.xz
gsoc2013-evolution-810b301080ba5e47af062494e6d2b98f884953b2.tar.zst
gsoc2013-evolution-810b301080ba5e47af062494e6d2b98f884953b2.zip
Bug #652394 - Port google-account-setup plugin to libgdata 0.9.0
Diffstat (limited to 'plugins')
-rw-r--r--plugins/google-account-setup/google-source.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/google-account-setup/google-source.c b/plugins/google-account-setup/google-source.c
index 1fce9858b8..1e54362c0d 100644
--- a/plugins/google-account-setup/google-source.c
+++ b/plugins/google-account-setup/google-source.c
@@ -418,6 +418,9 @@ static void
retrieve_list_clicked (GtkButton *button, GtkComboBox *combo)
{
ESource *source;
+ #ifdef HAVE_LIBGDATA_0_9
+ GDataClientLoginAuthorizer *authorizer;
+ #endif
GDataCalendarService *service;
GDataFeed *feed;
gchar *user, *password, *tmp;
@@ -448,8 +451,14 @@ retrieve_list_clicked (GtkButton *button, GtkComboBox *combo)
return;
}
+ #ifdef HAVE_LIBGDATA_0_9
+ authorizer = gdata_client_login_authorizer_new ("evolution-client-0.1.0", GDATA_TYPE_CALENDAR_SERVICE);
+ service = gdata_calendar_service_new (GDATA_AUTHORIZER (authorizer));
+ if (!gdata_client_login_authorizer_authenticate (authorizer, user, password, NULL, &error)) {
+ #else
service = gdata_calendar_service_new ("evolution-client-0.1.0");
if (!gdata_service_authenticate (GDATA_SERVICE (service), user, password, NULL, &error)) {
+ #endif
/* Error! */
claim_error (parent, error->message);
g_error_free (error);
@@ -559,6 +568,9 @@ retrieve_list_clicked (GtkButton *button, GtkComboBox *combo)
}
g_object_unref (service);
+ #ifdef HAVE_LIBGDATA_0_9
+ g_object_unref (authorizer);
+ #endif
g_free (user);
}