aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-06-14 13:32:26 +0800
committerXan Lopez <xan@igalia.com>2012-06-14 13:40:16 +0800
commit4873a591b6e90a6df99e7d0965c93b74bf4fec85 (patch)
treeb22a3b94369bdd343eae2e44e2b5303c96a3560d /src
parent600192397f1a70f56f8c592353e40fe213aa3157 (diff)
downloadgsoc2013-epiphany-4873a591b6e90a6df99e7d0965c93b74bf4fec85.tar
gsoc2013-epiphany-4873a591b6e90a6df99e7d0965c93b74bf4fec85.tar.gz
gsoc2013-epiphany-4873a591b6e90a6df99e7d0965c93b74bf4fec85.tar.bz2
gsoc2013-epiphany-4873a591b6e90a6df99e7d0965c93b74bf4fec85.tar.lz
gsoc2013-epiphany-4873a591b6e90a6df99e7d0965c93b74bf4fec85.tar.xz
gsoc2013-epiphany-4873a591b6e90a6df99e7d0965c93b74bf4fec85.tar.zst
gsoc2013-epiphany-4873a591b6e90a6df99e7d0965c93b74bf4fec85.zip
Add a new mode for shell testing, EPHY_EMBED_SHELL_MODE_TEST
For now the only difference is that no top-level window will be shown in this mode, but in the future it can be extended to behave in a manner appropriate for testing.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-session.c9
-rw-r--r--src/ephy-shell.c3
2 files changed, 8 insertions, 4 deletions
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 642ba686d..70af83ca7 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -1142,9 +1142,12 @@ ephy_session_load_from_string (EphySession *session,
}
}
- active_child = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
- gtk_widget_grab_focus (GTK_WIDGET (active_child));
- gtk_widget_show (widget);
+ if (ephy_embed_shell_get_mode (embed_shell) != EPHY_EMBED_SHELL_MODE_TEST)
+ {
+ active_child = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
+ gtk_widget_grab_focus (GTK_WIDGET (active_child));
+ gtk_widget_show (widget);
+ }
}
else if (xmlStrEqual (child->name, (const xmlChar *) "toolwindow"))
{
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index b2510a45d..35325b8cf 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -746,7 +746,8 @@ ephy_shell_new_tab_full (EphyShell *shell,
ephy_gui_window_update_user_time (GTK_WIDGET (window), user_time);
- if ((flags & EPHY_NEW_TAB_DONT_SHOW_WINDOW) == 0) {
+ if ((flags & EPHY_NEW_TAB_DONT_SHOW_WINDOW) == 0 &&
+ ephy_embed_shell_get_mode (embed_shell) != EPHY_EMBED_SHELL_MODE_TEST) {
gtk_widget_show (GTK_WIDGET (window));
}