treworked navigate. - surf - customized build of surf, the suckless webkit browser
(HTM) git clone git://src.adamsgaard.dk/surf
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 839edbe22dbe789f56fb4383b5f348f0846d0a58
(DIR) parent 4384cf198a38951839dfbd6abcab72d75076c593
(HTM) Author: Enno Boland (tox) <tox@s01.de>
Date: Sun, 6 Sep 2009 14:12:10 +0200
reworked navigate.
Diffstat:
M config.h | 4 ++--
M surf.c | 7 ++-----
2 files changed, 4 insertions(+), 7 deletions(-)
---
(DIR) diff --git a/config.h b/config.h
t@@ -33,8 +33,8 @@ static Key general_keys[] = {
{ 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 },
};
(DIR) diff --git a/surf.c b/surf.c
t@@ -348,11 +348,8 @@ loaduri(Client *c, const Arg *arg) {
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(c->view, steps);
}
Client *