aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2012-02-03 03:47:34 +0800
committerMartin Robinson <mrobinson@igalia.com>2012-02-03 03:47:34 +0800
commit98ad801a50d8a7f470678bdb86f9eb57dd009ee5 (patch)
tree28965a6a0173eb52f426576b2bd0329942fc4e61
parent9ead439a12282b6182da3e7c81f4df46a3a6270d (diff)
downloadgsoc2013-epiphany-98ad801a50d8a7f470678bdb86f9eb57dd009ee5.tar.gz
gsoc2013-epiphany-98ad801a50d8a7f470678bdb86f9eb57dd009ee5.tar.zst
gsoc2013-epiphany-98ad801a50d8a7f470678bdb86f9eb57dd009ee5.zip
Allow toggling WebGL as a runtime GSettings switch
If WebGL is enabled in WebKitGTK+, this new GSettings switch disables and enables WebGL settings at runtime. WebGL is disabled by default currently because Epiphany may use Clutter in the future.
-rw-r--r--data/org.gnome.epiphany.gschema.xml.in5
-rw-r--r--embed/ephy-embed-prefs.c4
-rw-r--r--lib/ephy-prefs.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/data/org.gnome.epiphany.gschema.xml.in b/data/org.gnome.epiphany.gschema.xml.in
index 887990d5c..b831ba193 100644
--- a/data/org.gnome.epiphany.gschema.xml.in
+++ b/data/org.gnome.epiphany.gschema.xml.in
@@ -168,6 +168,11 @@
<default>true</default>
<summary>Enable JavaScript</summary>
</key>
+ <key type="b" name="enable-webgl">
+ <default>false</default>
+ <summary>Enable WebGL</summary>
+ <description>Whether to enable support for WebGL contexts.</description>
+ </key>
</schema>
<schema path="/org/gnome/epiphany/state/" id="org.gnome.Epiphany.state">
<key type="s" name="open-dir">
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index 4f9b3686b..b1073e385 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -529,6 +529,10 @@ ephy_embed_prefs_init (void)
EPHY_PREFS_WEB_DEFAULT_ENCODING,
webkit_settings, "default-encoding",
G_SETTINGS_BIND_GET);
+ g_settings_bind (EPHY_SETTINGS_WEB,
+ EPHY_PREFS_WEB_ENABLE_WEBGL,
+ webkit_settings, "enable-webgl",
+ G_SETTINGS_BIND_GET);
}
void
diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h
index 1f8a347b2..4ba2a918e 100644
--- a/lib/ephy-prefs.h
+++ b/lib/ephy-prefs.h
@@ -86,6 +86,7 @@ typedef enum
#define EPHY_PREFS_WEB_ENABLE_PLUGINS "enable-plugins"
#define EPHY_PREFS_WEB_ENABLE_JAVASCRIPT "enable-javascript"
#define EPHY_PREFS_WEB_ENABLE_SPELL_CHECKING "enable-spell-checking"
+#define EPHY_PREFS_WEB_ENABLE_WEBGL "enable-webgl"
#define EPHY_PREFS_WEB_COOKIES_POLICY "cookies-policy"
#define EPHY_PREFS_WEB_IMAGE_ANIMATION_MODE "image-animation-mode"
#define EPHY_PREFS_WEB_DEFAULT_ENCODING "default-encoding"