[epiphany] ephy-shell: do not resume session in web app mode



commit 7644b0abc2fdc294d09f95584c835abbdbb96fd1
Author: Xan Lopez <xlopez igalia com>
Date:   Sun Sep 11 15:51:27 2011 +0200

    ephy-shell: do not resume session in web app mode
    
    Session resume will ask to resume the session (opened pages, etc) if
    the previous instance crashed. We don't really want this in web app
    mode, so skip it. Note that this is not exactly the same than loading
    the session, which just restores the previous window sizes and
    states. We do want that, but the terminology here could be more clear.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=658739

 src/ephy-shell.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 8196370..e700f93 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -134,11 +134,12 @@ queue_commands (EphyShell *shell)
 
   ctx = shell->priv->startup_context;
 
-  /* We only get here when starting a new instance, so we first need
-     to autoresume! */
-  ephy_session_queue_command (session,
-                              EPHY_SESSION_CMD_RESUME_SESSION,
-                              NULL, NULL, ctx->user_time, TRUE);
+  /* We only get here when starting a new instance, so autoresume the
+   * session unless we are in application mode. */
+  if (ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (shell)) != EPHY_EMBED_SHELL_MODE_APPLICATION)
+    ephy_session_queue_command (session,
+                                EPHY_SESSION_CMD_RESUME_SESSION,
+                                NULL, NULL, ctx->user_time, TRUE);
 
   if (ctx->startup_flags & EPHY_STARTUP_BOOKMARKS_EDITOR)
     ephy_session_queue_command (session,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]