diff options
author | Xan Lopez <xan@gnome.org> | 2010-12-14 18:21:00 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2010-12-14 21:09:59 +0800 |
commit | 534eae1b801c93950e2b664ffe772375d0fe2340 (patch) | |
tree | 5d37e9fc1b7502cf2ee17d5166d3520cdcd8d596 /embed/ephy-embed-single.c | |
parent | a3df3eb66d73f5ae98f68a7f1ce8322f64269497 (diff) | |
download | gsoc2013-epiphany-534eae1b801c93950e2b664ffe772375d0fe2340.tar.gz gsoc2013-epiphany-534eae1b801c93950e2b664ffe772375d0fe2340.tar.zst gsoc2013-epiphany-534eae1b801c93950e2b664ffe772375d0fe2340.zip |
ephy-embed-single: move code from init to initialize
Diffstat (limited to 'embed/ephy-embed-single.c')
-rw-r--r-- | embed/ephy-embed-single.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c index ea6f49ce0..4c712f17f 100644 --- a/embed/ephy-embed-single.c +++ b/embed/ephy-embed-single.c @@ -270,8 +270,6 @@ 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; @@ -281,20 +279,6 @@ 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 @@ -497,6 +481,8 @@ ephy_embed_single_initialize (EphyEmbedSingle *single) char *filename; char *cookie_policy; char *cache_dir; + WebKitWebPluginDatabase* database; + GSList *list, *p; EphyEmbedSinglePrivate *priv = single->priv; /* Initialise nspluginwrapper's plugins if available */ @@ -560,6 +546,20 @@ ephy_embed_single_initialize (EphyEmbedSingle *single) soup_session_add_feature_by_type (session, SOUP_TYPE_PASSWORD_MANAGER_GNOME); #endif + /* 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); + return TRUE; } |