aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-10-08 22:50:54 +0800
committerXan Lopez <xan@igalia.com>2012-10-08 22:50:54 +0800
commit46eafefa8d3e02e634edb287dfe9763398954626 (patch)
tree6aca8fc8ef8eb2a89cb42d4d1da151bb338d926e /src
parentd60c1783ef90e944060be6c3876b95b0545d3538 (diff)
downloadgsoc2013-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')
-rw-r--r--src/ephy-shell.c32
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