Re: [dev] [surf] Why enable spatial navigation?

From: Alex Puterbaugh <puterbaugh0_AT_gmail.com>
Date: Sun, 22 Aug 2010 16:19:10 -0400

Personal taste I guess. There are existing keybinds for
scrolling that you can change in config.h, so I guess enabling
spatial navigation allows the best of both worlds or something.

>On Sun, Aug 22, 2010 at 02:26:13PM -0500, Matthew Bauer wrote:
> Why does surf by default have spatial navigation[1] enabled? I would think
> most users would want the up key to move the page up and the down key to
> move the page down.
>
> [1]:
> http://webkitgtk.org/reference/webkitgtk-WebKitWebSettings.html#WebKitWebSettings--enable-spatial-navigation

> diff -r 6d9e59393666 surf.c
> --- a/surf.c Sat Aug 21 19:46:07 2010 -0500
> +++ b/surf.c Sun Aug 22 14:20:06 2010 -0500
> @@ -388,8 +388,8 @@
>
> if(strcmp(uri, "") == 0)
> return;
> - if(!(uri[0]=='h'&&uri[1]=='t'&&uri[2]=='t'&&uri[3]=='p')&&(!(uri[4]==':'&&uri[5]=='/'&&uri[6]=='/')||!(uri[4]=='s'&&uri[5]==':'&&uri[6]=='/'&&uri[7]=='/'))){
> -// if(g_strrstr(uri, "://") != NULL && g_strrstr(uri, "http://") == NULL && g_strrstr(uri, "https://") == NULL){
> +// if(!((uri[0]=='h'&&uri[1]=='t'&&uri[2]=='t'&&uri[3]=='p')&&((uri[4]==':'&&uri[5]=='/'&&uri[6]=='/')||(uri[4]=='s'&&uri[5]==':'&&uri[6]=='/'&&uri[7]=='/')))){
> + if(g_strrstr(uri, "://") && !g_strrstr(uri, "http://") && !g_strrstr(uri, "https://")){
> Arg spawnarg;
> spawnarg = (Arg)PROTOCOL_HANDLER((char *)uri);
> spawn(c, &spawnarg);
> @@ -507,7 +507,7 @@
> g_object_set(G_OBJECT(settings), "auto-load-images", loadimage, NULL);
> g_object_set(G_OBJECT(settings), "enable-plugins", plugin, NULL);
> g_object_set(G_OBJECT(settings), "enable-scripts", script, NULL);
> - g_object_set(G_OBJECT(settings), "enable-spatial-navigation", true, NULL);
> + //g_object_set(G_OBJECT(settings), "enable-spatial-navigation", true, NULL);
>
> g_free(uri);
>
Received on Sun Aug 22 2010 - 22:19:10 CEST

This archive was generated by hypermail 2.2.0 : Sun Aug 22 2010 - 22:24:02 CEST