[evolution-rss] correct soup cookie jar requirements; fix dataserver requirements
- From: Lucian Langa <lucilanga src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution-rss] correct soup cookie jar requirements; fix dataserver requirements
- Date: Tue, 25 Aug 2009 14:58:37 +0000 (UTC)
commit 9e8f823dce025b11c9d8da8cacf6dd57aea98484
Author: Lucian Langa <lucilanga gnome org>
Date: Tue Aug 25 17:58:27 2009 +0300
correct soup cookie jar requirements; fix dataserver requirements
src/network-soup.c | 10 ++++++++++
src/rss-config-factory.c | 12 +++++++++++-
src/rss.c | 6 +++++-
3 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/src/network-soup.c b/src/network-soup.c
index 57d11c4..9952858 100644
--- a/src/network-soup.c
+++ b/src/network-soup.c
@@ -217,8 +217,13 @@ proxify_webkit_session(EProxy *proxy, gchar *uri)
#endif
case 2:
if (e_proxy_require_proxy_for_uri (proxy, uri)) {
+#if (DATASERVER_VERSION >=2026000)
proxy_uri = e_proxy_peek_uri_for (proxy, uri);
d(g_print("webkit proxified %s with %s:%d\n", uri, proxy_uri->host, proxy_uri->port));
+#else
+ g_print("WARN: e_proxy_peek_uri_for() requires evolution-data-server 2.26\n");
+ return;
+#endif
} else
d(g_print("webkit no PROXY-%s\n", uri));
break;
@@ -245,7 +250,12 @@ proxify_session(EProxy *proxy, SoupSession *session, gchar *uri)
#endif
case 2:
if (e_proxy_require_proxy_for_uri (proxy, uri)) {
+#if (DATASERVER_VERSION >=2026000)
proxy_uri = e_proxy_peek_uri_for (proxy, uri);
+#else
+ g_print("WARN: e_proxy_peek_uri_for() requires evolution-data-server 2.26\n");
+ return;
+#endif
if (proxy_uri)
d(g_print("proxified %s with %s:%d\n", uri, proxy_uri->host, proxy_uri->port));
} else
diff --git a/src/rss-config-factory.c b/src/rss-config-factory.c
index 78c4b7c..0e0fa77 100644
--- a/src/rss-config-factory.c
+++ b/src/rss-config-factory.c
@@ -1820,7 +1820,11 @@ inject_cookie(SoupCookie *cookie, GtkProgressBar *progress)
text = g_strdup_printf(_("%2.0f%% done"), fr);
gtk_progress_bar_set_text(progress, text);
g_free(text);
+#if LIBSOUP_VERSION > 2026000
soup_cookie_jar_add_cookie(rss_soup_jar, cookie);
+#else
+ g_print("WARN: soup_cookie_jar_add_cookie() requires libsoup 2.26\n");
+#endif
while (gtk_events_pending ())
gtk_main_iteration ();
}
@@ -1831,7 +1835,13 @@ process_cookies(SoupCookieJar *jar)
{
ccurrent = 0;
ctotal = 0;
- GSList *list = soup_cookie_jar_all_cookies(jar);
+ GSList *list = NULL;
+#if LIBSOUP_VERSION > 2026000
+ list = soup_cookie_jar_all_cookies(jar);
+#else
+ g_print("WARN: soup_cookie_jar_all_cookies() requires libsoup 2.26\n");
+ return;
+#endif
gchar *msg = g_strdup(_("Importing cookies..."));
GtkWidget *import_dialog = e_error_new(NULL, "shell:importing", msg, NULL);
gtk_window_set_keep_above(GTK_WINDOW(import_dialog), TRUE);
diff --git a/src/rss.c b/src/rss.c
index 727916b..6167c9e 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -1479,14 +1479,18 @@ gecko_set_preferences(void)
gecko_prefs_set_int("browser.ssl_override_behaviour", 2);
gecko_prefs_set_bool("browser.xul.error_pages.enabled", FALSE);
g_free(agstr);
-#if (DATASERVER_VERSION >= 2023001)
+#if (DATASERVER_VERSION >= 2026000)
//I'm only forcing scheme here
uri = e_proxy_peek_uri_for(proxy, "http:///");
+
if (uri) {
gecko_prefs_set_string("network.proxy.http", uri->host);
gecko_prefs_set_int("network.proxy.http_port", uri->port);
gecko_prefs_set_int("network.proxy.type", 1);
}
+#else
+ g_print("WARN e_proxy_peek_uri_for() requires evolution-data-server 2.26\n");
+ return;
#endif
// soup_uri_free(uri);
// uri = e_proxy_peek_uri_for(proxy, "https:///");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]