[evolution] Bug #582780 - Use proxy in Google calendar setup plugin
- From: Milan Crha <mcrha src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution] Bug #582780 - Use proxy in Google calendar setup plugin
- Date: Thu, 10 Sep 2009 18:30:40 +0000 (UTC)
commit cd230e5a214099cea4b1a118848364b4b2cb258d
Author: Alexander Klepikov <klepikov alex+bugs gmail com>
Date: Thu Sep 10 20:31:39 2009 +0200
Bug #582780 - Use proxy in Google calendar setup plugin
plugins/google-account-setup/google-source.c | 20 ++++++++++++++++++++
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 1dc76a0..9452422 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]