summaryrefslogtreecommitdiff
path: root/src/config.def.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.def.h')
-rw-r--r--src/config.def.h34
1 files changed, 24 insertions, 10 deletions
diff --git a/src/config.def.h b/src/config.def.h
index fd70a51..772282c 100644
--- a/src/config.def.h
+++ b/src/config.def.h
@@ -91,13 +91,27 @@
#define SETTING_HINT_KEYS "0123456789"
-/* These are the three settings displayed when "status-bar-show-settings" is enabled
- * With booleans, please use GET_BOOL and append ( ? "on" : "off" )
- * With integers, you could just print the value and use GET_INT
- * Strings do not need any additional modifications, use GET_CHAR */
-#define STATUS_NAME1 "js"
-#define STATUS_TYPE1 GET_BOOL(c, "scripts") ? "on" : "off"
-#define STATUS_NAME2 "cookies"
-#define STATUS_TYPE2 GET_CHAR(c, "cookie-accept")
-#define STATUS_NAME3 "storage"
-#define STATUS_TYPE3 GET_BOOL(c, "html5-local-storage") ? "on" : "off"
+/* This status indicator is only shown if "status-bar-show-settings" is
+ * enabled.
+ * The CHAR_MAP(value, internalValue, outputValue, valueIfNotMapped) is a
+ * little workaround to translate internal used string value like for
+ * GET_CHAR(c, "cookie-accept") which is one of "always", "origin" or "never"
+ * to those values that should be shown on statusbar.
+ * The STATUS_VARAIBLE_SHOW is used as argument for a printf like function. So
+ * the first argument is the output pattern. */
+/*
+#define STATUS_VARAIBLE_SHOW "js: %s, cookies: %s, hint-timeout: %d", \
+ GET_BOOL(c, "scripts") ? "on" : "off", \
+ GET_CHAR(c, "cookie-accept"), \
+ GET_INT(c, "hint-timeout")
+*/
+#define COOKIE GET_CHAR(c, "cookie-accept")
+#define STATUS_VARAIBLE_SHOW "%c%c%c%c%c%c%c%c", \
+ CHAR_MAP(COOKIE, "always", 'A', CHAR_MAP(COOKIE, "origin", '@', 'a')), \
+ GET_BOOL(c, "dark-mode") ? 'D' : 'd', \
+ vb.incognito ? 'E' : 'e', \
+ GET_BOOL(c, "images") ? 'I' : 'i', \
+ GET_BOOL(c, "html5-local-storage") ? 'L' : 'l', \
+ GET_BOOL(c, "stylesheet") ? 'M' : 'm', \
+ GET_BOOL(c, "scripts") ? 'S' : 's', \
+ GET_BOOL(c, "strict-ssl") ? 'T' : 't'