[epiphany] Do not open an extra overview when starting the browser



commit 4ca650b788b2ef34813722f73bb85e3491580a7a
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sat Mar 7 14:57:31 2015 -0600

    Do not open an extra overview when starting the browser
    
    If there is no saved session and the user launches Epiphany by clicking
    a URI in another application, then we should open only one tab with that
    URI. Currently we may open the overview and then the URI in a second tab,
    because we do not consider the page to be blank if it is still loading.
    Replace this tricky code. If the page is still loading it's not safe to
    assume the URI has been set to whatever page was last loaded in it, and we
    can't risk losing tabs from a previous session.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745792

 src/ephy-shell.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 3f1ad72..1a093de 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -950,15 +950,6 @@ ephy_shell_close_all_windows (EphyShell *shell)
   return retval;
 }
 
-static gboolean
-tab_is_empty (EphyEmbed *embed)
-{
-  EphyWebView *view = ephy_embed_get_web_view (embed);
-
-  return ((ephy_web_view_get_is_blank (view) || ephy_web_view_is_overview (view)) &&
-          !ephy_web_view_is_loading (view));
-}
-
 typedef struct {
   EphyShell *shell;
   EphySession *session;
@@ -1035,7 +1026,9 @@ ephy_shell_open_uris_idle (OpenURIsData *data)
     page_flags |= EPHY_NEW_TAB_APPEND_AFTER;
   else if (data->reuse_empty_tab) {
     embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (data->window));
-    reusing_empty_tab = tab_is_empty (embed);
+    /* Only load a new page in this embed if it was showing or loading the homepage about:overview */
+    if (ephy_web_view_get_visit_type (ephy_embed_get_web_view (embed)) == EPHY_PAGE_VISIT_HOMEPAGE)
+      reusing_empty_tab = TRUE;
   }
 
   if (!reusing_empty_tab) {


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