[hackers] [surf] Adapt default parameters to new config style || Quentin Rameau

From: <git_AT_suckless.org>
Date: Tue, 5 Jul 2016 13:02:31 +0200 (CEST)

commit 11b34c08146928754ade63b285ba861f0be6a416
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Sun Nov 29 17:22:15 2015 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Tue Jul 5 13:01:56 2016 +0200

    Adapt default parameters to new config style

diff --git a/config.def.h b/config.def.h
index 9682d0d..e4f82a1 100644
--- a/config.def.h
+++ b/config.def.h
_AT_@ -4,38 +4,40 @@ static char *fulluseragent = ""; /* Or override the whole user agent string */
 static char *scriptfile = "~/.surf/script.js";
 static char *styledir = "~/.surf/styles/";
 static char *cachedir = "~/.surf/cache/";
-
-static int kioskmode = 0; /* Ignore shortcuts */
-static int showindicators = 1; /* Show indicators in window title */
-static int runinfullscreen = 0; /* Run in fullscreen mode by default */
-
-static guint defaultfontsize = 12; /* Default font size */
-static gfloat zoomlevel = 1.0; /* Default zoom level */
-
-/* Soup default features */
 static char *cookiefile = "~/.surf/cookies.txt";
-static char *cookiepolicies = "Aa_AT_"; /* A: accept all; a: accept nothing,
- * _AT_: accept no third party */
-static int strictssl = 0; /* Refuse untrusted SSL connections */
-
-/* Languages */
-static int enablespellchecking = 0;
-static const char *spellinglanguages[] = { "en_US", NULL };
-static const char *preferedlanguages[] = { NULL };
 
 /* Webkit default features */
-static int enablescrollbars = 1;
-static int enablecaretbrowsing = 1;
-static int enablecache = 1;
-static int enableplugins = 1;
-static int enablescripts = 1;
-static int enableinspector = 1;
-static int enablestyle = 1;
-static int loadimages = 1;
-static int hidebackground = 0;
-static int allowgeolocation = 1;
-static int enablednsprefetching = 0;
-static int enableframeflattening = 0;
+static Parameter defconfig[ParameterLast] = {
+ SETB(CaretBrowsing, 0),
+ SETV(CookiePolicies, "_AT_Aa"),
+ SETB(DiskCache, 1),
+ SETB(DNSPrefetch, 0),
+ SETI(FontSize, 12),
+ SETB(FrameFlattening, 0),
+ SETB(Geolocation, 0),
+ SETB(HideBackground, 0),
+ SETB(Inspector, 0),
+ SETB(JavaScript, 1),
+ SETB(KioskMode, 0),
+ SETB(LoadImages, 1),
+ SETB(Plugins, 1),
+ SETV(PreferredLanguages, ((char *[]){ NULL })),
+ SETB(RunInFullscreen, 0),
+ SETB(ScrollBars, 1),
+ SETB(ShowIndicators, 1),
+ SETB(SpellChecking, 0),
+ SETV(SpellLanguages, ((char *[]){ "en_US", NULL })),
+ SETB(StrictSSL, 0),
+ SETB(Style, 1),
+ SETF(ZoomLevel, 1.0),
+};
+
+static UriParameters uriparams[] = {
+ { "(://|\\.)suckless\\.org(/|$)", {
+ FSETB(JavaScript, 0),
+ FSETB(Plugins, 0),
+ }, },
+};
 
 static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE |
                                     WEBKIT_FIND_OPTIONS_WRAP_AROUND;
_AT_@ -146,6 +148,7 @@ static Key keys[] = {
         { MODKEY|GDK_SHIFT_MASK, GDK_KEY_i, toggle, { .i = LoadImages } },
         { MODKEY|GDK_SHIFT_MASK, GDK_KEY_v, toggle, { .i = Plugins } },
         { MODKEY|GDK_SHIFT_MASK, GDK_KEY_b, toggle, { .i = ScrollBars } },
+ { MODKEY|GDK_SHIFT_MASK, GDK_KEY_m, toggle, { .i = Style } },
 };
 
 /* button definitions */
Received on Tue Jul 05 2016 - 13:02:31 CEST

This archive was generated by hypermail 2.3.0 : Tue Jul 05 2016 - 13:12:25 CEST