diff options
author | Xan Lopez <xan@gnome.org> | 2010-12-13 07:54:15 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2010-12-13 07:56:21 +0800 |
commit | 67d0bb92493b5c0300dfe003376e29521c8298e1 (patch) | |
tree | 5640b45249e7ba92b4ee6a3dc8d60278e72ae9fe /embed/ephy-embed-single.c | |
parent | df15ea85bdd3e545a78765c5ef3c249b4f4f3852 (diff) | |
download | gsoc2013-epiphany-67d0bb92493b5c0300dfe003376e29521c8298e1.tar.gz gsoc2013-epiphany-67d0bb92493b5c0300dfe003376e29521c8298e1.tar.zst gsoc2013-epiphany-67d0bb92493b5c0300dfe003376e29521c8298e1.zip |
ephy-embed-single: disable Flash by default
The Adobe flash plugin uses GTK+2.x, so it cannot be loaded in our
(GTK+3.x) process without causing a crash. Disable it by default until
we implement a solution.
Diffstat (limited to 'embed/ephy-embed-single.c')
-rw-r--r-- | embed/ephy-embed-single.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c index afab4e1cb..381f8c6bc 100644 --- a/embed/ephy-embed-single.c +++ b/embed/ephy-embed-single.c @@ -270,6 +270,8 @@ static void ephy_embed_single_init (EphyEmbedSingle *single) { EphyEmbedSinglePrivate *priv; + WebKitWebPluginDatabase* database; + GSList* list, *p; single->priv = priv = EPHY_EMBED_SINGLE_GET_PRIVATE (single); priv->online = TRUE; @@ -279,6 +281,20 @@ ephy_embed_single_init (EphyEmbedSingle *single) g_free, NULL); cache_keyring_form_data (single); + + /* Disable Flash by default, since it uses GTK+2.x and we can't mix + * it in our GTK+3.x process */ + database = webkit_get_web_plugin_database (); + list = webkit_web_plugin_database_get_plugins (database); + for (p = list; p; p = p->next) { + WebKitWebPlugin* plugin = WEBKIT_WEB_PLUGIN (p->data); + if (g_strcmp0 (webkit_web_plugin_get_name (plugin), "Shockwave Flash") == 0) { + webkit_web_plugin_set_enabled (plugin, FALSE); + break; + } + } + + webkit_web_plugin_database_plugins_list_free (list); } static void |