aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Klepikov <klepikov.alex+bugs@gmail.com>2009-09-11 02:34:18 +0800
committerMilan Crha <mcrha@redhat.com>2009-09-11 02:34:18 +0800
commit2956f9d3dd5cded214aa0efc05eb0ba3e275f4b9 (patch)
tree7e6b06fe0e4348c3883654a920a351f1a0de0d66
parent5b7c1c4e891f5a8f2bc5ef3490e6701e8a36e2c3 (diff)
downloadgsoc2013-evolution-2956f9d3dd5cded214aa0efc05eb0ba3e275f4b9.tar
gsoc2013-evolution-2956f9d3dd5cded214aa0efc05eb0ba3e275f4b9.tar.gz
gsoc2013-evolution-2956f9d3dd5cded214aa0efc05eb0ba3e275f4b9.tar.bz2
gsoc2013-evolution-2956f9d3dd5cded214aa0efc05eb0ba3e275f4b9.tar.lz
gsoc2013-evolution-2956f9d3dd5cded214aa0efc05eb0ba3e275f4b9.tar.xz
gsoc2013-evolution-2956f9d3dd5cded214aa0efc05eb0ba3e275f4b9.tar.zst
gsoc2013-evolution-2956f9d3dd5cded214aa0efc05eb0ba3e275f4b9.zip
Bug #582780 - Use proxy in Google calendar setup plugin
-rw-r--r--plugins/google-account-setup/google-source.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/google-account-setup/google-source.c b/plugins/google-account-setup/google-source.c
index 2a8b6c46e5..af83b4f925 100644
--- a/plugins/google-account-setup/google-source.c
+++ b/plugins/google-account-setup/google-source.c
@@ -41,6 +41,7 @@
#include <libedataserver/e-url.h>
#include <libedataserver/e-account-list.h>
+#include <libedataserver/e-proxy.h>
#include <libecal/e-cal.h>
#include <libedataserverui/e-cell-renderer-color.h>
#include <libedataserverui/e-passwords.h>
@@ -473,6 +474,24 @@ claim_error (GtkWindow *parent, const gchar *error)
}
static void
+update_proxy_settings (GDataService *service, const gchar *uri)
+{
+ EProxy *proxy;
+ SoupURI *proxy_uri = NULL;
+
+ proxy = e_proxy_new ();
+ e_proxy_setup_proxy (proxy);
+
+ /* use proxy if necessary */
+ if (e_proxy_require_proxy_for_uri (proxy, uri)) {
+ proxy_uri = e_proxy_peek_uri_for (proxy, uri);
+ }
+
+ gdata_service_set_proxy (service, proxy_uri);
+ g_object_unref (proxy);
+}
+
+static void
retrieve_list_clicked (GtkButton *button, GtkComboBox *combo)
{
ESource *source;
@@ -515,6 +534,7 @@ retrieve_list_clicked (GtkButton *button, GtkComboBox *combo)
ssl = e_source_get_property (source, "ssl");
get_subscribed_url = g_strconcat ((!ssl || g_str_equal (ssl, "1")) ? "https" : "http", URL_GET_SUBSCRIBED_CALENDARS, NULL);
+ update_proxy_settings (GDATA_SERVICE (service), get_subscribed_url);
feed = gdata_service_get_feed (GDATA_SERVICE (service), get_subscribed_url, &error);
g_free (get_subscribed_url);