[epiphany] Allow toggling WebGL as a runtime GSettings switch
- From: Martin Robinson <mrobinson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Allow toggling WebGL as a runtime GSettings switch
- Date: Thu, 2 Feb 2012 19:50:17 +0000 (UTC)
commit 98ad801a50d8a7f470678bdb86f9eb57dd009ee5
Author: Martin Robinson <mrobinson igalia com>
Date: Thu Feb 2 11:47:34 2012 -0800
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.
data/org.gnome.epiphany.gschema.xml.in | 5 +++++
embed/ephy-embed-prefs.c | 4 ++++
lib/ephy-prefs.h | 1 +
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 887990d..b831ba1 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 4f9b368..b1073e3 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 1f8a347..4ba2a91 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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]