[hackers] [surf] Be more specific about what enablestyles parameter does. || Quentin Rameau

From: <git_AT_suckless.org>
Date: Tue, 3 Nov 2015 19:48:10 +0100 (CET)

commit 5333171961fc192fbc4d493c940566b1b3d4b3e5
Author: Quentin Rameau <quinq+hackers_AT_fifth.space>
AuthorDate: Tue Nov 3 16:50:21 2015 +0100
Commit: Christoph Lohmann <20h_AT_r-36.net>
CommitDate: Tue Nov 3 19:45:50 2015 +0100

    Be more specific about what enablestyles parameter does.
    
    The enablestyles configuration variable and parameter flag manages the
    global application of styles, not just the site-specific styles.
    
    Signed-off-by: Christoph Lohmann <20h_AT_r-36.net>

diff --git a/config.def.h b/config.def.h
index 368291f..1c18827 100644
--- a/config.def.h
+++ b/config.def.h
_AT_@ -30,7 +30,7 @@ static int diskcachebytes = 5 * 1024 * 1024;
 static Bool enableplugins = TRUE;
 static Bool enablescripts = TRUE;
 static Bool enableinspector = TRUE;
-static Bool enablestyles = TRUE;
+static Bool enablestyle = TRUE;
 static Bool loadimages = TRUE;
 static Bool hidebackground = FALSE;
 static Bool allowgeolocation = TRUE;
diff --git a/surf.1 b/surf.1
index 3457a55..867783d 100644
--- a/surf.1
+++ b/surf.1
_AT_@ -75,10 +75,10 @@ Disable kiosk mode (disable key strokes and right click)
 Enable kiosk mode (disable key strokes and right click)
 .TP
 .B \-m
-Disable the site-specific styles.
+Disable application of user style sheets.
 .TP
 .B \-M
-Enable the site-specific styles.
+Enable application of user style sheets.
 .TP
 .B \-n
 Disable the Web Inspector (Developer Tools).
diff --git a/surf.c b/surf.c
index dd9c306..586bde1 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -803,7 +803,7 @@ loadstatuschange(WebKitWebView *view, GParamSpec *pspec, Client *c)
                 }
                 setatom(c, AtomUri, uri);
 
- if (enablestyles)
+ if (enablestyle)
                         setstyle(c, getstyle(uri));
                 break;
         case WEBKIT_LOAD_FINISHED:
_AT_@ -1021,7 +1021,7 @@ newclient(void)
                      "default-font-size", defaultfontsize, NULL);
         g_object_set(G_OBJECT(settings),
                      "resizable-text-areas", 1, NULL);
- if (enablestyles)
+ if (enablestyle)
                 setstyle(c, getstyle("about:blank"));
 
         /*
_AT_@ -1534,8 +1534,8 @@ togglescrollbars(Client *c, const Arg *arg)
 void
 togglestyle(Client *c, const Arg *arg)
 {
- enablestyles = !enablestyles;
- setstyle(c, enablestyles ? getstyle(geturi(c)) : "");
+ enablestyle = !enablestyle;
+ setstyle(c, enablestyle ? getstyle(geturi(c)) : "");
 
         updatetitle(c);
 }
_AT_@ -1566,7 +1566,7 @@ gettogglestat(Client *c)
         g_object_get(G_OBJECT(settings), "enable-plugins", &value, NULL);
         togglestat[p++] = value? 'V': 'v';
 
- togglestat[p++] = enablestyles ? 'M': 'm';
+ togglestat[p++] = enablestyle ? 'M': 'm';
 
         togglestat[p] = '\0';
 }
_AT_@ -1709,10 +1709,10 @@ main(int argc, char *argv[])
                 kioskmode = 1;
                 break;
         case 'm':
- enablestyles = 0;
+ enablestyle = 0;
                 break;
         case 'M':
- enablestyles = 1;
+ enablestyle = 1;
                 break;
         case 'n':
                 enableinspector = 0;
Received on Tue Nov 03 2015 - 19:48:10 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 03 2015 - 20:00:13 CET