[evolution] EShell: Configure WebKit's default SoupSession.



commit 42f71a3b0ea0e3ccbc52bafb84433d7271a16479
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue Nov 26 12:40:05 2013 -0500

    EShell: Configure WebKit's default SoupSession.
    
    Configure WebKit's default SoupSession to honor our proxy settings.

 shell/e-shell.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/shell/e-shell.c b/shell/e-shell.c
index ee30d5c..30ab029 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -788,6 +788,7 @@ shell_initable_init (GInitable *initable,
        GApplication *application = G_APPLICATION (initable);
        EShell *shell = E_SHELL (initable);
        ESourceRegistry *registry;
+       ESource *proxy_source;
        gulong handler_id;
 
        shell_add_actions (application);
@@ -807,6 +808,17 @@ shell_initable_init (GInitable *initable,
                G_CALLBACK (shell_backend_died_cb), shell);
        shell->priv->backend_died_handler_id = handler_id;
 
+       /* Configure WebKit's default SoupSession. */
+
+       proxy_source = e_source_registry_ref_builtin_proxy (registry);
+
+       g_object_set (
+               webkit_get_default_session (),
+               SOUP_SESSION_PROXY_RESOLVER,
+               G_PROXY_RESOLVER (proxy_source),
+               NULL);
+
+       g_object_unref (proxy_source);
        g_object_unref (registry);
 
        return TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]