aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorAlexander Klepikov <klepikov.alex+bugs@gmail.com>2009-09-11 02:31:39 +0800
committerMilan Crha <mcrha@redhat.com>2009-09-11 02:31:39 +0800
commitcd230e5a214099cea4b1a118848364b4b2cb258d (patch)
treeabf8b50a30cc819f5a1e19a3577066cf46a60f37 /plugins
parent881792fadc8a200acd193369f842e46aef0e56e5 (diff)
downloadgsoc2013-evolution-cd230e5a214099cea4b1a118848364b4b2cb258d.tar
gsoc2013-evolution-cd230e5a214099cea4b1a118848364b4b2cb258d.tar.gz
gsoc2013-evolution-cd230e5a214099cea4b1a118848364b4b2cb258d.tar.bz2
gsoc2013-evolution-cd230e5a214099cea4b1a118848364b4b2cb258d.tar.lz
gsoc2013-evolution-cd230e5a214099cea4b1a118848364b4b2cb258d.tar.xz
gsoc2013-evolution-cd230e5a214099cea4b1a118848364b4b2cb258d.tar.zst
gsoc2013-evolution-cd230e5a214099cea4b1a118848364b4b2cb258d.zip
Bug #582780 - Use proxy in Google calendar setup plugin
Diffstat (limited to 'plugins')
-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 1dc76a0431..9452422902 100644
--- a/plugins/google-account-setup/google-source.c
+++ b/plugins/google-account-setup/google-source.c
@@ -40,6 +40,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>
@@ -472,6 +473,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;
@@ -514,6 +533,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);