[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Fri, 30 Oct 2009 17:31:26 +0000 (UTC)

changeset: 350:3d0063bb0169
tag: tip
user: Evan Gates <evan.gates_AT_gmail.com>
date: Fri Oct 30 10:31:19 2009 -0700
files: surf.suckless.org/patches/surf-0.3-agent.diff surf.suckless.org/patches/surf-2998ef786732-agent.diff surf.suckless.org/patches/useragent.md
description:
useragent patch for surf 0.3 (no real change, just the name, didn't think we'd get a release that quickly), and a small typo fix


diff -r 6df929a36b66 -r 3d0063bb0169 surf.suckless.org/patches/surf-0.3-agent.diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/surf.suckless.org/patches/surf-0.3-agent.diff Fri Oct 30 10:31:19 2009 -0700
_AT_@ -0,0 +1,67 @@
+diff -r 46d516fd2167 config.def.h
+--- a/config.def.h Fri Oct 30 13:38:14 2009 +0100
++++ b/config.def.h Fri Oct 30 10:26:39 2009 -0700
+_AT_@ -29,6 +29,7 @@
+ { MODKEY, GDK_k, scroll, { .i = -1 } },
+ { 0, GDK_Escape, stop, { 0 } },
+ { MODKEY, GDK_o, source, { 0 } },
++ { MODKEY, GDK_a, spawn, SETPROP("_SURF_AGENT") },
+ { MODKEY, GDK_g, spawn, SETPROP("_SURF_URI") },
+ { MODKEY, GDK_slash, spawn, SETPROP("_SURF_FIND") },
+ { MODKEY, GDK_n, find, { .b = TRUE } },
+diff -r 46d516fd2167 surf.c
+--- a/surf.c Fri Oct 30 13:38:14 2009 +0100
++++ b/surf.c Fri Oct 30 10:26:39 2009 -0700
+_AT_@ -55,7 +55,7 @@
+ } Key;
+
+ static Display *dpy;
+-static Atom uriprop, findprop;
++static Atom uriprop, findprop, agentprop;
+ static SoupCookieJar *cookies;
+ static SoupSession *session;
+ static Client *clients = NULL;
+_AT_@ -119,6 +119,16 @@
+ /* configuration, allows nested code to access above variables */
+ #include "config.h"
+
++void
++agent(Client *c, const Arg *arg) {
++ const char *s;
++ WebKitWebSettings *settings;
++
++ s = getatom(c, agentprop);
++ settings = webkit_web_view_get_settings(c->view);
++ g_object_set(G_OBJECT(settings), "user-agent", s, NULL);
++}
++
+ char *
+ buildpath(const char *path) {
+ char *apath, *p;
+_AT_@ -537,6 +547,7 @@
+ g_object_set(G_OBJECT(settings), "user-stylesheet-uri", uri, NULL);
+ g_free(uri);
+ setatom(c, findprop, "");
++ setatom(c, agentprop, useragent);
+
+ c->download = NULL;
+ c->title = NULL;
+_AT_@ -605,6 +616,10 @@
+ arg.b = TRUE;
+ find(c, &arg);
+ }
++ else if(ev->atom == agentprop) {
++ arg.v = getatom(c, agentprop);
++ agent(c, &arg);
++ }
+ return GDK_FILTER_REMOVE;
+ }
+ }
+_AT_@ -692,6 +707,7 @@
+ session = webkit_get_default_session();
+ uriprop = XInternAtom(dpy, "_SURF_URI", False);
+ findprop = XInternAtom(dpy, "_SURF_FIND", False);
++ agentprop = XInternAtom(dpy, "_SURF_AGENT", False);
+
+ /* create dirs and files */
+ cookiefile = buildpath(cookiefile);
diff -r 6df929a36b66 -r 3d0063bb0169 surf.suckless.org/patches/surf-2998ef786732-agent.diff
--- a/surf.suckless.org/patches/surf-2998ef786732-agent.diff Fri Oct 30 10:15:20 2009 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
_AT_@ -1,67 +0,0 @@
-diff -r 2998ef786732 config.def.h
---- a/config.def.h Wed Oct 28 22:22:20 2009 +0100
-+++ b/config.def.h Wed Oct 28 15:14:59 2009 -0700
-_AT_@ -28,6 +28,7 @@
- { MODKEY, GDK_k, scroll, { .i = -1 } },
- { 0, GDK_Escape, stop, { 0 } },
- { MODKEY, GDK_o, source, { 0 } },
-+ { MODKEY, GDK_a, spawn, SETPROP("_SURF_AGENT") },
- { MODKEY, GDK_g, spawn, SETPROP("_SURF_URI") },
- { MODKEY, GDK_slash, spawn, SETPROP("_SURF_FIND") },
- { MODKEY, GDK_n, find, { .b = TRUE } },
-diff -r 2998ef786732 surf.c
---- a/surf.c Wed Oct 28 22:22:20 2009 +0100
-+++ b/surf.c Wed Oct 28 15:14:59 2009 -0700
-_AT_@ -55,7 +55,7 @@
- } Key;
-
- static Display *dpy;
--static Atom uriprop, findprop;
-+static Atom uriprop, findprop, agentprop;
- static SoupCookieJar *cookies;
- static SoupSession *session;
- static Client *clients = NULL;
-_AT_@ -119,6 +119,16 @@
- /* configuration, allows nested code to access above variables */
- #include "config.h"
-
-+void
-+agent(Client *c, const Arg *arg) {
-+ const char *s;
-+ WebKitWebSettings *settings;
-+
-+ s = getatom(c, agentprop);
-+ settings = webkit_web_view_get_settings(c->view);
-+ g_object_set(G_OBJECT(settings), "user-agent", s, NULL);
-+}
-+
- char *
- buildpath(const char *path) {
- char *apath, *p;
-_AT_@ -537,6 +547,7 @@
- g_object_set(G_OBJECT(settings), "user-stylesheet-uri", uri, NULL);
- g_free(uri);
- setatom(c, findprop, "");
-+ setatom(c, agentprop, useragent);
-
- c->download = NULL;
- c->title = NULL;
-_AT_@ -605,6 +616,10 @@
- arg.b = TRUE;
- find(c, &arg);
- }
-+ else if(ev->atom == agentprop) {
-+ arg.v = getatom(c, agentprop);
-+ agent(c, &arg);
-+ }
- return GDK_FILTER_REMOVE;
- }
- }
-_AT_@ -692,6 +707,7 @@
- session = webkit_get_default_session();
- uriprop = XInternAtom(dpy, "_SURF_URI", False);
- findprop = XInternAtom(dpy, "_SURF_FIND", False);
-+ agentprop = XInternAtom(dpy, "_SURF_AGENT", False);
-
- /* create dirs and files */
- cookiefile = buildpath(cookiefile);
diff -r 6df929a36b66 -r 3d0063bb0169 surf.suckless.org/patches/useragent.md
--- a/surf.suckless.org/patches/useragent.md Fri Oct 30 10:15:20 2009 -0700
+++ b/surf.suckless.org/patches/useragent.md Fri Oct 30 10:31:19 2009 -0700
_AT_@ -6,15 +6,12 @@
 
 This patch adds the `_SURF_AGENT` xproperty which allows updating surf's useragent
 while running. It may be useful to have a file of predefined useragents to pipe
-through dmenu, or to have a script user xprop and set it for you.
-
-The patch is currently for hg tip (changeset 2998ef786732). Once the next
-release comes out I'll keep it in sync with releases.
+through dmenu, or to have a script use xprop and set it for you.
 
 Download
 --------
 
-* [surf-2998ef786732-agent.diff](surf-2998ef786732-agent.diff) (2.1k) (20091029)
+* [surf-0.3-agent.diff](surf-0.3-agent.diff) (2.1k) (20091030)
 
 Author
 ------
Received on Fri Oct 30 2009 - 18:31:26 CET

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:30:58 CEST