From 98ad801a50d8a7f470678bdb86f9eb57dd009ee5 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Thu, 2 Feb 2012 11:47:34 -0800 Subject: 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(+) 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 @@ true Enable JavaScript + + false + Enable WebGL + Whether to enable support for WebGL contexts. + 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" -- cgit v1.2.3