[hackers] [surf] reworked navigate. || Enno Boland (tox)

From: <hg_AT_suckless.org>
Date: Sun, 6 Sep 2009 12:07:35 +0000 (UTC)

changeset: 55:89163da45f38
tag: tip
user: Enno Boland (tox) <tox_AT_s01.de>
date: Sun Sep 06 14:09:05 2009 +0200
files: config.h surf.c
description:
reworked navigate.

diff -r 5f2a22fdd286 -r 89163da45f38 config.h
--- a/config.h Sun Sep 06 13:54:29 2009 +0200
+++ b/config.h Sun Sep 06 14:09:05 2009 +0200
@@ -33,8 +33,8 @@
     { GDK_CONTROL_MASK, GDK_0, zoompage, {.f = +1.0 }, TRUE },
     { GDK_CONTROL_MASK, GDK_n, searchtext, {.b = TRUE}, TRUE },
     { GDK_CONTROL_MASK, GDK_N, searchtext, {.b = FALSE}, TRUE },
- { GDK_CONTROL_MASK, GDK_h, navigate, {.b = TRUE}, TRUE },
- { GDK_CONTROL_MASK, GDK_l, navigate, {.b = FALSE}, TRUE },
+ { GDK_CONTROL_MASK, GDK_l, navigate, {.i = +1}, TRUE },
+ { GDK_CONTROL_MASK, GDK_h, navigate, {.i = -1}, TRUE },
     { 0, GDK_Escape, stop, {0}, TRUE },
 };
 
diff -r 5f2a22fdd286 -r 89163da45f38 surf.c
--- a/surf.c Sun Sep 06 13:54:29 2009 +0200
+++ b/surf.c Sun Sep 06 14:09:05 2009 +0200
@@ -348,11 +348,8 @@
 
 void
 navigate(Client *c, const Arg *arg) {
- gboolean forward = *(gboolean *)arg;
- if(forward)
- webkit_web_view_go_forward(c->view);
- else
- webkit_web_view_go_back(c->view);
+ gint steps = *(gint *)arg;
+ webkit_web_view_can_go_back_or_forward(WebKitWebView *web_view, steps);
 }
 
 Client *
Received on Sun Sep 06 2009 - 12:07:35 UTC

This archive was generated by hypermail 2.2.0 : Sun Sep 06 2009 - 12:12:15 UTC