diff options
author | Gustavo Noronha Silva <gns@gnome.org> | 2013-02-23 02:38:01 +0800 |
---|---|---|
committer | Gustavo Noronha Silva <gns@gnome.org> | 2013-02-24 04:41:13 +0800 |
commit | b45047739e9ebc02200267a52295f24adf4ca668 (patch) | |
tree | 743bfd4c0aa63703286947707252b3f366d4a7cb /src | |
parent | 1bf2e792d47a41ee9117ffae1c699419d211644a (diff) | |
download | gsoc2013-epiphany-b45047739e9ebc02200267a52295f24adf4ca668.tar gsoc2013-epiphany-b45047739e9ebc02200267a52295f24adf4ca668.tar.gz gsoc2013-epiphany-b45047739e9ebc02200267a52295f24adf4ca668.tar.bz2 gsoc2013-epiphany-b45047739e9ebc02200267a52295f24adf4ca668.tar.lz gsoc2013-epiphany-b45047739e9ebc02200267a52295f24adf4ca668.tar.xz gsoc2013-epiphany-b45047739e9ebc02200267a52295f24adf4ca668.tar.zst gsoc2013-epiphany-b45047739e9ebc02200267a52295f24adf4ca668.zip |
Add setting for delayed tab loading, and use it to fix the session tests
The session tests were broken by the delayed tab loading feature - the restored
embeds would not finish loading and thus the expectations for the URIs were not
met. This change adds a setting that is now used by those tests to disable the
feature temporarily.
Also revert "ephy-session-test: make tests pass", which is no longer necessary.
This reverts commit 75da5fff3f4489dacf4ded6f012daa06af306709.
https://bugzilla.gnome.org/show_bug.cgi?id=694470
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-session.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/ephy-session.c b/src/ephy-session.c index 82ecf4149..1099cddbb 100644 --- a/src/ephy-session.c +++ b/src/ephy-session.c @@ -1105,16 +1105,31 @@ session_parse_embed (SessionParserContext *context, EphyNewTabFlags flags; EphyEmbed *embed; EphyWebView *web_view; + gboolean delay_loading; + + delay_loading = g_settings_get_boolean (EPHY_SETTINGS_MAIN, + EPHY_PREFS_RESTORE_SESSION_DELAYING_LOADS); flags = EPHY_NEW_TAB_IN_EXISTING_WINDOW; flags |= EPHY_NEW_TAB_APPEND_LAST; - flags |= EPHY_NEW_TAB_DELAYED_OPEN_PAGE; + + if (delay_loading) + { + flags |= EPHY_NEW_TAB_DELAYED_OPEN_PAGE; + } + else + { + flags |= EPHY_NEW_TAB_OPEN_PAGE; + } embed = ephy_shell_new_tab (ephy_shell_get_default (), context->window, NULL, url, flags); - web_view = ephy_embed_get_web_view (embed); - ephy_web_view_set_placeholder (web_view, url, title); + if (delay_loading) + { + web_view = ephy_embed_get_web_view (embed); + ephy_web_view_set_placeholder (web_view, url, title); + } } else if (was_loading && url != NULL) { |