diff options
author | Xan Lopez <xan@igalia.com> | 2012-10-08 22:50:54 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-10-08 22:50:54 +0800 |
commit | 46eafefa8d3e02e634edb287dfe9763398954626 (patch) | |
tree | 6aca8fc8ef8eb2a89cb42d4d1da151bb338d926e /src/ephy-shell.c | |
parent | d60c1783ef90e944060be6c3876b95b0545d3538 (diff) | |
download | gsoc2013-epiphany-46eafefa8d3e02e634edb287dfe9763398954626.tar gsoc2013-epiphany-46eafefa8d3e02e634edb287dfe9763398954626.tar.gz gsoc2013-epiphany-46eafefa8d3e02e634edb287dfe9763398954626.tar.bz2 gsoc2013-epiphany-46eafefa8d3e02e634edb287dfe9763398954626.tar.lz gsoc2013-epiphany-46eafefa8d3e02e634edb287dfe9763398954626.tar.xz gsoc2013-epiphany-46eafefa8d3e02e634edb287dfe9763398954626.tar.zst gsoc2013-epiphany-46eafefa8d3e02e634edb287dfe9763398954626.zip |
ephy-shell: do not configure adblock in test mode
Workaround while we figure out how to make it behave nicely.
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r-- | src/ephy-shell.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c index d061c4896..e38b6aec0 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -469,6 +469,17 @@ ephy_shell_window_removed (GtkApplication *application, GTK_APPLICATION_CLASS (ephy_shell_parent_class)->window_removed (application, window); } +static GObject * +ephy_shell_get_lockdown (EphyShell *shell) +{ + g_return_val_if_fail (EPHY_IS_SHELL (shell), NULL); + + if (shell->priv->lockdown == NULL) + shell->priv->lockdown = g_object_new (EPHY_TYPE_LOCKDOWN, NULL); + + return G_OBJECT (shell->priv->session); +} + static void ephy_shell_constructed (GObject *object) { @@ -480,6 +491,12 @@ ephy_shell_constructed (GObject *object) g_application_set_flags (G_APPLICATION (object), flags); } + /* FIXME: not sure if this is the best place to put this stuff. */ + ephy_shell_get_lockdown (EPHY_SHELL (object)); + + if (ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (object)) != EPHY_EMBED_SHELL_MODE_TEST) + ephy_embed_shell_get_adblock_manager (EPHY_EMBED_SHELL (object)); + if (G_OBJECT_CLASS (ephy_shell_parent_class)->constructed) G_OBJECT_CLASS (ephy_shell_parent_class)->constructed (object); } @@ -590,17 +607,6 @@ download_started_cb (WebKitWebContext *web_context, } #endif -static GObject * -ephy_shell_get_lockdown (EphyShell *shell) -{ - g_return_val_if_fail (EPHY_IS_SHELL (shell), NULL); - - if (shell->priv->lockdown == NULL) - shell->priv->lockdown = g_object_new (EPHY_TYPE_LOCKDOWN, NULL); - - return G_OBJECT (shell->priv->session); -} - static void ephy_shell_init (EphyShell *shell) { @@ -619,10 +625,6 @@ ephy_shell_init (EphyShell *shell) G_CALLBACK (download_started_cb), shell); #endif - - /* FIXME */ - ephy_shell_get_lockdown (shell); - ephy_embed_shell_get_adblock_manager (embed_shell); } static void |