summaryrefslogtreecommitdiffstats
path: root/src/config/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/config.c')
-rw-r--r--src/config/config.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/config/config.c b/src/config/config.c
index ce992f4..9951765 100644
--- a/src/config/config.c
+++ b/src/config/config.c
@@ -70,7 +70,7 @@ struct item {
#define SET_STRL(NAME, VALUE) mq_config_set_string (config, NAME, VALUE)
static void
-set_defaults(MqConfig *config)
+set_defaults(MqConfig *config, MqConfigProfile profile)
{
config->types_and_cbs_set = FALSE;
@@ -146,9 +146,12 @@ set_defaults(MqConfig *config)
SET_BOOL("permissions.javascript.mediasource.enable", FALSE);
/* Security and Privacy -> History */
- SET_BOOL("privacy.private-browsing.enabled", FALSE);
- SET_BOOL("privacy.remember.history", TRUE);
- SET_BOOL("privacy.remember.downloads", TRUE);
+ SET_BOOL("privacy.private-browsing.enabled",
+ profile == MQ_CONFIG_PROFILE_PRIVATE);
+ SET_BOOL("privacy.remember.history",
+ profile != MQ_CONFIG_PROFILE_PRIVATE);
+ SET_BOOL("privacy.remember.downloads",
+ profile != MQ_CONFIG_PROFILE_PRIVATE);
/* Security and Privacy -> Cookies */
SET_STR ("cookies.accept", "always");
@@ -179,7 +182,7 @@ set_defaults(MqConfig *config)
#undef SET_STRL
MqConfig *
-mq_config_new(const gchar *profile)
+mq_config_new(const gchar *profile, MqConfigProfile profile_type)
{
MqConfig *config;
@@ -190,7 +193,7 @@ mq_config_new(const gchar *profile)
PACKAGE, profile, "config", NULL);
config->key_file = g_key_file_new();
config->types_and_cbs = g_hash_table_new(g_str_hash, g_int_equal);
- set_defaults(config);
+ set_defaults(config, profile_type);
return config;
}