diff options
author | Julian de Navascues <julian.navascues@gmail.com> | 2009-08-26 22:46:13 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2009-08-26 22:47:10 +0800 |
commit | e92add696ac0e460fc4e520a1201cfb38a67d6fb (patch) | |
tree | ddf10a04a6398ae7a48986e916b7dc09e15182b9 /src | |
parent | af11d9fcb260247311432bfec92b5eeead458846 (diff) | |
download | gsoc2013-epiphany-e92add696ac0e460fc4e520a1201cfb38a67d6fb.tar gsoc2013-epiphany-e92add696ac0e460fc4e520a1201cfb38a67d6fb.tar.gz gsoc2013-epiphany-e92add696ac0e460fc4e520a1201cfb38a67d6fb.tar.bz2 gsoc2013-epiphany-e92add696ac0e460fc4e520a1201cfb38a67d6fb.tar.lz gsoc2013-epiphany-e92add696ac0e460fc4e520a1201cfb38a67d6fb.tar.xz gsoc2013-epiphany-e92add696ac0e460fc4e520a1201cfb38a67d6fb.tar.zst gsoc2013-epiphany-e92add696ac0e460fc4e520a1201cfb38a67d6fb.zip |
ephy-session.c: save session more often to avoid data loss
Session was being saved only when the web was fully loaded
(WEBKIT_LOAD_FINISHED status reached), so there was no info (URLs) to
restore webs that were loading when crashed.
Bug #593149
Signed-off-by: Xan Lopez <xan@gnome.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-session.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ephy-session.c b/src/ephy-session.c index e4c158749..5774354ba 100644 --- a/src/ephy-session.c +++ b/src/ephy-session.c @@ -380,7 +380,13 @@ load_status_notify_cb (EphyWebView *view, GParamSpec *pspec, EphySession *session) { - if (ephy_web_view_is_loading (view) == FALSE) + WebKitLoadStatus status = webkit_web_view_get_load_status (WEBKIT_WEB_VIEW (view)); + + /* We won't know the URL we are loading in PROVISIONAL because + of bug #593149, but save session anyway */ + if (status == WEBKIT_LOAD_PROVISIONAL || + status == WEBKIT_LOAD_COMMITTED || + status == WEBKIT_LOAD_FINISHED) ephy_session_save (session, SESSION_CRASHED); } |