From 443c132d8d565c207c40c351e2d85ba69d8bbe7d Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Sat, 21 Sep 2013 19:04:25 +0200 Subject: [PATCH] Removed all default webkit settings from default.h. This makes the startup a little faster. By they way, a typo in a configuration was fixed. --- src/default.h | 38 +------------------------------------- src/main.c | 4 +--- src/mode.c | 2 ++ src/setting.c | 2 +- 4 files changed, 5 insertions(+), 41 deletions(-) diff --git a/src/default.h b/src/default.h index 7be6500..26c70d2 100644 --- a/src/default.h +++ b/src/default.h @@ -23,49 +23,13 @@ #include "stdlib.h" static char *default_config[] = { -#if 0 - "nmap o=input :open ", - "nmap t=input :tabopen ", - "nmap O=inputuri :open ", - "nmap T=inputuri :tabopen ", - "nmap gh=open", - "nmap gH=tabopen", - "nmap f=hint-link", - "nmap F=hint-link-new", - "nmap =queue-pop", - "nmap zi=zoomin", - "nmap zI=zoominfull", - "nmap zo=zoomout", - "nmap zO=zoomoutfull", - "nmap zz=zoomreset", - "nmap gu=descent", - "nmap gU=descent!", - "nmap =pass-through", - "nmap gi=focus-input", - /* XXX "imap =editor",*/ - "imap =pass-through", -#endif "shortcut-add dl=https://duckduckgo.com/html/?q=$0", "shortcut-add dd=https://duckduckgo.com/?q=$0", "shortcut-default dl", - "set images=on", - "set cursivfont=serif", - "set defaultencondig=utf-8", - "set defaultfont=sans-serif", + "set defaultencoding=utf-8", "set fontsize=11", "set monofontsize=11", - "set caret=off", - "set webinspector=off", - "set offlinecache=on", - "set pagecache=on", - "set plugins=on", - "set scripts=on", - "set xssauditor=on", "set minimumfontsize=5", - "set monofont=monospace", - "set backgrounds=on", - "set sansfont=sens-serif", - "set seriffont=serif", "set useragent=" PROJECT "/" VERSION " (X11; Linux i686) AppleWebKit/535.22+ Compatible (Safari)", "set stylesheet=on", "set proxy=on", diff --git a/src/main.c b/src/main.c index c5d2d76..a4f8609 100644 --- a/src/main.c +++ b/src/main.c @@ -762,9 +762,7 @@ static void read_config(void) int length = g_strv_length(lines) - 1; for (int i = 0; i < length; i++) { line = lines[i]; - g_strstrip(line); - - if (!g_ascii_isalpha(line[0])) { + if (*line == '#') { continue; } if (!ex_run_string(line)) { diff --git a/src/mode.c b/src/mode.c index ab86172..7bd3f75 100644 --- a/src/mode.c +++ b/src/mode.c @@ -97,8 +97,10 @@ VbResult mode_handle_key(unsigned int key) VbResult res; if (vb.mode && vb.mode->keypress) { key &= 0xff; +#ifdef DEBUG int flags = vb.mode->flags; int id = vb.mode->id; +#endif res = vb.mode->keypress(key); if (vb.mode) { PRINT_DEBUG( diff --git a/src/setting.c b/src/setting.c index 4489a6a..46834bd 100644 --- a/src/setting.c +++ b/src/setting.c @@ -50,7 +50,7 @@ static Setting default_settings[] = { /* alias, name, type, func, arg */ {"images", "auto-load-images", TYPE_BOOLEAN, webkit, {0}}, {"cursivfont", "cursive-font-family", TYPE_CHAR, webkit, {0}}, - {"defaultencondig", "default-encoding", TYPE_CHAR, webkit, {0}}, + {"defaultencoding", "default-encoding", TYPE_CHAR, webkit, {0}}, {"defaultfont", "default-font-family", TYPE_CHAR, webkit, {0}}, {"fontsize", "default-font-size", TYPE_INTEGER, webkit, {0}}, {"monofontsize", "default-monospace-font-size", TYPE_INTEGER, webkit, {0}}, -- 2.20.1