[hackers] [surf] preparing sourcecode feature coming with webkit-1.1.14. || Enno Boland (tox)

From: <hg_AT_suckless.org>
Date: Wed, 9 Sep 2009 11:59:00 +0000 (UTC)

changeset: 78:9fa4c772c769
tag: tip
user: Enno Boland (tox) <tox_AT_s01.de>
date: Wed Sep 09 14:00:31 2009 +0200
files: config.def.h surf.c
description:
preparing sourcecode feature coming with webkit-1.1.14.

diff -r 2639e146a127 -r 9fa4c772c769 config.def.h
--- a/config.def.h Wed Sep 09 11:01:50 2009 +0200
+++ b/config.def.h Wed Sep 09 14:00:31 2009 +0200
@@ -19,6 +19,7 @@
     { MODKEY, GDK_l, navigate, { .i = +1 }, BROWSER },
     { MODKEY, GDK_h, navigate, { .i = -1 }, BROWSER },
     { 0, GDK_Escape, stop, { 0 }, BROWSER },
+ { MODKEY, GDK_o, source, { 0 }, BROWSER },
     { MODKEY, GDK_n, searchtext, { .b = TRUE }, BROWSER|SEARCHBAR },
     { MODKEY, GDK_N, searchtext, { .b = FALSE }, BROWSER|SEARCHBAR },
     { 0, GDK_Return, searchtext, { .b = TRUE }, SEARCHBAR },
diff -r 2639e146a127 -r 9fa4c772c769 surf.c
--- a/surf.c Wed Sep 09 11:01:50 2009 +0200
+++ b/surf.c Wed Sep 09 14:00:31 2009 +0200
@@ -104,6 +104,7 @@
 static void titlechange(WebKitWebView* view, WebKitWebFrame* frame,
                 const gchar* title, Client *c);
 static void searchtext(Client *c, const Arg *arg);
+static void source(Client *c, const Arg *arg);
 static void showsearch(Client *c, const Arg *arg);
 static void showurl(Client *c, const Arg *arg);
 static void stop(Client *c, const Arg *arg);
@@ -548,6 +549,16 @@
 }
 
 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, c->source);*/
+ reload(c, &a);
+}
+
+void
 searchtext(Client *c, const Arg *arg) {
         gboolean forward = *(gboolean *)arg;
         webkit_web_view_search_text(c->view,
Received on Wed Sep 09 2009 - 11:59:00 UTC

This archive was generated by hypermail 2.2.0 : Wed Sep 09 2009 - 12:00:09 UTC