Skip to content
Snippets Groups Projects
Commit bb8e311f authored by Alex Catarineu's avatar Alex Catarineu Committed by Matthew Finkel
Browse files

Bug 40019: Expose spoofEnglish pref

parent 06822f1f
Branches
Tags
1 merge request!32Bug 40026 00
......@@ -601,6 +601,14 @@ class GeckoEngine(
runtime.settings.torSecurityLevel = it
}
}
override var spoofEnglish: Boolean
get() = runtime.settings.spoofEnglish
set(value) {
value.let {
runtime.settings.spoofEnglish = it
localeUpdater.updateValue()
}
}
}.apply {
defaultSettings?.let {
this.javascriptEnabled = it.javascriptEnabled
......@@ -618,6 +626,7 @@ class GeckoEngine(
this.forceUserScalableContent = it.forceUserScalableContent
this.loginAutofillEnabled = it.loginAutofillEnabled
this.torSecurityLevel = it.torSecurityLevel
this.spoofEnglish = it.spoofEnglish
}
}
......
......@@ -601,6 +601,14 @@ class GeckoEngine(
runtime.settings.torSecurityLevel = it
}
}
override var spoofEnglish: Boolean
get() = runtime.settings.spoofEnglish
set(value) {
value.let {
runtime.settings.spoofEnglish = it
localeUpdater.updateValue()
}
}
}.apply {
defaultSettings?.let {
this.javascriptEnabled = it.javascriptEnabled
......@@ -618,6 +626,7 @@ class GeckoEngine(
this.forceUserScalableContent = it.forceUserScalableContent
this.loginAutofillEnabled = it.loginAutofillEnabled
this.torSecurityLevel = it.torSecurityLevel
this.spoofEnglish = it.spoofEnglish
}
}
......
......@@ -179,6 +179,8 @@ abstract class Settings {
* Setting to control the current security level
*/
open var torSecurityLevel: Int by UnsupportedSetting()
open var spoofEnglish: Boolean by UnsupportedSetting()
}
/**
......@@ -214,7 +216,8 @@ data class DefaultSettings(
override var fontSizeFactor: Float? = null,
override var forceUserScalableContent: Boolean = false,
override var loginAutofillEnabled: Boolean = false,
override var torSecurityLevel: Int = 4
override var torSecurityLevel: Int = 4,
override var spoofEnglish: Boolean = false
) : Settings()
class UnsupportedSetting<T> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment