Remove source(), it has been removed from webkit2gtk
[surf.git] / surf.c
diff --git a/surf.c b/surf.c
index 0d7037a..724fcf3 100644 (file)
--- a/surf.c
+++ b/surf.c
@@ -17,7 +17,7 @@
 #include <limits.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include <webkit/webkit.h>
+#include <webkit2/webkit2.h>
 #include <glib/gstdio.h>
 #include <JavaScriptCore/JavaScript.h>
 #include <sys/file.h>
@@ -104,7 +104,6 @@ static Client *clients = NULL;
 static Window embed = 0;
 static gboolean showxid = FALSE;
 static char winid[64];
-static gboolean usingproxy = 0;
 static char togglestat[9];
 static char pagestat[3];
 static GTlsDatabase *tlsdb;
@@ -198,7 +197,6 @@ static void scroll(GtkAdjustment *a, const Arg *arg);
 static void setatom(Client *c, int a, const char *v);
 static void setup(void);
 static void sigchld(int unused);
-static void source(Client *c, const Arg *arg);
 static void spawn(Client *c, const Arg *arg);
 static void stop(Client *c, const Arg *arg);
 static void titlechange(WebKitWebView *view, GParamSpec *pspec, Client *c);
@@ -1292,9 +1290,7 @@ void
 setup(void)
 {
        int i;
-       char *proxy, *new_proxy;
        char *styledirfile, *stylepath;
-       SoupURI *puri;
        SoupSession *s;
        GError *error = NULL;
 
@@ -1365,21 +1361,6 @@ setup(void)
        }
        g_object_set(G_OBJECT(s), "tls-database", tlsdb, NULL);
        g_object_set(G_OBJECT(s), "ssl-strict", strictssl, NULL);
-
-       /* proxy */
-       if ((proxy = getenv("http_proxy")) && strcmp(proxy, "")) {
-               new_proxy = g_strrstr(proxy, "http://")
-                           || g_strrstr(proxy, "socks://")
-                           || g_strrstr(proxy, "socks4://")
-                           || g_strrstr(proxy, "socks5://")
-                           ? g_strdup(proxy)
-                           : g_strdup_printf("http://%s", proxy);
-               puri = soup_uri_new(new_proxy);
-               g_object_set(G_OBJECT(s), "proxy-uri", puri, NULL);
-               soup_uri_free(puri);
-               g_free(new_proxy);
-               usingproxy = 1;
-       }
 }
 
 void
@@ -1390,17 +1371,6 @@ sigchld(int unused)
        while (0 < waitpid(-1, NULL, WNOHANG));
 }
 
-void
-source(Client *c, const Arg *arg)
-{
-       Arg a = { .b = FALSE };
-       gboolean s;
-
-       s = webkit_web_view_get_view_source_mode(c->view);
-       webkit_web_view_set_view_source_mode(c->view, !s);
-       reload(c, &a);
-}
-
 void
 spawn(Client *c, const Arg *arg)
 {
@@ -1584,8 +1554,7 @@ getpagestat(Client *c)
        else
                pagestat[0] = '-';
 
-       pagestat[1] = usingproxy ? 'P' : '-';
-       pagestat[2] = '\0';
+       pagestat[1] = '\0';
 }
 
 void