Removed all default webkit settings from default.h.
authorDaniel Carl <danielcarl@gmx.de>
Sat, 21 Sep 2013 17:04:25 +0000 (19:04 +0200)
committerDaniel Carl <danielcarl@gmx.de>
Sat, 21 Sep 2013 17:07:49 +0000 (19:07 +0200)
This makes the startup a little faster. By they way, a typo in a configuration
was fixed.

src/default.h
src/main.c
src/mode.c
src/setting.c

index 7be6500..26c70d2 100644 (file)
 #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 <ctrl-p>=queue-pop",
-    "nmap zi=zoomin",
-    "nmap zI=zoominfull",
-    "nmap zo=zoomout",
-    "nmap zO=zoomoutfull",
-    "nmap zz=zoomreset",
-    "nmap gu=descent",
-    "nmap gU=descent!",
-    "nmap <ctrl-z>=pass-through",
-    "nmap gi=focus-input",
-    /* XXX "imap <ctrl-t>=editor",*/
-    "imap <ctrl-z>=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",
index c5d2d76..a4f8609 100644 (file)
@@ -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)) {
index ab86172..7bd3f75 100644 (file)
@@ -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(
index 4489a6a..46834bd 100644 (file)
@@ -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}},